Question: Can I get a help for these questions please and thank you! 1) Suppose we have a method with a parameter Location[] a. Which of
Can I get a help for these questions please and thank you!

1) Suppose we have a method with a parameter Location[] a. Which of the following statements performs a side-effect that could be visible to the caller? Check all that apply. a) a[3]= new Location (10,202 b) a.clone(Li c) a[0].rotate90(): d) int x=a[1]getx(i e) a= null; 2) Which of the following statements about QutOfMemoryError is true? a) Programmers should catch this exception and choose a more space-efficient algorithm instead. b) Java requires that any method that might throw it to declare this possibility. c) It can happen if we access an array element at a very high index. d) It can happen in any method creating a new array. e) It can happen if you create an array of length greater than Integer.MAX VALUE. 3) The textbook proposes a "Sequence" project. It suggests a design using an array, and two fields currentlndex and manyltems. If the array has a capacity of 5 and manyltems is 3 , which of the following values for currentindex meet the invariant? Check all that apply. a) 1 b) 0 c) 1 d) 2 e) 3 f) 4 g) 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
