I am making a program that lets the user call a class, like it takes a string input, then calls the run() method of that class, is there any way to do that? I was hoping something like:
String inp=new Scanner(System.in).nextLine();
Class cl=new Class(inp);
cl.run();
I know that the code isn't correct, but that is my main idea
Aucun commentaire:
Enregistrer un commentaire