Menu

Beanzilla

Never give up, Never surrender

Java Essentials: Print, Print new line, Print a variable, Print plus variable.

PrintPrinty is a Intro to Java Tutorial File...

To run on your own machine to see the results, (Reccomend installing BlueJ) then copy and compile then Right click and select "void Main()".

Create a new file and copy the code below.

/**

 * @author Beanzilla

 * @version 1.01

 */

public class PrintPrinty

{

    public static void Main()

    {

        System.out.print("Print");                          // Prints on the same line.

        System.out.println("Printy");                     // Prints then creates a new line.

        String Printy = "Printy";                            // We will learn about data types later. (Next Script)

        System.out.println("Print" + Printy);         // Prints "Print" adding what the variable Printy contains.

    } // End of Method

} // End of Class

Written by Bzy on Sunday November 13, 2016

Permalink -

« November 2016: News! - Java Essentials: Data Types, Variables. »

Related content