Tuesday, 31 October 2017

java very important output problems and solution



Question 05:
Show the output of the following .
String i="java";
     System.out.println("Welcome to "+i);

Output
Welcome to java

Question 06:
Show the output of the following .

   String i="java";
     System.out.printf("Welcome to %s",i);

Output
Welcome to java

No comments:

Post a Comment