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 keywords in java?
What is 32 bit float?
Difference between overriding and overloading in java?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
What are java methods?
Explain implementation and how is it different from conversion?
Why object class is super class for every class in java?
Can we have multiple classes in a single file?
Is constructor inherited?
When do I need to use reflection feature in java?
Write a java program for binary search?
What is thread start?
Can we override constructor?
Explain about complier design(phases)
What is method in java with example?