โ† All 1Z0-819 Flashcard Decks

Java Fundamentals & Object-Oriented Programming Flashcards

7 cards from real 1Z0-819 practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Java Fundamentals & Object-Oriented Programming flashcards as text
  1. What is the output of: `System.out.println(10 / 3);`?

    Answer: 3

    Integer division truncates the decimal part, so 10 / 3 yields 3.

  2. Which keyword prevents a class from being subclassed in Java?

    Answer: final

    The `final` keyword on a class declaration prevents any other class from extending it.

  3. Given `String s = null; System.out.println(s instanceof String);`, what is printed?

    Answer: false

    `instanceof` always returns false when the left operand is null, without throwing an exception.

  4. Which access modifier makes a member visible only within its own class?

    Answer: private

    `private` restricts visibility strictly to the declaring class itself.

  5. What does the `super()` call inside a constructor do?

    Answer: Invokes the superclass constructor

    `super()` must be the first statement in a constructor and delegates to the matching superclass constructor.

  6. Which of the following is a valid declaration of a two-dimensional int array in Java?

    Answer: int[][] arr;

    The canonical style places both bracket pairs after the type: `int[][] arr;`.

  7. What is autoboxing in Java?

    Answer: Automatic conversion of a primitive to its wrapper type

    Autoboxing is the automatic conversion the compiler performs from a primitive (e.g., int) to its corresponding wrapper class (e.g., Integer).