exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 113 discussion

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

Given:



Which code fragment added to line 1 enables the code to compile and print Hello Joe?

  • A.
  • B.
  • C.
  • D.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
8 months ago
Selected Answer: C
answer: C D. failed new Greeting().greet("Joe"); A. failed interface could not be initialized B. failed static methods not allowed in the Inner class
upvoted 1 times
...
d7bb0b2
1 year ago
C IS CORRECT: a: INCOORECT GREET IS NOT A FIELD AND INTERFAZ CANNOT BE CREATE AS INSTANCE b: INCORRECT INNER CLASS NOT STATIC CANNOT HAVE STATIC METHOD D: STATIC CLASS CANNOT INSTANCIATED => new ExamTopics113.Greeting().greet("Joe"); => is correct
upvoted 1 times
...
Samps
1 year ago
C is correct. B is wrong because static is not allowed in methods in inner classes in Java 1. Tested
upvoted 1 times
...
Ashan_Ozlov
1 year, 3 months ago
Selected Answer: B
Both B and C work here! Tested
upvoted 1 times
...
dilleman
1 year, 4 months ago
B and C both works
upvoted 1 times
...
Stavok
1 year, 6 months ago
Selected Answer: C
C is correct Tested
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 ...