0% found this document useful (0 votes)
41 views

Java For Beginners NOTES!

The document provides an introduction to Java programming through a series of lessons on printing text, comments, and escaping characters. It explains how to write simple Java code to output text to the screen using System.out.println() and System.out.print(), how to add comments to code, and how to escape special characters when printing strings.

Uploaded by

ayush tyagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Java For Beginners NOTES!

The document provides an introduction to Java programming through a series of lessons on printing text, comments, and escaping characters. It explains how to write simple Java code to output text to the screen using System.out.println() and System.out.print(), how to add comments to code, and how to escape special characters when printing strings.

Uploaded by

ayush tyagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Java For Beginners

Notes!
1 - Your First Java Program! 3
Objective: Put text on screen 3
System.out.println("Hello world"); 3

2 - System.out.println() 4
Objective: Put text on screen another way 5
System.out.println("A"); 5
System.out.print("A"); 5

3 - Comments in Java 7
Objective: Write notes to our self, or disable code 7
// This is a comment! 7
/* This is 7
* also 7
*/ a comment! 7

4 - Escaping Characters in Java 9


Objective: Print quotes, backslashes, tabs and newlines! 9
System.out.println(“What do you mean \”stinky\””); 9
System.out.println(“The file is located at ~\\Desktop\\FunnyCatPics”); 9
System.out.println(“This is a tab \t!”); 9
System.out.println(“This \n is \n on \n multiple lines”); 9
I encourage you NOT to
memorize any code :)
Copy and paste from the
notes to see what each
piece of code does!
1 - Your First Java Program!

How To Code In Java - Java For Beginners 1 (2018)

Objective: Put text on screen

System.out.println("Hello world");
2 - System.out.println()

System.out.println - Java For Beginners 2 (With Examples)


Objective: Put text on screen another way

System.out.println("A");

System.out.print("A");
3 - Comments in Java

Comments In Java (PLUS TRICKS)

Objective: Write notes to our self, or disable code

// This is a comment!

/* This is

* also

*/ a comment!
4 - Escaping Characters in Java

Escaping Characters in Java (Tutorial)

Objective: Print quotes, backslashes, tabs and newlines!

System.out.println(“What do you mean \”stinky\””);

System.out.println(“The file is located at ~\\Desktop\\FunnyCatPics”);

System.out.println(“This is a tab \t!”);

System.out.println(“This \n is \n on \n multiple lines”);

You might also like