1. WRITING YOUR FIRST JAVA
PROGRAM
This tutorial does NOT tell you how to install
the required tools for your computer. To
install these resources, use a Youtube video
2. Setting up your project
LOREM IPSUM DOLOR SIT AMET,
CONSECTETUER ADIPISCING ELIT.
NUNC VIVERRA IMPERDIET ENIM.
FUSCE EST. VIVAMUS A TELLUS.
PELLENTESQUE HABITANT MORBI
TRISTIQUE SENECTUS ET NETUS.
3. Setting up your project (2)
Things to note:
1.Name project HelloWorld
2.Create package inside of the src folder
3.Name that package Main
4.Create class HelloWorld
4. Your first
programs outline
This is the outline of your
program. The class is an outline
of your program. A class is
necessary for object-oriented
programming, which we will
cover soon. All code (beside
imports) will have to be in a
class.
5. Main Method
To get technical, the main method
is complex, and the meaning isn’t
very important unless you are
doing low level programming. The
method must look like this and
should not be changed. Although,
many of the keywords have
meaning and we will learn about
them soon. I know I keep saying
soon, but it takes time to learn
these skills.
Imagine the main method as the seats in your class. Students that are working sit
at their desk
6. Printing Text
1. System tells Java to set up its system controls
2. Out tells Java to display
3. Println is the function for displaying. It displays in the eclipse
consol.
4. Everything within the parenthesis are used for printing
5. The semicolon (Thing after parenthesis) is like a period at the end
of a sentence.
You can also use print instead of
println. Println puts a line after
the text is printed, so if you are
printing a lot of text, its not all
on the same line.
Also note that text must be in
quotations, unless your printing a
variable. This goes inside the main
method.
7. The End
Now I want you to try to write a
program with the following
requirements:
1. Only Uses the Print function.
(NOT Println)
2. Has spaces between lines
(Like Println)
3.Contains a backslash
After you do that then fill out
the forum on the left. These will
help you out later in this course
This forum will help with the project on the left