What is the output of the following piece of code? if(" String ".trim() == "String") System.out.println("Welcome"); else System.out.println("Good Bye");

  1. The code will compile and print "Welcome"

  2. The code will compile and print "Good Bye"

  3. The code will cause a compiler error

  4. None of the Above


Correct Option: B

Find more quizzes: