i want to dynamically instantiate a class . ie i dont want to hard code the instantiation of class(creation of object) how do it achieve it ?
java help:how does dynamic instantiation of classess happen?
How do you want to instantiate it then? Under what conditions?
conditions ?
i didnt understand ....
i want to create instances of class without hard coding it (ie without writin the statement
class_name object_name=new class_name();
coz i want to make the code more maintainable .. so when new classes r introduced i need not update my code .. just update the config files
i didnt understand ....
i want to create instances of class without hard coding it (ie without writin the statement
class_name object_name=new class_name();
coz i want to make the code more maintainable .. so when new classes r introduced i need not update my code .. just update the config files
Um, maybe from what I'm seeing you want an object created every time something in particualar happens? Say it's a button you can press. If you mean this, you should instantiate the object in a button's action listener rather than in the main method. Basically, from what I'm reading, I'd just tell you to instantiate the object wherever it's creation is needed in the code. Perhaps I'm just not understanding you and you already know that.
