Program to import 'UseMeToo' package and use display( ) method

In this program we use the package useFul.useFullToo to import the class UseMeToo in another class SubPackageUse. Here we have used the display( ) method of UseMe class.


PROGRAM
import useFul.useFullToo.UseMeToo;

class SubPackageUse
{
 public static void main(String args[])
 {
  UseMeToo umt = new UseMeToo();
  umt.display();
 }
}
OUTPUT
C:\>javac SubPackageUse.java
C:\>java SubPackageUse
This is from Inside Package.

Comments

Popular posts from this blog

Develop an Android application to display “Hello World!” on screen

Program to design an applet which draws a circle (having color BLUE) inside a triangle (having color YELLOW)

Build a Simple Android App to Display Student Details