how to call one program .class file in another program
Answer Posted / sudarshan kumar
public class Hello{
int a=5;
void sum(){
int s=a+10;
System.out.print("\n sum :: "+s);
}
}
class Client{
public static void main(String x[]){
Hello h=new Hello()
h.sum();
}
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are methods and how are they defined?
Explain the purpose of garbage collection in Java?
What is numeric data type?
Why is singleton class used?
What is the map interface in java programming?
How do you use parseint in java?
Can we have more than one package statement in source file ?
Explain about serializable interface in java?
Explain try and catch keywords in java?
What is string data type?
What are data types in oop?
Is a case study a method or methodology?
Explain the difference between throw and throws in java?
Can a constructor be made final?
What is java literals?