Nested Interface in Java | Example Program

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 declared in the following general form. … Read more

Real Use of Interface in Java Application

In the previous tutorial, we have known basics 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 about the actual need of using an Interface. But when we are … Read more

Can We override Static method in Java in 3 Cases

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 methods with the same signature in subclass, but they are … Read more

Java String toUpperCase() | Example Program

The Java String toUpperCase() method converts all the lowercase letters of a string into upper case and returns that upper-cased string. It has the following general form.Syntax:   1.  public String toUpperCase() 2.  public String toUpperCase(Locale locale)The second method converts all the characters of a string into uppercase using the rules of specified locale. Let’s see … Read more