Get Started Java

Get Started Java

Get Started Java

To start, Java we first have to know the hierarchy of the files involved to make a java program. Java programs or software are the integration of many modules or the packages. So, many programmers can contribute or work together for the single application.

The main files that are essential to start java program are 

  1. Project
  2. JRE System Library
  3. SRC
  4. Package
  5. Class

First, we have to make a project with its name and location. We can also use the default location or can browse the local location. If execution is not taking place smoothly then we can configure JRE as need. Project layout is the hierarchy that will be shown to us while working on the left side. Adding project working set only shows the selected part of a project which helps us to stay focused on it. Then new project is formed after clicking finish button.

JRE System Library is the bundle of all files to support execution and error handling of the program.

SRC is a folder of all modules or packages developed by the programmers.

A package is a wrap up of all the components in the single module which can execute independently.

A class is an encapsulation of all the data members, required functions and the main method to run (optional). Simply it is a java file with extension java. Here we programmers do all the coding.

 

The first program to display “My first java program”

public static void main(string args[]){

System.out.println(“My first java program”);

}

Introduction to Java

Learn Java

Developed by Sun Microsystems INC in 1991 and later acquired by Oracle Corporation. Developers: James Gosling and Patrick Naughton. Java is highly used for software development and more because it is simple to write as it supports HLL- High-Level Language and early checking of lots of possible errors. Moreover, it helps us to work in a team by creating modules of our software. Many devices can execute Java programs directly. If you want to learn java then you should know why Java is used and be familiar with its terminology

WHY JAVA?

Platform independent – is portable

Object-Oriented Language

Simple, because it excludes operator overloading, Multiple Inheritance, pointers and explicit memory allocation

Early Checking of possible errors which unlikely to be in other programming languages

Secure – because there are no pointers and is a robust language(checks errors previously)

Multithreading

Terminology

JVM – Java Virtual Machine

JDK – Java Development Kit

JRE – Java Runtime Environment

Well, Programmers like you and us write Java programs, then JDK compiles our program and gives bytecodes as output. Further, JVM executes the output of bytecode to give the real output of the program. So, it is important to install JDK first to start our java program.

JRE is a subset of JDK i.e. JDK includes JRE installed on a system which can run the java program but will be unable to compile it. And hence, you can only install JRE if you are non-programmers or don’t want to compile and debug the program.

Applet

An applet is a program in Java(TM) programming language to run within a web browser. Applets are compatible with the Java platform, such as HotJava (TM) or Netscape Navigator(TM).

Abstract Window Toolkit (AWT)

A collection of graphical user interface (GUI) components that were implemented using native-platform versions of the components. These components provide that subset of functionality which is common to all native platforms. Largely supplanted by the Project Swing component set. Frame, Buttons, TextField are some inbuilt components of AWT.

Swing Set

A collection of graphical user interface (GUI) components that run uniformly on any native platform which supports the Java(TM) virtual machine. Because they are written entirely in the Java programming language, these components may provide functionality above and beyond that provided by native-platform equivalents. (Contrast with AWT.) We can just add capital alphabet J as a prefix to AWT to use swing set. For example JFrame, JButtons, JTextField etc.

Technology Compatibility Kit (TCK)

A test suite, a set of tools, and other requirements used to certify an implementation of a particular Sun technology conformant both to the applicable specifications and to Sun or Sun-designated reference implementations.

 

 

 

 

Facebook