Tag Archives: OOP

Interface and abstract method access modifers

Methods declared in a Java interface are public by default. This should make sense as an interface declares a blueprint of public methods to be implemented by other classes. Use of the private and protected access modifiers is not allowed. … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Java interface can extend many interfaces

Java is an object oriented programming language that follows these rules: An interface may extend any number of interfaces A class may extend no more than one class A class may implement any number of interfaces Implementation of these rules … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Implicit and explicit parameters using Java

Java is an object oriented programming language that can use implicit and explicit parameters. Consider the following code snippet. We call the deposit method to add to the balance. Here, the implicit parameter is myAccount and the explicit parameter is … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment