Home / Questions / 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"));
Explanatory Question

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"));

👁 86 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation


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