Oracle Java SE 21 Developer Professional 1z0-830 Question # 2 Topic 1 Discussion

Oracle Java SE 21 Developer Professional 1z0-830 Question # 2 Topic 1 Discussion

1z0-830 Exam Topic 1 Question 2 Discussion:
Question #: 2
Topic #: 1

Given:

java

String s = " ";

System.out.print("[" + s.strip());

s = " hello ";

System.out.print("," + s.strip());

s = "h i ";

System.out.print("," + s.strip() + "]");

What is printed?


A.

[ ,hello,h i]


B.

[,hello,h i]


C.

[,hello,hi]


D.

[ , hello ,hi ]


Get Premium 1z0-830 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.