Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 7: Arrays and Array Lists
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 101
Multiple Choice
Assume the method createSomething has been defined as follows: Int [] createSomething (int start, int size) { Int [] result = new int[size]; For (int i = 0; i < result.length; i++) { Result[i] = start; Start++; } Return result; } What is printed by the statement below? System.out.print (Arrays.toString(createSomething(4, 3) ) ) ;
Question 102
Multiple Choice
Assume the array of integers values has been created and process is a method that has a single integer parameter. Which of the following is equivalent to the loop below? for (int val: values) { Process (val) ; }
Question 103
Multiple Choice
What will be printed by the statements below? ArrayList<String> names = new ArrayList<String>() ; Names.add("Annie") ; Names.add("Bob") ; Names.add("Charles") ; For (int i = 0; i < 3; i++) { String extra = names.get(i) ; Names.add (extra) ; } System.out.print (names) ;
Question 104
Multiple Choice
What will be printed by the statements below? Int[] values = { 4, 5, 6, 7}; For (int i = 1; i < values.length; i++) Values[i] = values[i - 1] + values[i]; For (int i = 0; i < values.length; i++) System.out.print (values[i] + " ") ;