Write a program in java to demonstrate of package?

package jdk;

import jre.Two;

public class One

{

      public static void main(String arg[])

      {

            System.out.println("Referencing Two of jre _ _ _ ");

            Two x=new Two();

            x.display();

      }

}

 

package jre;

public class Two

{

      public void display()

      {

            System.out.println("It is part of jre _ _ _ ");

      }

}

Package .PNG

, , , , ,

Leave a Reply