Loading...
Sunday, 20 November 2016

Getting Started with Java

What is Java 
Ø Java is Object Oriented,  Programming Language developed by James Gosling at Sun Microsystems in 1995.
Ø Java is developed for Web and Network Programming Language
Ø Java can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network.
Ø Java can also be used to build a small application module or applet for use as part of a Web page.
Ø  Applets make it possible for a Web page user to interact with the page.

Features / Characteristics of Java 

Ø Simple: Eliminates the use of pointers, operator overloading, and multiple inheritance features supported by its predecessor languages. These features added more complexity to programs and hence, were removed from Java.
Ø Object Oriented:  Offers Object Oriented Programming Facility
Ø Architecture Neutral: Code written on any machine or Operating System is interpreted in target machine.
Ø Portable: Write Once run any where, Java programs written in any Operating System or Machine can run on any other machine and Operating Systems. 
Ø Distributed: Resources can be accessed across the network
Ø Robust: The robust nature of Java is incorporated with strong memory management and exception handling mechanism.
Ø Secure: The interpreter applies several tests to the compiled code to check for illegal code. After these tests, the compiled code causes no illegal data conversions, performs only legal object field accesses, and all parameter types are verified as legal. 

Java Applications 

Ø Embedded Device Applications
Ø Desktop Applications (Console Applications , GUI Applications )
Ø Web Applications  ( Applets , Servlets, JSP)
Ø Mobile Applications (Applets , Applications (Apps))
Ø Network Applications

History of Java 

Ø 1991: Green Talk and OAK, Web Runner:
Ø 1995: OAK Renamed as Java , Web Runners changes to Hot Java
Ø 1997: EJB (Enterprise Java Beans): Server Software
Ø 1998: Java 2 Enterprise Edition (Java2 EE): for Enterprise
Ø 2006: Java as Free and Open Source Software by offering Java SE, Java EE, Java ME editions.
Ø 2009: Java 6 by Oracle
Ø 2011: Java 7
Ø 2014: Java 8
Ø 2016: Java 9

Procedural / Structured Programming Languages 

Ø The Computer Languages in which the basic organizing unit of Program if Function, a Set of functions is called Procedure. 

Object Oriented Programming Languages.

Ø The Programming Languages in which the basic organizing unit of Program is Object 

Oop Paradigm Aims 

Ø Development of reliable software at reduced cost.
Ø Reduction in the maintenance cost.
Ø Development of reusable software components.
Ø Completion of the software development within the specified time interval. 

Oop Application Development Process

Ø Object Oriented Analysis (OOA)
Ø Object Oriented Design (OOD)
Ø Object Oriented Programming (OOP)

OOP Features and Principles 

Ø Object:-Represents an entity which possesses certain features and behaviors.
Ø Class:- Class is a template that is used to create objects.
Ø Abstraction:- Is a design technique that focuses only on the essential features of an entity for a specific problem domain.
Ø Encapsulation:- Is a mechanism that combines data and implementation details into a single unit called class. It also secures the data through a process called data hiding where a user cannot manipulate the data directly.
Ø Inheritance:- Enables the developer to extend and reuse the features of existing classes and create new classes. The new classes are referred to as derived classes.
Ø Polymorphism:- Is the ability of an object to respond to same message in different ways.

Concept of an Object

Ø Object is an Instance of Class, which can hold Data and Functions
Ø Every Object has state (Characteristics / Attributes) and Behaviors (Function)
Ø The Attributes of Object are called Members and the behaviors / Actions are called Functions.  

Defining a Class

Class is a name / template / blue print for creating Objects. For example a Car Class may have objects such as Toyota, Mehran etc, A Shape class may have objects such as Circle , Rectangle etc
Some Examples of Classes
Ø Shape Class
Ø Animal Class 
Ø Vehicle Class 
Ø Bank Account Class  And so on

Difference between Class and Object

Class:
Ø Class is a conceptual model  
Ø Class describes an entity  
Ø Class consists of fields (data members) and functions  
Object:
Ø  Object is a real thing  
Ø Object is the actual entity  
Ø Object is an instance of a class 

Object Oriented Terms 

Ø Class: Pattern or blueprint for creating an object. A class contains all attributes and behaviors that describe or make up the object.
Ø Object: A thing that can be seen and touched (and manipulated). It is an instance of a class.In a bit more detail, a (software) object is a construct that combines a state (data) and behavior (operations)
Ø Attributes: Characteristics that describe the object (sometimes referred to as properties).
Ø Methods: Operations (or actions) that objects perform or operations which are performed to an object. Sometimes referred to as behaviors.
Ø Instance: An object created from a class (is an instance of that class).
Ø Abstraction: Refers to hiding the internal details of an object from the user.
Ø Encapsulation: Refers to the combining of an object's attributes and behaviors into a single package, i.e. a class. The programmer then can user the properties of the class without having to understand the implementation.
Ø Inheritance: Refers to the capability of creating a new class from an existing class.
Ø Base Class: An originally created class, along with its attributes and behaviors. A class from which another class inherits its attributes and behaviors.
Ø Derived Class: A newly created class, derived from a base class which inherits all of the attributes and behaviors from the base class, but may have additional attributes and behaviors associated with it.








Introduction to java Programming
Getting Started with the Java Programming 

0 Comments:

Post a Comment

 
TOP