exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 8 discussion

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

Given:

What is the result?

  • A. Compilation fails at line n1.
  • B. Initialized Started Initialized
  • C. Initialized Started
  • D. Compilation fails at line n2.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
Hirushi
Highly Voted 2 years ago
class Caller{ public void init() { //private void init() { System.out.println("Initialized"); } public void start(){ //private void start(){ init(); System.out.println("Started"); } } class TestCall{ public static void main(String[] args){ Caller c = new Caller(); c.start(); c.init(); } } Answer is A and D(bcz init and start are private methods). If both public answer will be B(Initialized Started Initialized)
upvoted 5 times
...
vic88
Most Recent 1 week, 6 days ago
Selected Answer: A
A and D.
upvoted 1 times
...
MPignaProTech
1 month, 4 weeks ago
Responses are A/D because they are private
upvoted 1 times
...
joeMP
2 months ago
Answers is A/D for methods init() and start() are private
upvoted 1 times
...
arjunrawatirissoftware
1 year, 2 months ago
Answer - A
upvoted 1 times
...
gg7495
1 year, 2 months ago
Answer is A and D Private methods are only accessible in the same class
upvoted 1 times
...
namaoo
1 year, 3 months ago
answer is A cannot access a private method
upvoted 1 times
...
jebril
1 year, 5 months ago
Selected Answer: A
Answer is a
upvoted 1 times
...
felipegomeztreufo
1 year, 6 months ago
AnswerA
upvoted 1 times
...
mrstevebang
1 year, 7 months ago
Selected Answer: A
The correct is A
upvoted 1 times
...
Vicky_65
1 year, 8 months ago
Selected Answer: A
compilation fails due to methods iniyt and start haveing private access
upvoted 1 times
...
tawa_z58
1 year, 10 months ago
Answer is A ,compilations fails at line n1 we choose or select where the error starts
upvoted 1 times
...
Ankit1010
1 year, 10 months ago
Compilation fails at line n1 and line n2. Since, both the methods are private and are not available outside the class. So, A and D are the correct answers.
upvoted 3 times
a_really_reliable_programmer
1 year, 3 months ago
Error pops up at line 1, since it's not a multiple choice, so A
upvoted 1 times
...
...
Def8
2 years, 1 month ago
Selected Answer: A
Answer should be both A and D since both of the methods have private access modifiers.
upvoted 1 times
...
carloswork
2 years, 1 month ago
Selected Answer: A
Answer is A. Tested.
upvoted 1 times
...
RoxyFoxy
2 years, 2 months ago
Selected Answer: A
Compilation fails at line n1 because start() has private access in Caller class. "Caller" class IS NOT an inner class because it can be seen from the code block in which the class is declared and IS NOT at the member level of the class TestCall (that is, at the same level as the instance variables, constructors, or methods).
upvoted 2 times
...
kkaayyyy
2 years, 3 months ago
A and D as the functions are private.
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