0

hello friends. i would like to know if it is possible to run a class file using a java program itself.i mean a program tht would return the answer (run) the class file .

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by muusa
0

It is possible but pointless. If you want to call the class program to get the answer, then just put what is inside the main to a separate method with arguments and call that method.

0

It is possible but pointless. If you want to call the class program to get the answer, then just put what is inside the main to a separate method with arguments and call that method.

actually this is a part of dynamically changing class.
i dont want to use a method .i want the class itself to be executed and return the result.If u show me through an example it would be of great help

0

thanks guys for ur help .i have found the solution myself n using the runtime class

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.