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
Can you write a java class that could be used both as an applet as well as an application?
When does an object becomes eligible for garbage collection in java?
What is stack class in java?
What is the meaning of variables in research?
What are the important features of Java 8 release?
What is pojo class in java?
What is the right data type to represent a price in java?
Is sizeof a keyword in java programming?
What is the biggest integer?
Which collection allows duplicate values in java?
What is meant by structural programming?
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
How do you represent a space in regex java?
When a byte datatype is used?
Define how objects are stored in java?