A
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);
}
}
public static void main(String[] args) {
String str = "Hello";
str = "Bye";
System.out.println(str);
}
}
- Correct Answer - Option(B)
- Views: 8
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.