exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 227 discussion

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

Given the code fragment:



What is the result?

  • A. 5
  • B. false
    6
  • C. –1
    5
  • D. –1
    –1
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
Corenetworks_2024
4 months, 3 weeks ago
Selected Answer: C
Correct answer is C: I think the code is wrong, maybe there was an space between Java an the, "Java the Great", so the correct answer would be C.
upvoted 1 times
...
pbbvr
1 year, 5 months ago
answer is -1 4
upvoted 2 times
...
sina_
1 year, 6 months ago
-1 4 is the out put
upvoted 1 times
...
jackymak
1 year, 6 months ago
output: -1 4 Code: public static void main(String[] args) { StringBuilder sObj = new StringBuilder("Java"); System.out.println(sObj.indexOf("the")); sObj.append("the Great"); System.out.println(sObj.indexOf("the")); }
upvoted 2 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