Core Java MCQ of Java Full Stack Of Training Set-1

1).Emma is writing a program, where she needs to convert a collection to an arraylist Choose the correct option to help her. Option: a)ArrayList; b)ArrayList<syn> newList=; c)ArrayList <syn> newList; d)ArrayList <syn>newList= (Collection(ArrayList::new)); Answer:-b 2)¬†What will be the output of the following Java code? public class Main { public static void main(String[] … Read more