Category Java

Control Statements in Java

Types of Conditional control flow statements in JavaScript

In this tutorial, we will understand about the different types of control flow statements in Java and the best practices for using them. A simple Java program contains a set of statements that generally contain expressions and end with a…

Nested Interface in Java with Example

Nested interface in Java

When an interface as a static member is declared inside a class or another interface, it is called nested interface in Java or member interface. Nested interface must be declared as public inside another interface. The nested interface can be…

Use of Interface in Java (with Example)

Use of Interface in Java with realtime example

In the previous tutorial, we have known the basic of the interface in Java as well as its several advantages in utilizing the features of interfaces in general programming. In general, when we write a simple program, nobody may think…

Can We Override Static Method in Java

Can we override static method in Java

No, we cannot override static method in Java because a static method is resolved at compile time by Java compiler whereas, method overriding is resolved at runtime by JVM because objects are only available at runtime. We can declare static…