1z0-811 Java Foundations

Loading demo links...

Showing 1–3 of 10 questions

Question 1

Given the code fragment:

Which two code fragments are valid at line 2?

Select all that apply, then click Submit answer.

  • for (int count = 0; count < 5; count++) {
    System.out.print(count);
    }

  • package p1;

  • import java.util.*; public void display() { List nums = new ArrayList<> ();
    }

  • {
    private int num;
    }

  • private String name = “John”;
    public void display() { System.out.print(name);
    }

Question 2

Which two statements are true about the Java Runtime Environment (JRE)?

Select all that apply, then click Submit answer.

  • It is responsible for garbage collection.

  • It interprets bytecode stored in a .class file.

  • It contains the JDK and Java APIs.

  • It is platform independent.

  • You must install the JRE to compile a .java file.

Question 3

Identify three features of the Java programming language.

Select all that apply, then click Submit answer.

  • distributed

  • direct memory management

  • multithreaded

  • strongly typed

  • dynamically typed