Question 41 · 200 in bank
Select 2Which two statements are true about Java byte code? (Choose two.)
Show answer
Answer: AE
Java SE 8 Programmer I200 questions across 20 pages are complete and free, with no account or card.
200 questions in this bank
Free access · progress saved on this device
Which two statements are true about Java byte code? (Choose two.)
Answer: AE
Which is true about the switch statement?
Answer: B
Given the code fragment:
What is the result?
Answer: D
The answer is the letter D, you don't have to go far, both the initial value of the variable "i" and "j" receive the length -1 and the matrix is 2x2. As java indexes from 0 and length is 2, the first number to be printed is 4 which is in position [1][1] of the array and only the letter D has 4 as the first. Don't even waste time doing the rest, in the OCA test they put distractors just for you to spend more time on the question, and having additional time is like gold in this exam.
Source: Adapted from community discussion — iSnover
Given:
What is the result?
Answer: A

Given this segment of code:
Which two statements, if either were true, would make the code compile? (Choose two.)
Answer: BC
Given the code fragments:

What is the result?
Answer: B
Given:
And given the code fragment:
What is the result?
Answer: C
Result of below code is: 20:20 public class A2 { int x; A2(){ this(10); } A2( int x){ this.x = x; } public static void main(String[] args) { A2 y = new Car(20); System.out.println(y); } } class Car extends A2{ int y; Car(){ super(10); } Car(int y){ super(y); this.y = y; } public String toString() { return super.x + ":" + this.y; } }
Source: Adapted from community discussion — shivkumarx
Given the code fragment:
What is the result?
Answer: B
The answer is B, always remember that Date is immutable, in the third line there was an addition of 10 days in "date" but no variable received this value so the operation was lost there and didn't record anything. And in the print will appear the original date of the variable "date".
Source: Adapted from community discussion — iSnover
Given:
What is the result?
Answer: A
The answer is A, when the "++" comes after the variable, the value is added after the line or parentheses as in "x++", but when the "++" comes before the variable, the value is added on the fly as in "++y" then inside the condition we had 1 < 2, giving true and printing Hello on the last line as the two variables already had their value added +1, printed on the screen Hello Log 2:2.
Source: Adapted from community discussion — iSnover
Which statement best describes encapsulation?
Answer: A
Keyboard:J Kmove between questionsA–Dselect an answerRshow or hide the answer← →change page
1Z0-808 practice, question 41. 200 questions available.
Version 1.0.0. How we source questions