INTRODUCTION TO JAVA CH 1-2
INTRODUCTION TO JAVA CH 1-2
Examples :- C, Fortran, Pascal, and VB. Examples:-Python, Java, C#.NET, and C++.
Objects: Any entity that has state and behavior is known as
an object. For example, a chair, pen, table, keyboard, bike,
etc. It can be physical or logical. An Object can be defined as
an instance of a class.
Class
Collection of objects is called class. It is a logical entity. A class
can also be defined as a blueprint from which you can create
an individual object.
Inheritance
When one object acquires all the properties and behaviors of
a parent object, it is known as inheritance. It provides code
reusability.
Polymorphism
If one task is performed in different ways, it is known as
polymorphism. For example: to convince the customer
differently, to draw something, for example, shape, triangle,
rectangle, etc.
In Java, we use method overloading and method overriding
to achieve polymorphism
Encapsulation
Binding (or wrapping) code and data together into a single unit
are known as encapsulation.
A java class is the example of encapsulation.
Java was designed by sun microsystem of USA in 1991
originally it was known as " Oak " language which is
develop by ‘James Gosling". Further in 1995 it was
renamed as Java.
Java runs on a variety of platforms, such as Windows, Mac OS,
and the various versions of UNIX.
Mostly Java is used to design application software .
Software's for electronics devices such as TV, VCR ,Mobile
Games etc.
Features of Java:
The features of java is also known as buzzwords
Features of java
1.Complied & Interpreted Language
Javac Java
Source code Byte code Machine
compiler
java file interpreter