exam questions

Exam 1z0-829 All Questions

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

Exam 1z0-829 topic 1 question 33 discussion

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

Given:
and the code fragment:

What is the result?

  • A. Marketing
  • B. Marketing -

    Finance -
    Technical
  • C. Marketing -
    UnDefined
  • D. UnDefined
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
SrinivasJasti
2 weeks, 2 days ago
Selected Answer: A
The result of the dropWhile operation is unused because the method call is not assigned to a variable or consumed.
upvoted 1 times
...
xplorerpj
6 months, 3 weeks ago
Selected Answer: A
A is correct answer
upvoted 1 times
...
james2033
10 months, 4 weeks ago
Selected Answer: A
package q33; import java.util.Arrays; public class Q33 { public static void main(String[] args) { Arrays.stream(Desig.values()).dropWhile(s -> s.equals(Desig.CMO)); switch (Desig.valueOf("CMO")) { case CEO -> System.out.println("Executive"); case CMO -> System.out.println("Marketing"); case CFO -> System.out.println("Finance"); case CTO -> System.out.println("Technical"); default -> System.out.println("UnDefined"); } } } // Result: // Marketing
upvoted 3 times
...
supersquax
11 months, 2 weeks ago
A is correct, tested in online compiler.
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