Java Beginner Tutorial
Here is a beginner Java tutorial site that attempts to teach basics of Java programming Language in plain English using huge number of java source code examples spread across various topics. This site is for absolute starters to learn java who do not needs any prerequisite Java knowledge. This site can also be used by advanced java developers.
Java has evolved to be the most predominant and popular general purpose programming language of the current age. Java is a simple, portable, distributed, robust, secure, dynamic, architecture neutral, object oriented programming language. It was developed by Sun Microsystems. This technology allows the software designed and developed once for an idealized ‘virtual machine’ and run on various computing platforms.
Java plays a significant role in the corporate world. Companies of all sizes are using Java as the main programming language to develop various applications/projects world wide. It has found its use in various sectors including banking, insurance, retail, media, education, manufacturing and so on. E-commerce, Gaming, Mobile, Embedded, Media and many more types of applications are being developed using Java. Organizations are developing mission critical applications using Java technologies. This necessitates the corporations to hire highly skilled java developers. On the other hand it opens the doors for many opportunities for java developers. There is significant demand for java developers with sound technical skills. Now Colleges and Universities all over the world are using it in their introduction courses as well as their junior and senior software engineering courses.
This site was developed considering the importance of this language and the benefits that it provides to corporations, developers, students, education institutions and more. Javabeginner.com is free online Java tutorial site with a huge number of java programs for java development.
Introduction to Java Programming
===============================
Introduction to Computer Science using Java
Java is a simple and yet powerful object oriented programming language and it is in many respects similar to C++. Java originated at Sun Microsystems, Inc. in 1991. It was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. It was developed to provide a platform-independent programming language. This site gives you an Introduction to Java Programming accompanied with many java examples. Its a complete course in java programming for beginners to advanced java.
Platform independent
=======================
Unlike many other programming languages including C and C++ when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run.
Java Virtual Machine
=======================
What is the Java Virtual Machine? What is 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
============================
Since Java is an object oriented programming language it has following features:
1 =) Reusability of Code
2 =) Emphasis on data rather than procedure
3 =) Data is hidden and cannot be accessed by external functions
4 =) Objects can communicate with each other through functions
5 =) New data and functions can be easily added Java has powerful features. The following are some of them:-
6 =) Simple
7 =) Reusable
8 =) Portable (Platform Independent)
9 =) Distributed
10 =) Robust
11 =) Secure
12 =) High Performance
13 =) Dynamic
14 =) Threaded
15 =) Interpreted
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.
OOP Concepts
=================
Four principles of Object Oriented Programming are
Abstraction
Encapsulation
Inheritance
Polymorphism
Abstraction
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
================
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.
Encapsulation
* Hides the implementation details of a class.
* Forces the user to use an interface to access data
* Makes the code more maintainable.
Inheritance
Inheritance is the process by which one object acquires the properties of another object.
Polymorphism
Polymorphism is the existence of the classes or methods in different forms or single name denoting different
implementations.
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.
Garbage collection
=================
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 already done in C++ to free the memory if the object is no longer needed. It is done automatically by the help of garbage collector.
Java Applications
==================
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.
============================
Since Java is an object oriented programming language it has following features:
1 =) Reusability of Code
2 =) Emphasis on data rather than procedure
3 =) Data is hidden and cannot be accessed by external functions
4 =) Objects can communicate with each other through functions
5 =) New data and functions can be easily added Java has powerful features. The following are some of them:-
6 =) Simple
7 =) Reusable
8 =) Portable (Platform Independent)
9 =) Distributed
10 =) Robust
11 =) Secure
12 =) High Performance
13 =) Dynamic
14 =) Threaded
15 =) Interpreted
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.
OOP Concepts
=================
Four principles of Object Oriented Programming are
Abstraction
Encapsulation
Inheritance
Polymorphism
Abstraction
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
================
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.
Encapsulation
* Hides the implementation details of a class.
* Forces the user to use an interface to access data
* Makes the code more maintainable.
Inheritance
Inheritance is the process by which one object acquires the properties of another object.
Polymorphism
Polymorphism is the existence of the classes or methods in different forms or single name denoting different
implementations.
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.
Garbage collection
=================
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 already done in C++ to free the memory if the object is no longer needed. It is done automatically by the help of garbage collector.
Java Applications
==================
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.
