Sunteți pe pagina 1din 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.

S-ar putea să vă placă și