Give the output of the following:

String n = "Computer Knowledge.";  
String m = "Computer Applications";  
System.out.println(n.substring(0, 8).concat(m.substring(9)));  
System.out.println(n.endsWith("e"));

Short Answer
Views 10

Answer:


String n = "Computer Knowledge.";  
String m = "Computer Applications";  
System.out.println(n.substring(0, 8).concat(m.substring(9))); 
System.out.println(n.endsWith("e"));

Output:

  • Computer Applications
  • true

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.