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.


// 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.


// 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. Therefor we can say that GFG is POJI in nature.


// 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.

My Personal Notes arrow_drop_up

Hello everyone, I am Bishal KUMAR Dubey and most importantly an idea creator. I just love Programming languages and love to know new concepts everyday,every minute,every second. Here to help Other GEEKS!!!

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.