+ 1
In Java, can you pass an object to a method within the constructor for that object?
I would like to utilize a static method which accepts an object in the constructor for that object, in order to set other variables in the same constructor. Is this possible?
1 Antwort
+ 1
Yes you can. Just add a parameter type of your object and then just add the "this" keyword from your object as parameter.