Register   Login   About   Study   Enterprise   Share
Internet / AI Technology University (ITU/AITU)
Fast Login - available after registration







|

Top Links: >> 80. Technology >> Internet Technology Summit Program >> 1. Java Introduction
Current Topic: 1.2.2. The First Project and the First class
You have a privilege to create a quiz (QnA) related to this subject and obtain creativity score...
Open Eclipse and, when it will ask you to enter a WORKSPACE name, type: C:\ITS
Eclipse will create this directory for you and all your projects (that you create later) will be located in this directory.

Then, browse around the Welcome window and feel free to kill (close) the Welcome window. You can always read help pages any time later.

But now, we will create the very first project. Please pay close attention to the instructions as well as to illustrations.

Select the FILE option from the menu at the top and use the following choices:
FILE - NEW - PROJECT - Java Project.

Name the project as week1
Each week we will create a new project and we will name it by the week number. This will make an easy navigation for our future work. Go with the default options to finish creating the project.


After creating a project, take a look at the left pane. You will see the week1 project.
Click on the project to open and you will see the src directory. Do right-mouse click on the src-directory and create a new package day1.
Right-mouse click on the day1 and create the First class.



FirstClass
Follow the illustration below and type the public static void main(String[] args) {

Press ENTER and you will see that Eclipse provides for you the closing braces.
Type in between the braces you first source as:
System.out.println("Welcome to JavaSchool!");

This is your first source. Can you run it? What would it do?
Was it clear so far?

Place the mouse on the source page and do right-mouse click. Select RUN AS ? Java Application.

Eclipse will run it for you and you will see in the CONSOLE window that your program produces this sentence: Welcome to JavaSchool!
Done!!! Congratulations!

This note is for the case when this exercise did not go as smooth as expected. If you have a red exclamation sign ! near your project, the most probable cause is a disagreement between your two options in the project properties. Do right mouse click on the project name and select Properties at the bottom. On the Properties you will find two options: Java Build Path and Java Compiler. Make sure that both point to the same Java version.

And this is the illustration on how you run your first source with Run As - Java Application.



Assignments:

a) Create another class, with the name Second, under the same package day1.

b) Create the main method with several lines that will display the names of the levels in the course.
You will use the lines with System.out.println(?) ; Remember to provide quotes around the text you try to display. And remember to finish each line with the semicolon;

c) Do right-mouse click on the source and Run As ? Java Application. You should see how your program displays your lines in the CONSOLE window.

d) Try to misspell some program lines. You will see that Eclipse marked misspelled places with red.
Fix errors and Run As - Java Application again.

e) Optional Youtube video: https://www.youtube.com/watch?v=MgGtuamzWT0

There are very good "living lectures" here:
https://www.udemy.com/java-the-complete-java-developer-course/ - recommended as complementory
| Check Your Progress | Propose QnA | Have a question or comments for open discussion?

Have a suggestion? - shoot an email
Looking for something special? - Talk to me
Read: IT of the future: AI and Semantic Cloud Architecture | Fixing Education
Do you want to move from theory to practice and become a magician? Learn and work with us at Internet Technology University (ITU) - JavaSchool.com.

Technology that we offer and How this works: English | Spanish | Russian | French

Internet Technology University | JavaSchool.com | Copyrights © Since 1997 | All Rights Reserved
Patents: US10956676, US7032006, US7774751, US7966093, US8051026, US8863234
Including conversational semantic decision support systems (CSDS) and bringing us closer to The message from 2040
Privacy Policy