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

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

public class ConcatNull {
  public static void main(String[] args) {
    String str1 = "include";
    String str2 = "help";
    System.out.println(str1 + str2);
  }
}
  1. includehelp
  2. include
  3. help
  4. None of these

Answer: A) includehelp

Explanation:

In the above code, the "+" operator is concatenating both of the strings.

Comments and Discussions!

Load comments ↻






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