exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 108 discussion

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

Given:



Which two methods facilitate valid ways to read instance fields? (Choose two.)

  • A. getCCount
  • B. getTCount
  • C. getACount
  • D. getGCount
  • E. getTotalCount
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

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
cathDev
3 months, 3 weeks ago
Selected Answer: AB
A and B are true
upvoted 1 times
...
d7bb0b2
6 months, 1 week ago
The correct answers is: A: return the value of c count, NOTE getTotalCount() is the sum of all fields (a+b+c +d), but getCount is retrive by aritmetic operation that getTotalCount() -a -b -g => then the value of c is B: return the value of tCount. NOT VALID: C-> retrieve the parameter value D-> throw a StackfOverflowExp.. E-> retrive thhe sum of all fields not a single value for some field
upvoted 1 times
...
duydn
8 months, 1 week ago
Selected Answer: BE
B & E are correct. code: int aCount; int tCount; int cCount; int gCount; int getAcount(int aCount) { return aCount; } int getTCount(int tCount){ return this.tCount; } int getGCount() { return getGCount(); } int getCCount() { return getTotalCount() - this.aCount - getTCount(0) - gCount; } int getTotalCount() { return aCount + getTCount(0) + this.cCount + this.gCount; }
upvoted 1 times
d7bb0b2
6 months, 1 week ago
getTotalCount cannot get a instance field, you get sum of all fields, but in getCcount you can get value of c count => getTotalCount() -a -b -g = ccount . E is not valid
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