String string = "bat"; Integer x = 7; Object[] objects; List rawList; List < Object > objectList; List < String > stringList;Identify any code that results in a compiler error or warning.
objects = new String[1]; objects[0] = string; objects[0] = x;
objects = new Object[1]; objects[0] = string; objects[0] = x;
stringList = new ArrayList < String >(); stringList.add(string) ;
objectList = new ArrayList < String >(); objectList.add(string) ;
objectList = new ArrayList < Object >(); objectList.add(string) ; objectList.add(x) ;
rawList = new ArrayList(); rawList.add(string) ; rawList.add(x) ;