Object oriented programming
Object oriented programming
Object oriented programming is a paradigm provides many concepts such as inheritance, data
binding, polymorphism.
1) Inheritance:
Inheritance is a mechanism where a new class inherits properties and behaviour from an
existing class.
2) Polymorphism: allows object of different classes to be treated as object of a common super
class.
3) Abstraction: Removal of unnecessary data and information from the program.
Concepts in OOPS:
1) Object: Entity that has state and behaviour is called a subject.
2) Class: Collection of objects
3) Inheritance: When an object acquires all the previous aspects of the parent object
4) Polymorphism:
5) Abstraction
6) Encapsulation
Features of Java:
1)object oriented
2) simple
3) portable
4) platform independent
5) secured
6) robust
7) Architectural neutral
8) Dynamic
9) Interpreted
11) Multiheaded
12) Distrib
Java Comments: used to describe the code more briefly to another person. Comments will
net be executed by the compiler and the interpreter.
Eamples:
class EnumExample1{
Array: array is used to store a fixed sequential collection of elements of the same type.
Import java.io.Console;
Class ReadStringTest{