JavaClassCode.com

facebook twitter googleplus

Java Tutorial

Java Introduction Keywords and Identifier Variables and Constants C Data Types C Input/Output C Operators C Introduction Examples

C Control Flow

C if...else C for Loop C while Loop C break and continue C switch case C goto Control Flow Examples

C Functions

C Programming Functions C User-define Functions C Function Types C Recursion C Storage Class C Function Examples

C Programming Pointers

C Programming Pointers C Pointers & Arrays C Pointers and Functions C Memory Allocation Array and Pointer Examples

C Programming Strings

C Programming Strings C String Functions C String Examples

Structure and Union

C Structure C Struct and Pointers C Struct and Function C Unions C Struct Examples

C Programming Files

C Files Input/Output C Files Examples

Additional Topics

C Enumeration C Preprocessors C Standard Library C Programming Examples

Java Tutorial


Java Introduction

Java is a general-purpose computer programming language that is concurrent, object-oriented, class-based, and specifically designed to have as few implementation dependencies as possible.

Today Java programming language is one of the most popular programming languages which is used in critical applications like stock market trading system on BSE, banking systems or android mobile application.

Java was developed by James Gosling from Sun Microsystems in 1995 as an object-oriented language for general-purpose business applications and for interactive, Web-based Internet applications. The goal was to provide a platform-independent alternative to C++. In other terms, it is architecturally neutral, which means that you can use Java to write a program that will run on any platform or device (operating system). Java program can run on a wide variety of computers because it does not execute instructions on a computer directly. Instead, Java runs on a Java Virtual Machine (JVM).

Java is a general-purpose programming language that’s used in all industries for almost any type of application. If you master it, your chances of getting employed as a software developer will be higher than if you specialize in some domain-specific programming languages. The Java language is object-oriented (OO), which allows you to easily relate program constructs to objects from the real world.

Steps of Java program execution

Java requires the source code of your program to be compiled first. It gets converted to either machine-specific code or a byte code that is understood by some run-time engine or a java virtual machine.

Not only will the program be checked for syntax errors by a Java compiler, but some other libraries of Java code can be added (linked) to your program after the compilation is complete (deployment stage).

Step1 : Create a source document using any editor and save file as .java (e.g. abc.java)

Step2 : Compile the abc.java file using “javac” command or eclipse will compile it automatically.

Step3 : Byte Code (abc.class) will be generated on disk.

Step4 : This byte code can run on any platform or device having JVM (java.exe convert byte code in machine language).