"Change the class name"

Sumitartmagic
Sumitartmagic used Ask the Experts™
on
Hi expert,
Suppose I have created two programs One class name is Rohit and another class name is shivam.
And I want to change the name of first program class name "Rohit"  by using second program name "Shivam" when user input the name. How to solve it.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
You could invoke

Rohit.main(new String[] {}); // assume no args

Open in new window


from Shivam
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Um, basically you can't change the name of classes once the program is running.

I think if you could describe more what your goal that you are trying to achieve is (rather than specifically how you are thinking to solve it) then we could help further.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial