What is JAVA, history of java, uses of java, features of java,Oop's concept, class,object and methods of java, example.
What is JAVA, history of java, uses of java, features of java,Oop's concept, class,object and methods of java, example.
JAVA PROGRAMMING
What is JAVA ?
- JAVA is high-level programming language.
- it is derives much of its syntax from C, C++, but it has fewer low -level facilities than either of them.
- It is a platform because it has its own runtime environment that is JVM. JVM provides a platform which accepts the bytes code and executes on the machines.
What is history of JAVA ?
- Introduced by James Gosling and his team.
- In the year of 1991.
- Sun Micro-systems lab.
- Oak is the first name of JAVA.
What is features of JAVA ?
- Platform Independent ( write once run anywhere )
- Portable
- Secure
- Robust ( very small small exception can handle easily )
What is uses of JAVA ?
It is used in-
- Android apps
- Financial Services Industries
- JAVA web apps
- Software tools
What is Oop's concept of JAVA ?
- Object Oriented Programming System/Structure.
- It is a programming paradigm.
- It has 6 main pillars of Oop's:
- class
- object and methods
- inheritance
- polymorphism
- abstraction
- encapsulation
- It is a real world entity.
- It is just a template or blueprint.
- Class does not occupy memory.
- Syntax :
- access-modifiers class className
- {
- // methods
- //fields
- //blocks
- }
What is methods of JAVA ?
- A set of code which performs a particular task.
- Advantages :
- Code reusability
- Code optimization
- Syntax :
- access-modifiers return-type methodName( list of parameter)
- {
- //code
- }
What is object of JAVA ?
- Object is an instance of class.
- It is real world in real world entity.
- It occupies memory.
- It consist of
- Identity
- State/Attribute
- Behavior
- 5 ways to create Object in JAVA :
- new keywords
- newInstance() method
- clone() method
- factory method
- deserialization
- Syntax :
className object = new className() ;
Example :-
(eat) 🐈 🦮 (run)
(walk) 🐄 Animal 🐇 (sleep)
🐀 (eat)
here,
class : Animal
Object: cat,dog,rabbit,cow and rat
methods: eat, run , walk, sleep
Comments
Post a Comment