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

.Java Extension. Remember When You Ran The Welcome Project Back in Class

The document discusses the basic components of a Java program, including a program header, class definition, and main method. It explains that the first program students created printed the message "Welcome to Java for Kids!" by using a println statement. It also notes that Java programs require semicolons and matching curly braces.

Uploaded by

Harry
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

.Java Extension. Remember When You Ran The Welcome Project Back in Class

The document discusses the basic components of a Java program, including a program header, class definition, and main method. It explains that the first program students created printed the message "Welcome to Java for Kids!" by using a println statement. It also notes that Java programs require semicolons and matching curly braces.

Uploaded by

Harry
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Remember when you ran the Welcome project back in Class 1?

When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension. Remember when you ran the Welcome project back in Class
1? When you
ran it, you saw a message that said Welcome to Java for Kids! in the output
window. The above line of code printed that message. In this line, System is
a class built into Java, out is the object of the class (referring to the output
window). The word println (pronounced print line) displays a single text
line. The text to be displayed is in double-quotes. Notice the statement ends
with a semicolon (;) – there are lots of semicolons in Java too! In this simple
example, the main method only has a single statement. Of course, later
examples will have many more statements. Methods are where Java
programs perform tasks. In addition to writing our own methods, you can use
any of the many methods built into the Java language. You will learn about
such methods as you progress through this course.
Following this line of code are two more lines, each with a right curly brace
(}). The first brace ends the main method, the second ends the class
definition. You will always need to make sure that every time you use a left
curly brace in a Java program, that there is a matching right curly brace.
Though this is a very short, very simple program, it illustrates the major
components in a Java program. You need a program header, a class
definition and a main method. And, you need to remember to save the class
file with the same name as used in the class definition. That file will have a
.java extension.

You might also like