06:28
0

Getting Prepared

To program with Java, you will need to begin by installing a JDK (Java Development Kit) and a JRE (Java Runtime Environment) from the Java website.
What is known as an ‘integrated development environment’  (IDE) is often used when learning and programming with particular languages.  This is a program that helps you program, the same way a word processor helps you word process.
To learn Java, it is a good idea to install a quality IDE like:
  1. Eclipse – a free, popular program. (Learn Java Programming Using Eclipse)
  2. Netbeans – another free program; it is open source and available in many languages.
  3. Jcreator – A for-pay program that provides a bit more power than most other IDEs.

As described in this Java course, once you install your IDE, you will need to begin a new file to program in.  Exactly how this is done will depend on your particular IDE.
When using Eclipse, for example, go to ‘File,’ then ‘New Java Project,’ and name your project.  Click Next twice, then click Finish.  Then, right-click on the Project folder in the upper left, hover over ‘New,’ then click ‘Class.’  Name your Class anything you want, such as ‘Application.’  Look for the box that has Eclipse ‘create the main method,’ and make sure that this is checked.
**Start Learning Java Now With This Training Course From Udemy**
see java tutorials to make you a genius

Walking Before You Run – Hello World!

The ‘Hello World!” program is a classic training program often used to help new students learn Java and other languages, you can learn about it in this lecture of a free Java course.
Once you have created your first Class, you should be looking at a text-editor type screen with some words already on it.  You will see the words ‘public class Application’ and, under that, the words ‘public static void’ with some words after that.  This second group of words is known as the ‘main method’, and it is what we will be focusing on.
Take note of the ‘{ }’ bracket symbols – you will be typing your code in between these.  Click under the main method, inside the brackets.
Then, type the following code -
  1. ‘System.out.println(“Hello World!”);’
This is known as a print statement.  It will cause the computer to print out whatever words or symbols are between the “ “ quotation marks within the parentheses.  Remember to include the semi-colon at the end – this is the signal that this particular line of code is done.
When you have finished typing, click the ‘Run’ button at the top of the screen, which is a green arrow.  You will see the output of the program in the box at the bottom of the screen.  If everything went right, it should say “Hello World!”  Ta Da!  You’ve created your first Java program, and are on your way to making your own applications and web codes.  Be sure to save your program.
LEARN COMPLETE JAVA TUTORIALS FOR ANDROID

0 comments:

Post a Comment