Menu

### question 21 look at the following declaration 1 enum tree oak maple pine what is the 5153993

QUESTION 21 Look at the following declaration 1. enum Tree OAK, MAPLE, PINE What is the ordinal value of the PINE enum constant? 0 C 1 2 3 Tree.MAPLE 2 points QUESTION 22 1. What is stored by a reference variable? 21 And A binary encoded decimal 24 A memory address An object (23 A string 2 points QUESTION 23 1. What would be the results after the following code was executed? intll array1 (10. 20, 30, 40) int If array2 (20, 30, 50, 60 array1 array 2 array2 – array1; arrayl()- (10, 20, 30, 40) and array2[1 -110, 20, 30, 401 arrayl11-£10, 20, 30, 40) and array2[-120, 30, 50, 60) arrayl[]- (20, 30, 50, 601 and array2[-(20, 30, 50, 60) arrayl[)- 120, 30, 50, 60) and array2 -(10, 20, 30, 40 2 points QUESTION 24 1. What would be the resut of the folowing code? intll myArray new int/25 int value myArray(0 for (ide1; ideonyArray length ids) f (myArrayfidslsvalue) value myArrayfidx Value contains the lowest valoe in myArray Value contains the highest value in nyArray F4 # FS 2 3 4 Q 6 W E R T A Y C a 10 2 poir a 20 QUESTION 17 1. The phrase divide and conquer is sometimes used to describe: The backbone of the scientific method. The process of dividing functions. The process of breaking a problem down into smaller pieces. The process of using division to solve a mathematical problem. C 2 poin 1. When an object reference is passed to a method such as passing a Rectangle object, the method can change the values in the object, such as changing the width and length of that Rectangle object, and will have changed the original object that was passed to the method. QUESTION 18 True 2 poin C False QUESTION 19 1 What will be returned from the following method? public static double myMethod() 12.5+ 4.5 double numn return num; 16.0 17 5 LU 1. ASSU ng trhe 1oliOwing deClaration exists enum Tree OAK, MAPLE, PINE What will the following code display? System.out.printin(Tree.OAK) Tree.OAK 0 OAK Nothing. This statement will cause an error 2 points QUESTION 10 1. A deep copy of an object: Is an assignment of that object to another object. Is an operation that copies an aggregate object, and all the objects it references. Is a bogus term; it has no meaning. Is always a private method. 2 points QUESTION 11 1. To compare two objects in a class: Use the-operator, e.g. objeat!-object2. Write a method to do a byte-by-byte compare of the two objects. Write an equals method that will make a field by field compare of the two objects. Since objects consist of several fields, you cannot compare them. C 2 points QUESTION 12 1 The java.util package is automatically imported into all Java programs C True False 2 points QUESTION 13