Question: (22). Using a single method name to execute diverse tasks is known as a. overriding b. overexecuting C. overloading d. overcompensating (23). If class Manager

(22). Using a single method name to execute diverse tasks is known as a. overriding b. overexecuting C. overloading d. overcompensating (23). If class Manager is a direct subclass of the class Employee, assume M is a Manger object and E is an Employee object, which of the following is valid a. M=E; b. E=M; c. M=(Manger)E; d. M=(Employee) E; (24). Which of the following expression refers the last element of array arr? a. arr[last) b. arr[length] c. arr[length - 1] d. arr[end] (25). Given the Java statement Random rand = new Random(); which of the following Java statements will generate a random integer between 2 and 5 is a. rand.nextInt(4)+2; b. rand.nextInt(5) +2; c. rand.nextInt() +2; d. rand.nextInt(2,5); III. Short answer questions (Select three out of four) 1. What is the result of the following Java code segment? Point pl = new Point (1,3); Point p2 = new Point(1,3); Point p3=p2; Answer: System.out.println(pl= =p2); System.out.println(p2= =p3); System.out.println(pl.equals(p3)); System.out.println(p2.equals(p3))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
