Because I don't assume an object of type B (C, D,...) exists. I think any method creating objects is static...
The reason I'd like to do things that way is that if I put newInstance method in each...
Type: Posts; User: elim
Because I don't assume an object of type B (C, D,...) exists. I think any method creating objects is static...
The reason I'd like to do things that way is that if I put newInstance method in each...
No. I don't know how. I used to program with ObjectC (cocoa), it's not hard doing such thing with
ObjectC. And I'd like to port code to Java
I heard that I need reflection functionalities in Java...
Suppose class A has many subclasses B, C, D,... (the names can be very irregular).
Is there a way to implement a mathod
public static newInstance(String xml)
in class A such that when I say...