initiliase the object in java
- by harigm
is it the right Way we initialise the the object?
I have a Class Sample();
I want to intialise the Object in my Sample1 Class
After intialisation I dont require to use the object of Sample Class.
In that Case Can I initialise that object as
new Sample();
instead of Sample s = new Sample(), if I am not going to use s anywhere in my Sample1 Class
My question, is this a good practice to do that?
will there be any after affects