exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 115 discussion

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

Given this class:

And given this main method, located in another class:

Which three pieces of code, when inserted independently, set the value of amount to 100? (Choose three.)
A.

B.

C.

D.

E.

F.

Show Suggested Answer Hide Answer
Suggested Answer: CDE

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
3 months ago
Correct Answer is ADE
upvoted 2 times
...
namaoo
1 year, 4 months ago
ADE is the answer
upvoted 1 times
...
IbrahimAlnutayfi
1 year, 6 months ago
The answer is ADE
upvoted 1 times
...
akbiyik
2 years, 1 month ago
ADE is correct. amount is not accessible in the main method without a instance of CheckingAccount. It is not a static variable.
upvoted 1 times
...
carloswork
2 years, 2 months ago
Answer is ADE. To test, uncomment each option separately. public class CheckingAccount { public int amount; /* line n1 - Option A public CheckingAccount() { // Constructor amount = 100; } */ /* line n1 - Option D public CheckingAccount() { // Constructor this.amount = 100; } */ public static void main(String[] args) { CheckingAccount acct = new CheckingAccount(); /* line n2 - Option E */ //acct.amount = 100; System.out.println(acct.amount); } // fim da classe main }// fim da classe CheckingAccount
upvoted 2 times
...
iSnover
2 years, 3 months ago
Correct is ADE. In letter C, a new variable was created with the value of 100 and nothing was assigned to the CheckingAccount object
upvoted 2 times
...
shivkumarx
2 years, 3 months ago
Answer is ADE
upvoted 3 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