how to call one program .class file in another program

Answers were Sorted based on User's Feedback



how to call one program .class file in another program..

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

how to call one program .class file in another program..

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

how to call one program .class file in another program..

Answer / amit

by making package we can include one call in other program

Is This Answer Correct ?    7 Yes 1 No

how to call one program .class file in another program..

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

how to call one program .class file in another program..

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

how to call one program .class file in another program..

Answer / jason

for the above class "Hello" ...
creating its '.class' file in another class is..

class DemoHello
{ p s v m(...)
{
Hello h=new Hello();
Class c=h.getClass();
sop(c);
}
}

=================
o/p:
class Hello

Is This Answer Correct ?    2 Yes 1 No

how to call one program .class file in another program..

Answer / rakesh

one answer in now proceeding after another file also use
the program

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Which class is used by server applications to obtain a port and listen for client requests?

0 Answers  


What is immutable in java?

0 Answers  


why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why these methods are placed in Object class?

2 Answers   Global Logic, Satyam,


Is nullpointerexception checked or unchecked?

0 Answers  


What are the differences between abstract class and interface?

0 Answers  


Who found java?

0 Answers  


what are the design patterns in struts?

1 Answers  


What are features of java?

0 Answers  


What are the steps to do connection pooling in weblogic?

1 Answers   TCS,


What exceptions occur during serialization?

0 Answers  


abstract class A{ int list []=new int [100]; A(int x,int y){ rondom n=new rondom(); for (int i==;i<100;i++); list [i]=x+r.next int(y-x+1); abstract sort (); abstract binary sarch(int temp); class B extends A{

3 Answers  


What methodology can be employed to locate substrings inside a string?

0 Answers  


Categories