A)HelloWrold.java
package myjava.world; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } } |
B)MathTesting.java package world;
public class MathTesting
{
public int method(int n1)
{
return (n1+10);
}
}
|
C)TestPack.java import world.*;
public class TestPack
{
public static void main(String[] args)
{
MathTesting mt = new MathTesting();
System.out.println("Got it from world Test Pack\t"+ mt.method(12));
}
}
|