Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //java program only println
- package javaapplication1; //project name
- public class JavaApplication1 { //class name
- public static void main(String[] args) {
- //practice program 1
- System.out.println("This program prints the first lines\nof the song \"slots\".");
- System.out.println();
- System.out.println("\"She lives in a trailer\"");
- System.out.println("\"On the outskirts 'a Reno\"");
- System.out.println("\"She plays quarter slots in the locals casino.\"");
- System.out.println();
- System.out.println();
- System.out.println();
- //practice program 2
- System.out.println("A \"quoted\" String is\n'much' better if you learn\nthe rules of \"escape sequrnces.\"");
- System.out.println();
- System.out.println("Also, \"\" represents an empty string.");
- System.out.println("Don't forget to use \\\" instead of \" !");
- System.out.println("'' is not the same as \"");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement