Oracle 1Z0-829 Exam (page: 1)
Oracle Java SE 17 Developer
Updated on: 28-Sep-2025

Viewing Page 1 of 11

Given the code fragments:



Which is true?

  1. The program prints t1 : 1: t2 : 1: t1 : t2 : 2 : in random order.
  2. The program prints t1 : 1 : t2: 1 : t1 : 2 : t2: 2:
  3. The program prints t1 : 1: t2 : 1: t1 : 1 : t2 : 1 : indefinitely
  4. The program prints an exception

Answer(s): B

Explanation:

The code creates two threads, t1 and t2, and starts them. The threads will print their names and the value of the Atomic Integer object, x, which is initially set to 1. The threads will then increment the value of x and print their names and the new value of x. Since the threads are started at the same time, the output will be in random order. However, the final output will always be t1 : 1 : t2: 1 : t1 : 2 : t2: 2:


Reference:

AtomicInteger (Java SE 17 & JDK 17) - Oracle



Which statement is true?

  1. IllegalStateException is thrown if a thread in waiting state is moved back to runnable.
  2. thread in waiting state consumes CPU cycles.
  3. A thread in waiting state must handle InterrupedException.
  4. After the timed wait expires, the waited thread moves to the terminated state.

Answer(s): C

Explanation:

A thread in waiting state is waiting for another thread to perform a particular action, such as calling notify() or notifyAll() on a shared object, or terminating a joined thread. A thread in waiting state can be interrupted by another thread, which will cause the waiting thread to throw an InterruptedException and return to the runnable state. Therefore, a thread in waiting state must handle InterruptedException, either by catching it or declaring it in the throws clause.


Reference:

Thread.State (Java SE 17 & JDK 17), [Thread (Java SE 17 & JDK 17)]



Given the code fragment:



Which code fragment invokes all callable objects in the workers set?









Answer(s): C

Explanation:

The code fragment in Option C invokes all callable objects in the workers set by using the ExecutorService's invokeAll() method. This method takes a collection of Callable objects and returns a list of Future objects representing the results of the tasks. The other options are incorrect because they either use the wrong method (invokeAny() or submit()) or have syntax errors (missing parentheses or semicolons).


Reference:

AbstractExecutorService (Java SE 17 & JDK 17) - Oracle



Given the code fragment:



What is the result?

  1. 81111
  2. 8109
  3. 777
  4. 71010
  5. 888
  6. 7107

Answer(s): B

Explanation:

The code fragment is creating a string variable "a" with the value "Hello! Java". Then, it is printing the index of "Java" in "a". Next, it is replacing "Hello!" with "Welcome!" in "a". Then, it is printing the index of "Java" in "a". Finally, it is creating a new StringBuilder object "b" with the value of "a" and printing the index of "Java" in "b". The output will be 8109 because the index of "Java" in "a" is 8, the index of "Java" in "a" after replacing "Hello!" with "Welcome!" is 10, and the index of "Java" in "b" is 9.


Reference:

Oracle Java SE 17 Developer source and documents: [String (Java SE 17 & JDK 17)], [StringBuilder (Java SE 17 & JDK 17)]



Given the code fragment:

  1. True:false:true:true
  2. True:true:false:false
  3. True:false:true:false
  4. True:false:false:false

Answer(s): C

Explanation:

The code fragment compares four pairs of strings using the equals() and intern() methods. The equals() method compares the content of two strings, while the intern() method returns a canonical representation of a string, which means that it returns a reference to an existing string with the same content in the string pool. The string pool is a memory area where strings are stored and reused to save space and improve performance. The results of the comparisons are as follows:
s1.equals(s2): This returns true because both s1 and s2 have the same content, "Hello Java 17". s1 == s2: This returns false because s1 and s2 are different objects with different references, even though they have the same content. The == operator compares the references of two objects, not their content.
s1.intern() == s2.intern(): This returns true because both s1.intern() and s2.intern() return a reference to the same string object in the string pool, which has the content "Hello Java 17". The intern() method ensures that there is only one copy of each distinct string value in the string pool. "Hello Java 17" == s2: This returns false because "Hello Java 17" is a string literal, which is automatically interned and stored in the string pool, while s2 is a string object created with the new operator, which is not interned by default and stored in the heap. Therefore, they have different references and are not equal using the == operator.


