×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

What will be the output of following Java code (1)?

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

public class Main {
  public static void main(String[] args) {
    String str = "Hello";
    str = "Bye";
    System.out.println(str);
  }
}
  1. Hello
  2. Bye
  3. Error
  4. All of these

Answer: B) Bye

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.