Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package test;
- public class InTest{
- public InTest(){}
- public void hello(){
- System.out.println("Hello World!");
- }
- }
- //Compile and save the .java and .class files in /bin/test
- import test.*;
- class PackageTest{
- public static void main(String[] args){
- InTest obj = new InTest();
- obj.hello();
- }
- }
- //Compile and save in bin, execute PackageTest.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement