Question: What will the following program print when run? Select the one correct answer. (a) |WOW| (b) | W W| (c) |WO| (d) | W |
What will the following program print when run?

Select the one correct answer.
(a) |WOW|
(b) | W W|
(c) |WO|
(d) | W |
(e) The program will fail to compile.
(f) The program will compile, but throw an exception at runtime.
public class FunCharSeq { private static void puto (String s1) { s1.trim(); s1 s1 += "0"; } } public static void main (String [] args) { String s1 "W"; puto (s1); s1. concat ("W"); System.out.println ("1" + s1 + "|"); }
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
d The call to the putO method does no... View full answer
Get step-by-step solutions from verified subject matter experts
