Java can be downloaded from here. The package has both JDK (Java Development Kit) and NetBeans which is its default IDE (Integrated Development Environment). Note that it has versions for both MAC and Windows. So please choose the right version

also you will have to accept the agreement

There are instructions on the website, on the process of installation on all different operating systems. Follow the one according to the computer operating system that you are using.

Installing the Software Bundle on Microsoft Windows

Installing the Software

  1. Double-click the installer file to run the installer.
  2. At the Welcome page of the installation wizard, click Next.
  3. At the JUnit License Agreement page, decide if you want to install JUnit and click the appropriate option, click Next.
  4. At the JDK Installation page, specify which directory to install the JDK into and click Next.
  5. At the NetBeans IDE Installation page, do the following:
    1. Specify the directory for the NetBeans IDE installation.
    2. Accept the default JDK installation to use with the IDE.
  6. Click Next.
  7. Review the Summary page to ensure the software installation locations are correct.
  8. Click Install to begin the installation.
  9. At the Setup Complete page, provide anonymous usage data if desired, and click Finish.

 


 

The sub menu items include the following

CLI (Command Line Interface)

We will first Learn to use NetBeans as CLI. What it means is that the outputs will be displayed within the NetBeans interface and these applications will not run as separate windows.

  

GUI (Graphic User Interface)

We will now learn how NetBeans can be used to construct GUI. What it means is that the outputs will be displayed as applications that will run as separate windows.

 


We will discuss a few concepts now...

1. OOP (Object Oriented Programming)

To create an object in Java, you need a class. A class encapsulates the instance variables and methods that define an object. The act of creating an object is sometimes called instantiation, and objects themselves are sometimes called class instances. A class serves as a blueprint from which you can instantiate objects that contain the instance variables and methods defined by the class.

2. Public, Private and Static

  • A public variable is accessible from anywhere (well, anywhere where the class is accessible).

  • A private variable is only accessible inside the class.

  • A static variable belongs to the class rather than to an instance of a class.