1z0-829Free trialFree trial

By oracle
Aug, 2025

Verified

25Q per page

Question 1

Given the code fragment:

Image 1

and

Image 2

Which is true?

  • A: The program prints t1 : 1 : t2 : 1: t1 : 2 : t2 : 2 : in random order.
  • B: The program prints t1 : 1 : t2 : 1: t1 : 2 : t2 : 2 :
  • C: The program prints t1 : 1 : t2 : 1: t1 : 1 : t2 : 1 : indefinitely.
  • D: The program prints an exception.

Question 2

Given:

Image 1

What is the result?

  • A: Compilation fails.
  • B: there
  • C: hello
  • D: A NumberFormatException is thrown.

Question 3

Given the code fragment:

Image 1

Which set of class definitions compiles?

  • A: interface Story extends SInt {} interface Art extends SInt {}
  • B: public interface Story extends SInt {} public interface Art extends SInt {}
  • C: sealed interface Story extends SInt {} non-sealed class Art implements SInt {}
  • D: non-sealed interface Story extends SInt {} non-sealed interface Art extends SInt {}
  • E: non-sealed interface Story extends SInt {} class Art implements SInt {}

Question 4

Given:

Image 1

What is the result?

  • A: mA
  • B: mB mA
  • C: mB
  • D: mB mC

Question 5

Given the code fragment:

Image 1

What is the result?

  • A: ABBCDE // the order of elements is unpredictable
  • B: ABCDE
  • C: ABCDE // the order of elements is unpredictable
  • D: ADEABCB // the order of elements is unpredictable

Question 6

Given:

Image 1

What is the result?

  • A: {bicycle=7, car=7, motorcycle=7, truck=7}
  • B: {3:bicycle, 0:car, 6:motorcycle, 5:truck}
  • C: Compilation fails.
  • D: {bicycle=1, car=3, motorcycle=1, truck=2}
  • E: {bicycle, car, motorcycle, truck}

Question 7

Which statement is true about modules?

  • A: Only unnamed modules are on the module path.
  • B: Automatic and named modules are on the module path.
  • C: Only automatic modules are on the module path.
  • D: Only named modules are on the module path.
  • E: Automatic and unnamed modules are on the module path.

Question 8

Given the code fragment:

Image 1

Which code at line n1, obtains the java.io.Console object?

  • A: Console console = Console.getInstance();
  • B: Console console = System.console();
  • C: Console console = new Console(System.in);
  • D: Console console = new Console(new InputStreamReader(System.in));
  • E: Console console = System.console(System.in);

Question 9

Given the content of the in.txt file:
0123456789
and the code fragment:

Image 1

What is the content of the out.txt file?

  • A: 012345678
  • B: 01234567801234
  • C: 01234567
  • D: 0123456789
  • E: 012345678901234
  • F: 0123456789234567

Question 10

Given the code fragment:

Image 1

What is the result?

  • A: true:true:false:false
  • B: true:false:true:false
  • C: true:false:true:true
  • D: true:false:false:false

That’s the end of your free questions

You’ve reached the preview limit for 1z0-829

Consider upgrading to gain full access!

Page 1 of 2 • Questions 1-25 of 50

Free preview mode

Enjoy the free questions and consider upgrading to gain full access!