Pages

Pages

Write a program to print bellow statements in three lines James Gosling The father of the Java programming language.



// 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:

d:\>javac PrintAndPrintlnDemo.java

Execution:

d:\>java PrintAndPrintlnDemo

Out Put:

                James Gosling
The father of the
Java
programming language.

No comments:

Post a Comment