The document describes a Java program that creates a package named "mypack" containing a class called "MyPackageClass" with methods to display a message and add two numbers. A separate class "PackageDemo" imports and implements the "mypack" package by creating an instance of "MyPackageClass" and calling its displayMessage() and addNumbers() methods.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
50 views2 pages
10 Mypacakage
The document describes a Java program that creates a package named "mypack" containing a class called "MyPackageClass" with methods to display a message and add two numbers. A separate class "PackageDemo" imports and implements the "mypack" package by creating an instance of "MyPackageClass" and calling its displayMessage() and addNumbers() methods.