Object Oriented Programming in java
Declare an interface called “MyFirstInterface”. Declare integer type variable called “x”. Declare an abstract method called “display()”.
- Try to declare the variable with/without public, static and final keywords. Is there any difference between these two approaches? Why?
- Declare the abstract method with/without abstract keyword. Is there any difference between these two approaches? Why?
- Implement this into a class called “IntefaceImplemented” . Override all the abstract methods. Try to change the value of x inside this method and print the value of x. Is it possible for you to change x? why?