You are on page 1of 13

JAVA TUTORIAL

FOR BEGINNERS
HOW TO LEARN JAVA PROGRAMMING
CONCEPTS

1. Overview

2. A Simple Main Program

3. OOP's Concept
OVERVIEW

Java is a high-level programming language. Its main feature is a Platform


Independency making it different from other languages.
Platform Independency means Java compiler generates bytecode instead
of machine code. This bytecode can be run on any machine where JVM
is available.

Java Java
Compiler Interpreter
Source Code Bytecode Machine Code
OTHER FEATURES

Object Oriented Architecture Neutral

Multithreaded Robust

Secured Simple
SIMPLE JAVA
PROGRAM

class Demo
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
EXECUTION OF
PROGRAM

To Compile the above code write the following code

javac Demo.java

To Run the above code write the following code

java Demo
OBJECT ORIENTED
CONCEPT

Object Polymorphism Abstraction

Class Encapsulation Inheritance


OBJECT & CLASS

Object: It is a real-time entity that has state and behavior.


It may be physical and logical.

Class: It is a collection of objects. It is a logical entity.


POLYMORPHISM

.One task is performed by different ways is called polymorphism.

In Java, we can achieve Polymorphism through Method


Overloading and Method Overriding
ENCAPSULATION

Encapsulation is binding up of Data and Code into a single unit.

A Java class is an example of Encapsulation. Java Bean is fully


encapsulated class.
ABSTRACTION

Abstraction: Hiding details (Implementation ) and showing only


functionality

Example- We just send message but we don't know its internal


sending process
INHERITANCE

When one object acquires all the property and behavior of its parent object ,
is known as Inheritance. It provides code reusability.

Java doesn't support Multiple Inheritance. But In Java, we can achieve


concept of Multiple Inheritance through Interfaces
THANK YOU
http://www.java2blog.com/

You might also like