READ Free Dumps For Oracle- 1z0-803
Question ID 21915 | Given the code fragment:
int [] [] array2D = {{0, 1, 2}, {3, 4, 5, 6}};
system.out.print (array2D[0].length+ "" );
system.out.print(array2D[1].getClass(). isArray() + ""); system.out.println (array2D[0][1]);
What is the result?
|
Option A | 3false1
|
Option B | 2true3
|
Option C | 2false3
|
Option D | 3true1
|
Option E | 3false3
|
Option F | 2true1
|
Correct Answer | D |
Explanation Explanation: The length of the element with index 0, {0, 1, 2}, is 3. Output: 3 The element with index 1, {3, 4, 5, 6}, is of type array. Output: true The element with index 0, {0, 1, 2} has the element with index 1: 1. Output: 1
Question ID 21916 | View the exhibit:
public class Student {
public String name = "";
public int age = 0;
public String major = "Undeclared";
public boolean fulltime = true;
public void display() {
System.out.println("Name: " + name + " Major: " + major); }
public boolean isFullTime() {
return fulltime;
}}
Given:
Public class TestStudent {
Public static void main(String[] args) {
For interactive and self-paced preparation of exam 1Z0-803, try our practice exams. Practice exams also
include self assessment and reporting features! www.selftestengine.com
Student bob = new Student ();
Student jian = new Student();
bob.name = "Bob";
bob.age = 19;
jian = bob; jian.name = "Jian";
System.out.println("Bob's Name: " + bob.name);
}}
What is the result when this program is executed?
|
Option A | Bob's Name: Bob
|
Option B | Bob's Name: Jian
|
Option C | Nothing prints
|
Option D | Bob's name
|
Correct Answer | B |
Explanation Explanation: After the statement jian = bob; the jian will reference the same object as bob.