A

Admin • 825.56K Points
Coach

Q. What will be the output of following Java code?

Code:
public class Main {
public static void main(String[] args) {
String str = "Hello";
str = "Bye";
System.out.println(str);
}
}
  • (A) Hello
  • (B) Bye
  • (C) Error
  • (D) All of these
  • Correct Answer - Option(B)
  • Views: 8
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.