- A Throws an exception as string and int are not compatible for addition
- B hellow9
- C 9hellow
- D Compilation error
Java Programming Language MCQ String in Java
⚠ Report ✓ Question Verified Copy Link
public class Test{
public static void main(String args[]){
String x = "hellow";
int y = 9;
System.out.println(x += y);
}
}
Learn More MCQ Questions from Java Programming Language MCQ String in Java