- JAVA OVERVIEW
- History of Java
- Tools you will need for java
- Java Environment Setup
- Popular Java Editors
- Java Basic Syntax/First-Program
- Java Identifiers
- Java Modifiers
- Java Arrays
- Java Enums
- Java Keywords
- Comments in Java
- Java - Objects and Classes
- Objects in Java
- Classes in Java
- Constructors
- Creating an Object
- Accessing Instance Variables and Methods
- Source file declaration rules
- Java Package
- Simple Case Study
- Basic Data Types
- Primitive Data Types
- Reference Data Types
- Java Literals
- Variable Types
- Local variables
- Instance variables
- Class or static variables
- Java Access Modifiers
- What is OOPS
- Inheritance concept
- Encapsulation
- What is Polymorphism
- Method Overloading
- Method Overriding
- Abstraction in Java
- Abstract class
- Interface in Java
- Method overloading in Java:
- What is Annonymous object?
- Java 8
What is the abstraction in Java?
Abstraction is a method, that is hiding of the implementation details and showing only functionality to the user.
Two ways to achieve Abstraction in java:-
Abstract class (0 to 100%)
Interface (100%)
Abstract class in Java:
A class that is declared as abstract is known as abstract class. You need to keep the abstract keyword with a class. we cannot instantiate or create an object of an abstract class.
Example of Abstract class in Java:-
package oops;
public abstract class Abstract1{
int div(int x,int y)
{
return x/y;
}
abstract int mul(int a,int b);
}
class child extends Abstract1
{
public static void main (String args [])
{
int j=20;
int k=30;
child c=new child();
System.out.println(c.mul(j,k));
}
@Override
int mul (int a,int b)
{
return a*b;
}
}