Package JavaProgeam

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

package javaProgeam; public class Hello { public static void main(String[] args) { System.out.println("Hello, world!

"); } }

package javaProgeam; public class HelloAgain { public static void main(String[] args) { System.out.print("Hello,world!"); //Use double backslash to comment out System.out.print("Java\tlanguage\tis\tawesome!\n"); System.out.print("\tProgramming\t\tis\tfun!");//This is neat! } { // This program uses only ONE System.out.println() System.out.println("Hello, world!\n" + "Java\tlanguage\tis\tawesome!\n" + "\tProgramming\t\tis\tfun!"); } }

package javaProgeam; public class Thisismyquest { public static void main(String[]args) { System.out.print("This is my quest!"); //Use double backslash to comment out System.out.print("To\tfollow\tthe\t\tstar\n"); System.out.print("\tNo\tmatter\thow\thopeless");// } }

Result:
This is my quest!To No matter follow the how hopeless star

You might also like