Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 1z0-808 topic 1 question 1 discussion

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

Given:

What is the result?

  • A. 200.0 : 100.0
  • B. 400.0 : 200.0
  • C. 400.0 : 100.0
  • D. Compilation fails.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
hyodaeun
Highly Voted 5 years, 3 months ago
Answer is c
upvoted 14 times
...
see_meee_johnson
Most Recent 2 weeks ago
Answer - (c) as newPrice variable is not getting updated. The instance variable price is getting updated https://shorter.me/JavaSE8ProgrammerI
upvoted 2 times
...
nolewey
2 months ago
Answer - (c) as newPrice variable is not getting updated. The instance variable price is getting updated https://rb.gy/jib8ni
upvoted 1 times
...
nuray
3 months ago
Selected Answer: A
A. 200.0 : 100.0
upvoted 1 times
...
Dibya17
3 months, 3 weeks ago
Answer is C
upvoted 1 times
...
YukiSatoh
6 months, 4 weeks ago
Selected Answer: C
upvoted 1 times
...
gg7495
7 months, 3 weeks ago
Selected Answer: C
Answer - (c) as newPrice variable is not getting updated. The instance variable price is getting updated
upvoted 1 times
...
Ondo
7 months, 3 weeks ago
Réponse C
upvoted 1 times
...
veer684
8 months, 1 week ago
Answer is C
upvoted 1 times
...
DriftKing
8 months, 1 week ago
Selected Answer: C
Tested. Answer is C: 400.0 : 100.0 class Product{ double price; } public class Test { public void updatePrice(Product product, double price){ price = price*2; product.price = product.price + price; } public static void main(String args[]) { Product prt = new Product(); prt.price = 200; double newPrice = 100; Test t = new Test(); t.updatePrice(prt, newPrice); System.out.println(prt.price+ " : "+newPrice); } }
upvoted 1 times
...
Sezam
8 months, 3 weeks ago
Selected Answer: C
Answer is C
upvoted 1 times
...
dsms
8 months, 4 weeks ago
Selected Answer: C
Answer is: 400.0 : 100.0
upvoted 1 times
...
Thando_4
10 months ago
Answer is C
upvoted 1 times
...
NabilBenAsker
10 months, 1 week ago
Selected Answer: C
Answer is C
upvoted 1 times
...
felipegomeztreufo
11 months, 2 weeks ago
Answer is C
upvoted 1 times
...
Vicky_65
1 year, 1 month ago
Selected Answer: C
Answer is C
upvoted 1 times
...
masloa
1 year, 1 month ago
Selected Answer: C
Objects are pass by reference, primitives passed by value
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 ...