131k views
19 votes
Consider the following code segment.

System.out.println("W");
System.out.println("X");
System.out.print("Y");
System.out.print("Z");
What is printed as a result of executing the code segment?

1 Answer

9 votes

Answer:

W

X

After that an error would print and error

Step-by-step explanation:

the last two statements are missing "ln"

User Anna Skoulikari
by
4.8k points