String a = "Hello";
String b = "World";
System.out.println(a + " " + b);What is printed?
- A
Hello+World
- B
HelloWorld
- Ccheck_circle
Hello World
- D
Hello World
Explanation
The + operator concatenates the strings with a space in between.
AP Computer Science A· difficulty 2/5
String a = "Hello";
String b = "World";
System.out.println(a + " " + b);What is printed?
Hello+World
HelloWorld
Hello World
Hello World
Explanation
The + operator concatenates the strings with a space in between.
Want 10 more like this — adaptive to your weak spots?