adplus-dvertising
frame-decoration

Question

What is the output of this program?
    class output 
    {
        public static void main(String args[])
        { 
           String c = "  Hello World  ";
           String s = c.trim();
           System.out.println("\""+s+"\"");
        }
    }

a.

“”Hello World””

b.

“”Hello World”

c.

“Hello World”

d.

Hello world

Answer: (c).“Hello World”

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?