Recents in Beach

Java Output

Print Text

Example:

System.out.println("Hello Guys, Welcome to my Blog");


Output:

Hello guys, Welcome to my Blog


Double Quotes

    When you are working with text, it must be wrapped inside double quotations marks "".

    System.out.println("Hello World");


Print() Method

    There is also a print() method, which is similar to println().

    The only difference is that it does not insert a new line at the end of the output:

    System.out.println("Hello World");


Print Number

    You can also use the println() method to print numbers.

    However, Unlike text, we don't put number inside double quotes:

    System.out.println(3);

    System.out.println(358);

    System.out.println(1234567);    

    System.out.println(3+2)

    System.out.println(3*2)


<- Java Syntex                                                                   Java Comment ->


Post a Comment

0 Comments