exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 17 discussion

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

Given:

and the code fragment:

Which three code fragments, at line n1, prints SPRING? (Choose three.)

  • A. System.out.println(Season.valueOf(“SPRING”).ordinal());
  • B. System.out.println(Season.values(1));
  • C. System.out.println(Season.SPRING);
  • D. System.out.println(Season.valueOf(“SPRING”));
  • E. System.out.println(Season.valueOf(‘s’));
  • F. System.out.println(sA[0]);
  • G. System.out.println(sA[1]);
Show Suggested Answer Hide Answer
Suggested Answer: CDG 🗳️

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
d7bb0b2
2 days, 19 hours ago
values metod, not aceptt parameters , B is incorrect, C D AND G CORRECT
upvoted 1 times
...
d7bb0b2
4 days, 12 hours ago
C,D AND E. is correct
upvoted 1 times
...
Stavok
6 months, 2 weeks ago
Selected Answer: CDG
ANSWER IS C,D & G
upvoted 1 times
...
Stavok
6 months, 2 weeks ago
Selected Answer: CDG
A prints 1 B produces an error : method values in enum Question17 cannot be applied to given types; E produces an error : no suitable method found for valueOf(char) F prints Winter
upvoted 2 times
...
JGR_77
8 months, 2 weeks ago
CDG System.out.println(Season.SPRING); System.out.println(Season.valueOf("SPRING")); System.out.println(sA[1]);
upvoted 3 times
...
Ankit1010
10 months, 1 week ago
C, D, G is the correct answer. System.out.println(sA[1]); System.out.println(Season.valueOf("SPRING")); System.out.println(Season.SPRING);
upvoted 2 times
...
RP384
10 months, 3 weeks ago
Selected Answer: CDG
cardinal will not print String, valueOf(c) will produce exception.
upvoted 2 times
...
Leksh_geeth
1 year, 1 month ago
Answer is CDG
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