Thursday, October 9, 2025
HomeLanguagesJavaPOJI in Java

POJI in Java

POJI: stands for Plain Old Java Interface. A POJI is an ordinary interface without any specialties. The interfaces that do not extend from technology/framework specific interfaces. For example all user defined interfaces are POJI and an interface that inherits from AppletInitializer of Java Beans is not POJI.
Examples:

JAVA




// A POJI interface
interface GFG {
  public void method1();
}
 
interface Geeks extends GFG {
  public void method2();
}


Explanation: Here both the interfaces i.e. GFG and Geeks are POJI in nature. Because both GFG and Geeks does not extends from any technology specific interface.
  
 
 

JAVA




// Another POJI interface
interface GFG extends java.io.Serializable {
 
}


Explanation: Here GFG is also a POJI. Here the interface is extending from Serializable interface but that serializable interface is not the part of any Technology, it is about Java API. Therefore, we can say that GFG is POJI in nature.
  
 
 

JAVA




// Not a POJI Interface
interface GFG1 extends java.rmi.Remote {
 
}
 
// Not a POJI Interface
interface GFG2 extends java.beans.AppletInitializer {
 
}


Explanation: Here GFG1 and GFG2 are not POJI in nature. Because Remote and AppletInitializer not part of API, it is technology.
 

RELATED ARTICLES

Most Popular

Dominic
32342 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6712 POSTS0 COMMENTS
Nicole Veronica
11875 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11937 POSTS0 COMMENTS
Shaida Kate Naidoo
6833 POSTS0 COMMENTS
Ted Musemwa
7092 POSTS0 COMMENTS
Thapelo Manthata
6786 POSTS0 COMMENTS
Umr Jansen
6789 POSTS0 COMMENTS