Oracle 1Z0-809 Exam (page: 4)
Oracle Java SE 8 Programmer II
Updated on: 28-Nov-2025

Viewing Page 4 of 35

Given the code fragment:
Map<Integer, String> 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?

  1. {1007 = A, 1002 = C, 1001 = B, 1003 = B}
  2. {1001 = B, 1002 = C, 1003 = B, 1007 = A}
  3. {1002 = C, 1003 = B, 1007 = A}
  4. {1007 = A, 1001 = B, 1003 = B, 1002 = C}

Answer(s): B


Reference:

TreeMap inherits SortedMap and automatically sorts the element's key



Given:

class Book {
int id;
String name;
public Book (int id, String name) {
this.id = id;
this.name = name;
}
public boolean equals (Object obj) { //line n1
boolean output = false;
Book b = (Book) obj;
if (this.name.equals(b name))}
output = true;
}
return output;
}
}

and the code fragment:

Book b1 = new Book (101, “Java Programing”);
Book b2 = new Book (102, “Java Programing”);
System.out.println (b1.equals(b2)); //line n2

Which statement is true?

  1. The program prints true.
  2. The program prints false.
  3. A compilation error occurs. To ensure successful compilation, replace line n1 with:
    boolean equals (Book obj) {
  4. A compilation error occurs. To ensure successful compilation, replace line n2 with:
    System.out.println (b1.equals((Object) b2));

Answer(s): A



Given the content of /resourses/Message.properties:
welcome1=”Good day!”

and given the code fragment:

Properties prop = new Properties ();
FileInputStream fis = new FileInputStream (“/resources/Message.properties”);
prop.load(fis);
System.out.println(prop.getProperty(“welcome1”));
System.out.println(prop.getProperty(“welcome2”, “Test”));//line n1
System.out.println(prop.getProperty(“welcome3”));

What is the result?

  1. Good day!
    Test
    followed by an Exception stack trace
  2. Good day!
    followed by an Exception stack trace
  3. Good day! Test null
  4. A compilation error occurs at line n1.

Answer(s): C



Which action can be used to load a database driver by using JDBC3.0?

  1. Add the driver class to the META-INF/services folder of the JAR file.
  2. Include the JDBC driver class in a jdbc.properties file.
  3. Use the java.lang.Class.forName method to load the driver class.
  4. Use the DriverManager.getDriver method to load the driver class.

Answer(s): C



Given the code fragment:
Path p1 = Paths.get(“/Pics/MyPic.jpeg”);
System.out.println (p1.getNameCount() +
“:” + p1.getName(1) +
“:” + p1.getFileName());

Assume that the Pics directory does NOT exist. What is the result?

  1. An exception is thrown at run time.
  2. 2:MyPic.jpeg: MyPic.jpeg
  3. 1:Pics:/Pics/ MyPic.jpeg
  4. 2:Pics: MyPic.jpeg

Answer(s): B



Viewing Page 4 of 35



Share your comments for Oracle 1Z0-809 exam with other users:

Chinna 7/30/2023 8:37:00 AM

need safe rte dumps
FRANCE


1234 6/30/2023 3:40:00 AM

can you upload the cis - cpg dumps
Anonymous


Did 1/12/2024 3:01:00 AM

q6 = 1. download odt application 2. create a configuration file (xml) 3. setup.exe /download to download the installation files 4. setup.exe /configure to deploy the application
FRANCE


John 10/12/2023 12:30:00 PM

great material
Anonymous


Dinesh 8/1/2023 2:26:00 PM

could you please upload sap c_arsor_2302 questions? it will be very much helpful.
Anonymous


LBert 6/19/2023 10:23:00 AM

vraag 20c: rsa veilig voor symmtrische cryptografie? antwoord c is toch fout. rsa is voor asymmetrische cryptogafie??
NETHERLANDS


g 12/22/2023 1:51:00 PM

so far good
UNITED STATES


Milos 8/4/2023 9:33:00 AM

question 31 has obviously wrong answers. tls and ssl are used to encrypt data at transit, not at rest.
Serbia And Montenegro


Diksha 9/25/2023 2:32:00 AM

pls provide dump for 1z0-1080-23 planning exams
Anonymous


H 7/17/2023 4:28:00 AM

could you please upload the exam?
Anonymous


Anonymous 9/14/2023 4:47:00 AM

please upload this
UNITED STATES


Naveena 1/13/2024 9:55:00 AM

good material
Anonymous


WildWilly 1/19/2024 10:43:00 AM

lets see if this is good stuff...
Anonymous


Lavanya 11/2/2023 1:53:00 AM

useful information
UNITED STATES


Moussa 12/12/2023 5:52:00 AM

intéressant
BURKINA FASO


Madan 6/22/2023 9:22:00 AM

thank you for making the interactive questions
Anonymous


Vavz 11/2/2023 6:51:00 AM

questions are accurate
Anonymous


Su 11/23/2023 4:34:00 AM

i need questions/dumps for this exam.
Anonymous


LuvSN 7/16/2023 11:19:00 AM

i need this exam, when will it be uploaded
ROMANIA


Mihai 7/19/2023 12:03:00 PM

i need the dumps !
Anonymous


Wafa 11/13/2023 3:06:00 AM

very helpful
Anonymous


Alokit 7/3/2023 2:13:00 PM

good source
Anonymous


Show-Stopper 7/27/2022 11:19:00 PM

my 3rd test and passed on first try. hats off to this brain dumps site.
UNITED STATES


Michelle 6/23/2023 4:06:00 AM

please upload it
Anonymous


Lele 11/20/2023 11:55:00 AM

does anybody know if are these real exam questions?
EUROPEAN UNION


Girish Jain 10/9/2023 12:01:00 PM

are these questions similar to actual questions in the exam? because they seem to be too easy
Anonymous


Phil 12/8/2022 11:16:00 PM

i have a lot of experience but what comes in the exam is totally different from the practical day to day tasks. so i thought i would rather rely on these brain dumps rather failing the exam.
GERMANY


BV 6/8/2023 4:35:00 AM

good questions
NETHERLANDS


krishna 12/19/2023 2:05:00 AM

valied exam dumps. they were very helpful and i got a pretty good score. i am very grateful for this service and exam questions
Anonymous


Pie 9/3/2023 4:56:00 AM

will it help?
INDIA


Lucio 10/6/2023 1:45:00 PM

very useful to verify knowledge before exam
POLAND


Ajay 5/17/2023 4:54:00 AM

good stuffs
Anonymous


TestPD1 8/10/2023 12:19:00 PM

question 17 : responses arent b and c ?
EUROPEAN UNION


Nhlanhla 12/13/2023 5:26:00 AM

just passed the exam on my first try using these dumps.
Anonymous