exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 94 discussion

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

Which two var declarations are correct? (Choose two.)

  • A. var names = new ArrayList<>();
  • B. var _ = 100;
  • C. var var = “hello”;
  • D. var y = null;
  • E. var a;
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
7 months, 2 weeks ago
A. it works var will infer the type of list to be ArrayList<Object> --- DE var can only be used when there is an initializer. var person = null; // ERROR --- C Ok var isn't keyword ----- B. failed as of release 9, '_' is a keyword, and may not be used as an identifier
upvoted 1 times
...
[Removed]
1 year, 5 months ago
var identifier is allowed, '_' is not allowed. Only var y = (String) null; for example is allowed SO A & C are correct.
upvoted 1 times
...
Stavok
1 year, 8 months ago
Selected Answer: AC
A and C are 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