exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 58 discussion

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

Given this code for a Planet object:

What is the output?
A.

B.

C.

D.

E.

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
MPignaProTech
2 months, 2 weeks ago
Correct answer is B
upvoted 1 times
...
diptimayee
3 months ago
Answer is B
upvoted 2 times
...
MPignaProTech
3 months ago
Answer is B after verification
upvoted 1 times
...
gu_esposar
10 months, 1 week ago
THE ANSWER IS B
upvoted 1 times
...
mesonjesi
1 year, 2 months ago
ANSWER IS B
upvoted 1 times
...
fvelazqueznava
1 year, 3 months ago
ANSWER IS B
upvoted 1 times
...
Kolodets
1 year, 8 months ago
String and int implement toString method => will be printed well. array not
upvoted 1 times
...
Vicky_65
1 year, 9 months ago
Answer is B only.
upvoted 4 times
...
tawa_z58
1 year, 11 months ago
Correct answer is B .name and position are directly called .
upvoted 2 times
...
haisaco
2 years ago
Answer is B.
upvoted 3 times
...
akbiyik
2 years, 1 month ago
Answer is B.
upvoted 3 times
...
morgan3987
2 years, 2 months ago
Correct Answer:B
upvoted 3 times
...
carloswork
2 years, 2 months ago
Tested. Answer is B. Source code: public class Planet { public String name; public int moons; public Planet (String name, int moons) { this.name = name; this.moons = moons; } public static void main(String[] args) { Planet[] planets = { new Planet("Mercury",0), new Planet("Venus",0), new Planet("Earth",1), new Planet("Mars",2) }; System.out.println(planets); System.out.println(planets[2].name); System.out.println(planets[2].moons); } }
upvoted 3 times
...
kkaayyyy
2 years, 3 months ago
Solution is B.
upvoted 2 times
...
iSnover
2 years, 3 months ago
Correct is Letter B, because in the first line return with hash, but in the second and third line the object is called in the position directly, now return: Planets.Planet;hash Earth 1
upvoted 2 times
...
shivkumarx
2 years, 4 months ago
I've tested the code and I'm getting option B as answer
upvoted 4 times
shivkumarx
2 years, 3 months ago
Idk what I was smoking but this is clearly wrong
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