Write a program to print bellow statements in three lines James Gosling The father of the Java programming language.
0
// Write a program to print bellow statements in three lines
//James Gosling The father of the Java programming language.
/* o/p: James Gosling
The father of the
Java
programming language. */
class PrintAndPrintlnDemo{
public static void main(String[] args){
System.out.print("James ");
System.out.println("Gosling");
System.out.print("The ");
System.out.println("father of the ");
System.out.println("Java");
System.out.print("programming ");
System.out.print("language. ");
}
compilation://James Gosling The father of the Java programming language.
/* o/p: James Gosling
The father of the
Java
programming language. */
class PrintAndPrintlnDemo{
public static void main(String[] args){
System.out.print("James ");
System.out.println("Gosling");
System.out.print("The ");
System.out.println("father of the ");
System.out.println("Java");
System.out.print("programming ");
System.out.print("language. ");
}
d:\>javac PrintAndPrintlnDemo.java
Execution:
d:\>java PrintAndPrintlnDemo
Out Put:
James Gosling
The father of the
Java
programming language.
0 comments: