What will be the output of the following code snippet: System.out.println("Java".concat("Programming"))?

  • Compilation Error
  • Java Programming
  • JavaProgramming
  • ProgrammingJava
The concat() method in Java combines two strings, and in this case, it appends "Programming" to "Java," resulting in "JavaProgramming." Therefore, the correct output is "JavaProgramming."
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *