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.

import useFul.useFullToo.UseMeToo;

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

Popular posts from this blog

Program to define a class 'employee' with data members as empid, name and salary. Accept data for 5 objects using Array of objects and print it.

Define a class Student with four data members such as name, roll no.,sub1, and sub2. Define appropriate methods to initialize and display the values of data members. Also calculate total marks and percentage scored by student.

Program to input age from user and throw user-defined exception if entered age is negative