Home »
MCQs »
Java MCQs
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);
}
}
- includehelp
- include
- help
- None of these
Answer: A) includehelp
Explanation:
In the above code, the "+" operator is concatenating both of the strings.