Unit 2: Using Objects
Showing 19 of 19 questions
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What does "Hello".substring(1, 4) return?
To compare the content of two String objects in Java, you should use:
What does "programming".indexOf("gram") return?
Which is the wrapper class for the primitive type int?
Which expression generates a random integer from 1 to 10 inclusive?
What happens when you call a method on a null reference?
Strings in Java are immutable. This means:
What does "apple".compareTo("banana") return?
What is the output of: System.out.println(2 + 3 + "hello" + 4 + 5);
What is the output? String s1 = "Hello"; String s2 = "Hello"; String s3 = new String("Hello"); System.out.println(s1 == s2); System.out.println(s1 == s3); System.out.println(s1.equals(s3));
Advertisement