Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Oracle 1z0-819 - Java SE 11 Developer

Page: 2 / 9
Total 296 questions

Given:

Which two independent changes will make the Main class compile? (Choose two.)

A.

Move the entire Student class declaration to a separate Java file, Student.java.

B.

Change line 2 to public Student(String classname).

C.

Change line 1 to public class Student {.

D.

Change line 3 to Student student = new Student(“Biology”);.

E.

Change line 1 to static class Student {.

Given the code fragment from Box. Java:

Given the code fragment from item.java:

Given the information:

The classes Box and items are encapsulated with getters and setters methods. The classes Box and Item contains required constructors source code.

and the code fragment:

Which action serializes the b1 object?

A.

Handle NoteSerilaizeableException in the try clause or throw in the main() method definition.

B.

Remove out.flush () method invocation.

C.

Implement the Serializable interface in the item class.

D.

Override readObject () and writeObject () method in the Book class.

E.

Add SerialVersionID to the Box and item class

Given:

What is known about the Sportscar class?

A.

The Sportscar class is a subclass of Automobile and inherits its methods.

B.

The Sportscar subclass cannot override setTurbo method from the superclass Automobile.

C.

The Sportscar class is a superclass that has more functionality than the Automobile class.

D.

The Sportscar class inherits the setTurbo method from the superclass Automobile.

Given the code fragment:

What should be inserted at line n1 so that the code fragment prints Name is required?

A.

name.trim() == '' ''

B name, isBlanl ()

B.

name. compareTo('' '') == 0

C.

name.isEmpty

What change will cause the code to compile successfully?

A.

Insert PriceChecker (?) prod on line 1.

B.

Insert PriceChecker <> prod on line 1.

C.

Insert PriceChecker prod on line 1.

D.

Insert PriceChecker prod on line 1.

Given:

What is the result?

A.

WorkingUnknown

B.

Unknown

C.

TuesdayUnknown

D.

The compilation fails.

E.

Tuesday

F.

Working

Given:

What is the output?

A.

Short value 25

B.

The compilation fails due to an error in line 1.

C.

Byte value 25

D.

Object value 25

Given:

If file "App.config" is not found, what is the result?

A.

Configuration is OK

B.

The compilation fails.

C.

Exception in thread "main" java.lang.Error:Fatal Error: Configuration File, App.config, is missing.

D.

nothing

Given:

What is the result?

A.

4

B.

3

C.

An exception is thrown at runtime.

D.

5

What is the result?

A.

9001: java.io.FileNotFoundException: MyFile.txt-MyFile.txt

B.

9001: APPLICATION ERROR-9001-MyFile.txt

9001: java.io.FileNotFoundException: MyFile.txt-MyFile.txt

C.

9001: APPLICATION ERROR-9001-MyFile.txt

D.

Compilations fails at Line 1.