1z1-808 Exam Question 101

Given:

What is the result?
  • 1z1-808 Exam Question 102

    View the Exhibit.
    public class Hat {
    public int ID =0;
    public String name = "hat";
    public String size = "One Size Fit All";
    public String color="";
    public String getName() { return name; }
    public void setName(String name) {
    this.name = name;
    }
    }
    Given
    public class TestHat {
    public static void main(String[] args) {
    Hat blackCowboyHat = new Hat();
    }
    }
    Which statement sets the name of the Hat instance?
  • 1z1-808 Exam Question 103

    Given the code fragment:

    Which option represents the state of the num array after successful completion of the outer loop?
  • 1z1-808 Exam Question 104

    Given the code from the Greeting.Java file: Which set of commands prints Hello Duke in the console?

  • 1z1-808 Exam Question 105

    What should keyword1 and keyword2 be respectively, in oreder to produce output 2345?
    int [] array = {1,2,3,4,5};
    for (int i: array) {
    if ( i < 2) {
    keyword1 ;
    }
    System.out.println(i);
    if ( i == 3) {
    keyword2 ;
    }}