java simple notes
TRANSCRIPT
Java is a interperter and compiler Java is a interperter and compiler languagelanguage
Java is oop’s based languageJava is oop’s based language Java is a simple languageJava is a simple language Java is developed by sun micro systemJava is developed by sun micro system First model of java is introduce in 1992 First model of java is introduce in 1992
with name oak and working model in with name oak and working model in 19951995
DATA TYPE
PERMITIVE NON PERMITIVE
NUMERIC NON-NUMERIC CLASS ARRAY
INTERFACEINTEGER FLOATING POINT BOOLEAN CHARACTER
INT FLOAT DOUBLE SHORT
BYTE
LONG
DATA TYPE
Feature of oop’s Encapsulation Inheritance Polymorphism Abstraction Modularity Type casting Persistence Concurrency Message passing
Encapsulation It is the ability to store the data in hidden
foam. Encapsulation increase the security because the data member and member method function are stored in class. Where class work as container and we need an object to access the member of the class.
polymorphism
It is the ability to take more than one foam.
The word polymorphism is the combination of greek words poly + mor. where ploy means multiple and mor means foams.
CONTROL STRUCTURE
If-else Nested if-else Ladder if-else Switch case Looping:-1. While2. Do while3. For
Class:-
it is a user defined data type.class work as container for it’s member.
Class can contain:-
1.Data member
2.Member method
Syntax:-
Class<class name>
{
Data member
Member method }
Object:-
it is a instance of any class and compulsory to access the member of class.
Syantax:-
Class <class name> <obj.name>=new <classnmae>();
ConstructorConstructor
It is a member method of any class.It is a member method of any class. The name of constructor always similar to The name of constructor always similar to
class name.class name. It’s cannot return a value.It’s cannot return a value. It’s call automatically when we create an It’s call automatically when we create an
object for it’s class.object for it’s class. Parameterizes constructor is possible.Parameterizes constructor is possible. It’s can’t overload.It’s can’t overload.
METHOD OVERLOADINGMETHOD OVERLOADING
It’s define multiple method with same It’s define multiple method with same name.name.
Three rule use:-Three rule use:-1.1. no. of argumentsno. of arguments2.2. Type of argumentsType of arguments3.3. Sequence of argumentsSequence of arguments
INHERITANCEINHERITANCE► It’s increase the reusability of program.It’s increase the reusability of program.► It extends the program of ‘extends’ keyword.It extends the program of ‘extends’ keyword.► Which class provide the service is called ‘Which class provide the service is called ‘super super
classclass’.’.► Which class receive the service is called ‘Which class receive the service is called ‘sub sub
classclass’.’.► Type of inheritanceType of inheritance1.1. Simple or singleSimple or single2.2. MultilevelMultilevel3.3. HierarchicalHierarchical