Java is a programming language and a registering stage for application advancement. It was first discharged by Sun Microsystem in 1995 and later gained by Oracle Corporation. It is one of the most utilized programming dialects. Java is a basic but then amazing item arranged programming language and it is in numerous regards like C++. Java began at Sun Microsystems, Inc. in 1991. It was brought about by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. It was created to give a stage autonomous programming language. This site gives you an Introduction to Java Programming went with numerous java models. Its a total course in java programming for novices to cutting edge java.
Java stage is a gathering of projects that help to create and run projects written in the Java programming language. Java stage incorporates an execution motor, a compiler, and a lot of libraries. JAVA is stage autonomous language. It isn’t explicit to any processor or working framework. To understand JAVA programming language, we need to understand some basic concept of how a computer program can run a command and execute the action.
JAVA VIRTUAL MACHINE(JVM).
What is the Java Virtual Machine and its role?
Java was designed with a concept of ‘write once and run everywhere’. Java Virtual Machine plays the central role in this concept. The JVM is the environment in which Java programs execute. It is a software that is implemented on top of real hardware and operating system. When the source code (.java files) is compiled, it is translated into byte codes and then placed into (.class) files. The JVM executes these bytecodes. So Java byte codes can be thought of as the machine language of the JVM. A JVM can either interpret the bytecode one instruction at a time or the bytecode can be compiled further for the real microprocessor using what is called a just-in-time compiler. The JVM must be implemented on a particular platform before compiled programs can run on that platform.
OBJECT ORIENTED PROGRAMMING.
Object Oriented Programming is a method of implementation in which programs are organized as cooperative collection of objects, each of which represents an instance of a class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.
Four principles of Object Oriented Programming are
Abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer.
Encapsulation is the process of compartmentalizing the elements of an abstraction that constitute its structure and behavior ; encapsulation serves to separate the contractual interface of an abstraction and its implementation.
* Hides the implementation details of a class.
* Forces the user to use an interface to access data
* Makes the code more maintainable.
Inheritance is the process by which one object acquires the properties of another object.
Polymorphism is the existence of the classes or methods in different forms or single name denoting different implementations.
Java has powerful features. The following are some of them:–
Since Java is an object oriented programming language it has following features:
Reusability of Code
Emphasis on data rather than procedureData is hidden and cannot be accessed by external functionsObjects can communicate with each other through functionsNew data and functions can be easily added.
Reusability of CodePortable (Platform Independent)
JAVA IS DISTRIBUTED
With extensive set of routines to handle TCP/IP protocols like HTTP and FTP java can open and access the objects across net via URLs.
JAVA IS MULTITHREADED
One of the powerful aspects of the Java language is that it allows multiple threads of execution to run concurrently within the same program A single Java program can have many different threads executing independently and continuously. Multiple Java applets can run on the browser at the same time sharing the CPU time.
JAVA IS SECURE
Java was designed to allow secure execution of code across network. To make Java secure many of the features of C and C++ were eliminated. Java does not use Pointers. Java programs cannot access arbitrary addresses in memory.
Automatic garbage collection is another great feature of Java with which it prevents inadvertent corruption of memory. Similar to C++, Java has a new operator to allocate memory on the heap for a new object. But it does not use delete operator to free the memory as it is done in C++ to free the memory if the object is no longer needed. It is done automatically with garbage collector.
Java has evolved from a simple language providing interactive dynamic content for web pages to a predominant enterprise-enabled programming language suitable for developing significant and critical applications. Today, It is used for many types of applications including Web based applications, Financial applications, Gaming applications, embedded systems, Distributed enterprise applications, mobile applications, Image processors, desktop applications and many more. This site outlines the building blocks of java by stating few java examples along with some java tutorials.