Java Hello World Eclipse Tutorial
Автор: jasonv98
Загружено: 2015-12-26
Просмотров: 339
Описание:
I’m Jason V. Today, you’re going to take your first steps into learning Java.
Step 1: Print Hello World to the screen.
Step 2: Print the numbers one through ten.
Step 3: Print just the even numbers.
1) Print Hello World.
First, we are going to make a project called “Hello”. It’s going to hold our code.
Next, we go to the source folder and create a new class called “Hello”.
Click down here where it says “public static void main”. That’s our starting point function.
So all our code is going to go in the main function right here.
The command to print to the screen is “System.out.println”.
To run the code we press the green arrow above.
We can see the words Hello World in the console.
2) Print the numbers 1 to 10.
A for loop has 3 parts
Initializer – sets the initial value
Conditional – must be less than 10 for loop to continue
Increment – for each loop the value I will be increased by 1
Print to the screen with “System.out.println”
Let’s run it and see what happens.
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: