Interface: Interface is a blueprint of a class. In other words, It is set of rules or contract. Interface Declaration: An interface is declared by using the interface keyword. Syntax: Interfaces have the following properties: An interface is implicitly abstract. do not need to use the abstract keyword while declaring an interface. Each method inContinue reading “INTERFACE IN JAVA”
Tag Archives: interface
ASSESSMENT – 1
Scenario #1:Expected Understanding: Access Modifiers, Single Inheritance, getter methods, Constructor Overloading 1) Create a Class named “Trainer”.– Have default instance variables String dept, institute– Have private instance variable int salary– Assign 10000 as value for salary.– Create getter method for salary.– Assign values – “Java”, “Payilagam” to them– Have instance method training() with void asContinue reading “ASSESSMENT – 1”