Question: (21). Overloaded methods cannot have the same___ a. name b. number of arguments c. number and type of arguments d. return type (22). Using a

(21). Overloaded methods cannot have the same___

a. name

b. number of arguments

c. number and type of arguments

d. return type

(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(6) +2;

d. rand.nextInt(2,5);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!