Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

Given:

What is the result?

A.

Vehicle Bus

B.

Bus

Vehicle

C.

Bus

D.

The program doesn’t print anything

Given:

What is the result?

A.

A B C D

B.

A C D

C.

A C D D

D.

A B D

E.

A B D C

Examine the given definitions:

and the code fragment:

Which statement is true about the implementation of Object-Oriented Programming concepts in the given code?

A.

Polymorphism, abstraction, and encapsulation are implemented.

B.

Only polymorphism and inheritance are implemented.

C.

Polymorphism, inheritance, and abstraction are implemented.

D.

Only inheritance and encapsulation are implemented.

Which statement is true about the switch statement?

A.

It must contain the default section.

B.

The break statement, at the end of each case block, is mandatory.

C.

Its case label literals can be changed at runtime.

D.

Its expression must evaluate to a single value.

Which two code fragments cause compilation errors? (Choose two.)

A.

double y1 = 203.22; float fit = y1;

B.

float fit = (float) 1_11.00;

C.

Float fit = 100.00;

D.

int y2 = 100;

float fit = (float) y2;

E.

float fit = 100.00F;

Given the code fragments:

Which code fragment, when inserted at line n1, enables the code to print Hank?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given the code fragment:

What is the result?

A.

Sum is 600

B.

Compilation fails at line n1.

C.

Compilation fails at line n2.

D.

A ClassCastException is thrown at line n1.

E.

A ClassCastException is thrown at line n2.

Given:

And given the code fragment:

What is the result?

A.

Compilation fails at line n2.

B.

Compilation fails at line n1.

C.

20:20

D.

10:20

Which statement best describes encapsulation?

A.

Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects.

B.

Encapsulation ensures that classes can be designed so that their methods are inheritable.

C.

Encapsulation ensures that classes can be designed with some fields and methods declared as abstract.

D.

Encapsulation ensures that classes can be designed so that if a method has an argument MyType x, any subclass of MyType can be passed to that method.

Given:

What is the result?

A.

200.0 : 100.0

B.

400.0 : 200.0

C.

400.0 : 100.0

D.

Compilation fails.