Reference:

String (Java SE 17 & JDK 17) - Oracle



Viewing Page 1 of 11



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

Matt 7/31/2025 11:44:40 PM

Great questions.
UNITED STATES


OLERATO 7/1/2025 5:44:14 AM

great dumps to practice for the exam
SOUTH AFRICA


Adekunle willaims 6/9/2025 7:37:29 AM

How reliable and relevant are these questions?? also i can see the last update here was January and definitely new questions would have emerged.
Anonymous


Alex 5/24/2025 12:54:15 AM

Can I trust to this source?
Anonymous


SPriyak 3/17/2025 11:08:37 AM

can you please provide the CBDA latest test preparation
UNITED STATES


Chandra 11/28/2024 7:17:38 AM

This is the best and only way of passing this exam as it is extremely hard. Good questions and valid dump.
INDIA


Sunak 1/25/2025 9:17:57 AM

Can I use this dumps when I am taking the exam? I mean does somebody look what tabs or windows I have opened ?
BULGARIA


Frank 2/15/2024 11:36:57 AM

Finally got a change to write this exam and pass it! Valid and accurate!
CANADA


Anonymous User 2/2/2024 6:42:12 PM

Upload this exam please!
Anonymous


Nicholas 2/2/2024 6:17:08 PM

Thank you for providing these questions. It helped me a lot with passing my exam.
Anonymous


Timi 8/19/2023 5:30:00 PM

my first attempt
UNITED KINGDOM


Blessious Phiri 8/13/2023 10:32:00 AM

very explainable
Anonymous


m7md ibrahim 5/26/2023 6:21:00 PM

i think answer of q 462 is variance analysis
Anonymous


Tehu 5/25/2023 12:25:00 PM

hi i need see questions
Anonymous


Ashfaq Nasir 1/17/2024 1:19:00 AM

best study material for exam
Anonymous


Roberto 11/27/2023 12:33:00 AM

very interesting repository
ITALY


Nale 9/18/2023 1:51:00 PM

american history 1
Anonymous


Tanvi 9/27/2023 4:02:00 AM

good level of questions
Anonymous


Boopathy 8/17/2023 1:03:00 AM

i need this dump kindly upload it
Anonymous


s_123 8/12/2023 4:28:00 PM

do we need c# coding to be az204 certified
Anonymous


Blessious Phiri 8/15/2023 3:38:00 PM

excellent topics covered
Anonymous


Manasa 12/5/2023 3:15:00 AM

are these really financial cloud questions and answers, seems these are basic admin question and answers
Anonymous


Not Robot 5/14/2023 5:33:00 PM

are these comments real
Anonymous


kriah 9/4/2023 10:44:00 PM

please upload the latest dumps
UNITED STATES


ed 12/17/2023 1:41:00 PM

a company runs its workloads on premises. the company wants to forecast the cost of running a large application on aws. which aws service or tool can the company use to obtain this information? pricing calculator ... the aws pricing calculator is primarily used for estimating future costs
UNITED STATES


Muru 12/29/2023 10:23:00 AM

looks interesting
Anonymous


Tech Lady 10/17/2023 12:36:00 PM

thanks! that’s amazing
Anonymous


Mike 8/20/2023 5:12:00 PM

the exam dumps are helping me get a solid foundation on the practical techniques and practices needed to be successful in the auditing world.
UNITED STATES


Nobody 9/18/2023 6:35:00 PM

q 14 should be dmz sever1 and notepad.exe why does note pad have a 443 connection
Anonymous


Muhammad Rawish Siddiqui 12/4/2023 12:17:00 PM

question # 108, correct answers are business growth and risk reduction.
SAUDI ARABIA


Emmah 7/29/2023 9:59:00 AM

are these valid chfi questions
KENYA


Mort 10/19/2023 7:09:00 PM

question: 162 should be dlp (b)
EUROPEAN UNION


Eknath 10/4/2023 1:21:00 AM

good exam questions
INDIA


Nizam 6/16/2023 7:29:00 AM

I have to say this is really close to real exam. Passed my exam with this.
EUROPEAN UNION