Tutorials Navigation

Tutorials: 17,828 Categories: 10
Total Tutorial Views: 34,354,358

Java Programming Tutorial 1 - The Basics

Tutorial Name: Java Programming Tutorial 1 - The Basics  

Category: PC Tutorials

Submitted By: Jimbo

Date Added:

Comments: 0

Views: 1,547

Related Forum: PC Building Forum


Jimbo's Java Class - Tutorial 1: The Basics

Hello and welcome to my Java Tutorial. I'm professor Jimbo, an IT student at the University of Central Florida experienced in programming especially Java. In this tutorial I'll be showing you guys the basics of Java and how to create your first Java project.

The Compiler & IDE

Before beginning this Java class provided by Professor Jimbo you must first download a compiler and an IDE. You may not know what this is though. So left's find out.

What is a compiler & IDE?

A compiler is a "a program that converts instructions into a machine-code or lower-level form so that they can be read and executed by a computer." and an IDE stands for integrated development environment which is a "software application that provides comprehensive facilities to computer programmers for software development."

List of IDEs

I personally prefer Eclipse but others prefer NetBeans. Those two are the major compilers of Java but there are others out there. For these tutorials I'll be using eclipse so I definitely suggest downloading it.

Eclipse: [ Register or Signin to view external links. ]
Netbeans: [ Register or Signin to view external links. ]
IntelliJ: [ Register or Signin to view external links. ]

These three are the best in the game. So pick one you'll like and stick with it. Like I said, I'll be using Eclipse. If you want something different then google another IDE. There are plenty more.

Getting Started

The following instructions are for ECLIPSE.

So your IDE should be downloaded and you're now ready to become a Java master. Open up your IDE and begin by creating a new Java project. To do this in Eclipse simply do File -> New -> Java Project.

If you're on Eclipse then you should now see this:

[ Register or Signin to view external links. ]

Set your settings up just like mine and then choose a name for your project name. I will be naming mine "TTG". You have now created a home for your first Java project. Next you're going to want to right click the project you just created and choose New -> Class.

Here's what the screen should now look like:

[ Register or Signin to view external links. ]

Do not worry about packages right now as that's more down the line. Simply make sure your settings are just like mine then choose a name for your class. I will call mine "Main".

It's now going to automatically generate this line of code:

[ Register or Signin to view external links. ]

For those that have never programmed before prepare to use a lot of brackets because they are the opening and closing points of your code. For now we're just going to do a simple program that displays "hello ttg" to the console.

Here's a step by step:

1. Start off by clicking on line 2 and either using this line as your starting point or hit enter to create a gap and start on line 3 instead. I prefer to have my code neat so I'll be doing the second option.

2. Type "public static void main(String[] args)" - I will explain this line of code later.

3. Directly after the closing parenthesis press space once to create a gap and then type "{" also known as an opening bracket and press enter. This should automatically create a closing bracket.

4. Inside these brackets go to line 4 and type "System.out.println("Hello TTG");" - this line of code will be explained later.

You're code should look like this or as long as it functions the same similar to it:

[ Register or Signin to view external links. ]

Now go to "Run" and click run or simply hit the green button with an arrow inside of it. This will then print to the console "Hello TTG" like the following:

[ Register or Signin to view external links. ]

If you see this in your console then you've completed your first Java project. But what do those line of codes mean? Find out in the next tutorial of Jimbo's Java Class where I will go more in depth of the basics as well as talk about variables.


Feel free to PM me here OR message me on the TTG Discord


Current rating: 8 by 4 users
Please take one second and rate this tutorial...

Not a Chance


"Java Programming Tutorial 1 - The Basics" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.