- 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 polymorphism as Method overriding in Java?
Example of method overriding in java in Java:-
class Bank
{
int getInterestRate()
{
return 0;
}
}
class sbi extends Bank
{
int getInterestRate()
{
return 10;
}
}
class icici extends Bank
{
int getInterestRate()
{
return 15;
}
}
class hdfc extends Bank
{
int getInterestRate()
{
return 20;
}
}
class polymorphism1
{
public static void main(String args[])
{
Bank b= new Bank();
sbi s =new sbi();
icici i =new icici();
hdfc h =new hdfc();
System.out.println(b.getInterestRate());
System.out.println(s.getInterestRate());
System.out.println(i.getInterestRate());
System.out.println(h.getInterestRate());
}
}