exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 128 discussion

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

Given the code fragment:

Which three code fragments are valid at line n1? (Choose three.)
A.

B.

C.

D.

E.

Show Suggested Answer Hide Answer
Suggested Answer: ADE

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, 4 weeks ago
Valid fragment code are ADE
upvoted 1 times
...
TOPPSI
2 years ago
ADE are correct. B -> not possible to create an Object of abstract class. C-> need the keyword abstract that it would be valid
upvoted 1 times
...
akbiyik
2 years, 1 month ago
ADE Since the class Toy is a an abstract class, it is not instantiated. B is false. If a method doesn't have a body, it has an abstract keyword in its method signature. It is mandatory. C is false.
upvoted 1 times
...
UAK94
2 years, 3 months ago
ADE. abstract class Toy { int price; public static void insertToy() { // code } public int calculatePrice() { return price; } public abstract int computeDiscount(); }
upvoted 1 times
...
iSnover
2 years, 3 months ago
The correct answer is ADE: A -> Correct, a method for inserting the toy with the relevant assignments made. B -> Wrong, when placing final, it can only have one name, in case of value exchange it will give an error. C -> Wrong, printing a worthless toy will not have logic in the code. D -> Correct, you can calculate the price by returning the price. E -> Correct, you can compute a discount with the parameters.
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