Programming in Java Netbeans - A Step by Step Tutorial for Beginners
Welcome to this online tutorial on Programming in Java NetBeans. This tutorial will take you on step-by-step lessons covering specific topics in Java programming that are aimed at providing the fundamental skills needed for beginner programmers in Java.
The tutorial has simple explanations and includes copy and paste Java source code examples that are easy to follow. At the end of most lessons, exercises are provided to help the learner with more practice in Java programming.
If you would like more help on Java programming, you can send a mail on my profile page. I hope you shall find this tutorial being helpful. Please share, Pin it or Bookmark this tutorial to help others. You may also leave a comment here below.
Lesson 1 starts below after the Table of Contents.
Table of Contents
Lesson 1: Introduction to Java NetBeans IDE
Lesson 1: Introduction to Java NetBeans IDE
This tutorial is aimed at beginners who may wish to start their career as programmers in Java applications. The tutorial assumes no prior knowledge in Java programming language and contains step by step instructions which are easy to follow.
The first thing you need to do is to prepare the environment for developing Java applications. You need to install and setup Java Netbeans IDE (Integrated Development Environment).
Java NetBeans is the platform that you will to write your Java code and applications. Java NetBeans is one of the most popular Java Environment for developing Java applications. For the purpose of this tutorial, we are going to use Java NetBeans 7.
Java is increasingly becoming the world’s programming language of choice. It has been used in developing desktop applications, client-server applications and even mobile phone applications including games.
One major advantage of programming using Java is that Java is platform independent, that means when you write your application in Java it can run on any other environment e.g. Windows, Linux or Mac. This is so because Java has its own Runtime Environment popularly known as Java Virtual Machine (JVM).
You need to download JVM and install on your machine. Java is owned by Sun Microsystems so to download Java Virtual Machine and the Java Development Kit (JDK), you can download using this link.
Check first if you have Java Runtime Environment (JRE) in your machine by clicking the link "Do I have Java?" This link is under the big red “Free Java Download” button at the top of the page. The download may take time due to its big size (about 140MB).
How to install Java
1. Once you have downloaded the Java Virtual Machine (JVM) and Java Development Kit (JDK), install JVM first. (You can skip this step if you already have JVM in your machine).
2. Restart your machine and install Java Development Kit (JDK). Be patient as it may take some time before JDK is installed.
Select the location of where to install Java NetBeans
Java takes some time to install so be patient and don't interrupt.
There you go, Java Successfully installed!
After everything is installed and running correctly, now it is time to learn about Java programs. You will write your code in a text editor. In the NetBeans there is a code editor that you will use to write your code.
The Java code you are going to write is called a source code, and is saved with the file extension .java.
The source code is then compiled by another program called Javac and turned into a Java byte code that has a file extension .class if no errors are encountered. This class file is the one that is usually run on the Java Virtual Machine.
Don’t worry how you are going to do all these, once you write your source code in the Java code editor, Java will handle the code compiling and running of your program. Java will even alert you if there is an error.
Now, double click the NetBeans icon on your desktop to open the Java Netbeans IDE. You are ready now to start learning Java programming using NetBeans. Lets meet in Programming in Java Lesson 2.
- Programming In Java - A Step By Step Tutorial For Beginners: Lesson 9
In this lesson we shall learn how to use the Switch statement in Java programming. Switch statement is a selection statement, that means when used, it select one value among many values. Switch statement can also be used instead of IF .. ELSE ..
- Programming In Java - A Step By Step Tutorial For Beginners: Lesson 8
IF .. ELSE statement has two parts, one to cater for when condition is TRUE and another for when condition is FALSE.
- Programming In Java - A Step By Step Tutorial For Beginners: Lesson 2
In this lesson you will learn how to create your first Java project and how to interpret the NetBeans code editor window.
- Programming In Java - A Step By Step Tutorial For Beginners: Lesson 5
One of the useful classes that handle inputs from a user in Java is the Scanner class. The Scanner class is located in the util (utility) package of the Java library.
Want to make money online?
This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.
© 2012 Danson Wachira