exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 69 discussion

Actual exam question from Oracle's 1z0-808
Question #: 69
Topic #: 1
[All 1z0-808 Questions]

Given the code fragment:

Which three code fragments can be independently inserted at line n1 to enable the code to print One? (Choose three.)

  • A. byte x = 1;
  • B. short x = 1;
  • C. String x = "1";
  • D. long x = 1;
  • E. double x = 1;
  • F. Integer x = new Integer("1");
Show Suggested Answer Hide Answer
Suggested Answer: ABF 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
CreazyyyyGirl
4 months, 3 weeks ago
ABF is correct
upvoted 1 times
...
Ankit1010
5 months, 3 weeks ago
A B F is correct switch accepts => 'char, byte, short, int, Character, Byte, Short, Integer, String, or an enum'
upvoted 4 times
...
RAADEL3IMLAK
6 months, 4 weeks ago
D is also correct long x = 1;
upvoted 1 times
Ru_H33
5 months, 1 week ago
Switch don't accept long .
upvoted 2 times
...
...
carloswork
9 months, 2 weeks ago
Selected Answer: ABF
Answer is ABF. Simple test: public static void main(String[] args) { Integer x = new Integer("1"); switch(x) { case 1: System.out.println("Integer"); break; default: System.out.println("Nothing"); } }
upvoted 1 times
...
UAK94
9 months, 3 weeks ago
ABF is correct.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago