how to call one program .class file in another program
Answers were Sorted based on User's Feedback
Answer / surender
By creating instance of the .class file we can call it from any other program
| Is This Answer Correct ? | 27 Yes | 2 No |
Answer / divya
By creating instance of the .class file we can call it from
any other program.
| Is This Answer Correct ? | 16 Yes | 2 No |
Answer / amit
by making package we can include one call in other program
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / 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 |
Answer / kajalpreet kaur
by making an object of .class file,we can use it in other program.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rakesh
one answer in now proceeding after another file also use
the program
| Is This Answer Correct ? | 0 Yes | 0 No |
Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?
Why is string class considered immutable?
What is class forname used for?
Is java a security risk?
What do you mean by platform independence? What is an interface?
Explain the difference between call by refrence and call by value?
Difference between == and .equals() ?
how can you say that java is independ language
Can you add null to a list java?
I have 2 objects inside one object(vector). how can i serialize one of them. I dont want to serialize the second one
What is the use of singleton class?
What are inbuilt functions in java?