exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 7 discussion

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

Which three initialization statements are correct? (Choose three.)

  • A. int[][][] e = {{1,1,1},{2,2,2}};
  • B. short sh = (short)’A’;
  • C. float x = 1f;
  • D. byte b = 10;
    char c = b;
  • E. String contact# = “(+2) (999) (232)”;
  • F. int x = 12_34;
  • G. boolean false = (4 != 4);
Show Suggested Answer Hide Answer
Suggested Answer: CBF 🗳️

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
ASPushkin
2 months, 2 weeks ago
answer: BCF A. not right it is possible just without initialization like this int[][][] e = new int[1][3][]; B. correct short sh = 'A' without casting works as well Unicode value for 'A' is 65. So by a narrowing primitive conversion (§5.2) it doesn't require a casting operator. D. not right the byte is converted to an int via widening primitive conversion (§5.1.2), and then the resulting int is converted to a char by narrowing primitive conversion (§5.1.3). E. not right '#' can not be used as a variable name F. correct In Java 7 and above the underscore can be used in numeric literals G. not rigth true, false, and null are not keywords, but they are literals and reserved words that cannot be used as identifiers.
upvoted 1 times
ASPushkin
4 days, 20 hours ago
D. not right (jls se7 5.1.2) short to int, long, float, or double
upvoted 1 times
...
...
[Removed]
1 year, 3 months ago
Selected Answer: BCF
A is not a 3-Dimensional array D needs a cast to a char E is invalid identifier name G is invalid identifier name as false is a reserved word
upvoted 1 times
...
Stavok
1 year, 6 months ago
Selected Answer: BCF
BCF are correctt
upvoted 1 times
...
bharathdave
1 year, 7 months ago
BCF are the correct answers
upvoted 1 times
...
Ankit1010
1 year, 10 months ago
BCF are the correct answers
upvoted 2 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