Free Oracle 1Z0-809 Exam Actual Questions

The questions for 1Z0-809 were last updated On Jan 19, 2025

Question No. 1

Given the code fragment:

List listVal = Arrays.asList(''Joe'', ''Paul'', ''Alice'', ''Tom'');

System.out.println (

// line n1

);

Which code fragment, when inserted at line n1, enables the code to print the count of string elements whose length is greater than three?

Show Answer Hide Answer
Correct Answer: A

Question No. 2

Given:

public enum USCurrency {

PENNY (1),

NICKLE(5),

DIME (10),

QUARTER(25);

private int value;

public USCurrency(int value) {

this.value = value;

}

public int getValue() {return value;}

}

public class Coin {

public static void main (String[] args) {

USCurrency usCoin =new USCurrency.DIME;

System.out.println(usCoin.getValue()):

}

}

Which two modifications enable the given code to compile? (Choose two.)

Show Answer Hide Answer
Correct Answer: B, C

Question No. 3

Given the code fragment:

Map books = new TreeMap<>();

books.put (1007, ''A'');

books.put (1002, ''C'');

books.put (1001, ''B'');

books.put (1003, ''B'');

System.out.println (books);

What is the result?

Show Answer Hide Answer
Correct Answer: B

Question No. 4

Which statement is true about the DriverManager class?

Show Answer Hide Answer
Correct Answer: A

The DriverManager returns an instance of Doctrine\DBAL\Connection which is a wrapper around the underlying driver connection (which is often a PDO instance).


Question No. 5

Given:

and the code fragment:

Which modification enables the code fragment to print Speaker?

Show Answer Hide Answer
Correct Answer: B