how to call one program .class file in another program

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give me some null interfaces in java?

598


Can a class be final?

494


Which is the best sorting technique in java?

515


How can we pass argument to a function by reference instead of pass by value?

580


Can a serialized object be transferred via network?

510






What are internal and external variables?

540


Why do we need data structure in java?

569


What sorting algorithm does javascript use?

526


Is java ee a framework?

516


Is a boolean 1 bit?

610


What is java beans?

568


Is boolean a wrapper class in java?

596


What do you mean by chromounits in java8?

524


Explain the difference between string, stringbuffer and stringbuilder in java?

551


How do I start learning java?

555