Oracle Java SE 8 Programmer I - 1z1-808 FREE EXAM DUMPS QUESTIONS & ANSWERS
Given the code fragment:

What is the result?

What is the result?
Correct Answer: C
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
Which of the following can fill in the blank in this code to make it compile?


Correct Answer: E
Vote an answer
Given:

And given the code fragment:

What is the result?

And given the code fragment:

What is the result?
Correct Answer: E
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
Given the code fragment:

What is the result?

What is the result?
Correct Answer: D
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
Given:
public class TestLoop {
public static void main(String[] args) {
int array[] = {0, 1, 2, 3, 4};
int key = 3;
for (int pos = 0; pos < array.length; ++pos) {
if (array[pos] == key) {
break;
}
}
System.out.print("Found " + key + "at " + pos);
}
}
What is the result?
public class TestLoop {
public static void main(String[] args) {
int array[] = {0, 1, 2, 3, 4};
int key = 3;
for (int pos = 0; pos < array.length; ++pos) {
if (array[pos] == key) {
break;
}
}
System.out.print("Found " + key + "at " + pos);
}
}
What is the result?
Correct Answer: A
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
Which two statements are true about Java byte code? (Choose two.)
Correct Answer: A,D
Vote an answer
Which statement will empty the contents of a StringBuilder variable named sb?
Correct Answer: D
Vote an answer
Given the code fragment:
public static void main(String[] args) {
int iArray[] = {65, 68, 69};
iArray[2] = iArray[0];
iArray[0] = iArray[1];
iArray[1] = iArray[2];
for (int element : iArray) {
System.out.print(element + " ");
}
public static void main(String[] args) {
int iArray[] = {65, 68, 69};
iArray[2] = iArray[0];
iArray[0] = iArray[1];
iArray[1] = iArray[2];
for (int element : iArray) {
System.out.print(element + " ");
}
Correct Answer: D
Vote an answer
Given:

What is the result?

What is the result?
Correct Answer: D
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
Given the code fragment:
String[] cartoons = {"tom","jerry","micky","tom"};
int counter =0;
if ("tom".equals(cartoons[0])) {
counter++;
} else if ("tom".equals(cartoons[1])) {
counter++;
} else if ("tom".equals(cartoons[2])) {
counter++;
} else if ("tom".equals(cartoons[3])) {
counter++;
}
System.out.print(counter);
What is the result?
String[] cartoons = {"tom","jerry","micky","tom"};
int counter =0;
if ("tom".equals(cartoons[0])) {
counter++;
} else if ("tom".equals(cartoons[1])) {
counter++;
} else if ("tom".equals(cartoons[2])) {
counter++;
} else if ("tom".equals(cartoons[3])) {
counter++;
}
System.out.print(counter);
What is the result?
Correct Answer: B
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).



