Basic Package Example in Java


Here is the simple program for printing basic package example in Java.

Source Code

import packages.add;
import packages.sub;
class mainclass
{
  public static void main(String args[])
  {
    add o1 =new add(100,60);
    o1.sum();
    sub o2 =new sub(100,60);
    o2.minus();
  }
}
To download raw file Click Here

Output

Total :160
Diffrence :40


Learn All in Tamil © Designed & Developed By Tutor Joes