Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

import class java

//Demo.java  
package pack;  

public class Demo {  
    public void msg() {
        System.out.println("Hello");
    }  
}  


//Test.java  
package mypack;  

import pack.Demo;  

class Test {  
    public static void main(String args[]) {  
        Demo obj = new Demo();  
        obj.msg();  
    }  
}
Source by www.studytonight.com #
 
PREVIOUS NEXT
Tagged: #import #class #java
ADD COMMENT
Topic
Name
6+8 =