Hi ranchers,
Pls. consider the following code snippet taken from a tech web site.
I have two queries here:
(1) Is it a must to define the no-args default constructor explicitly? What's the harm if we rely on the
Java compiler provided default constructor?
(2) Why do we need a static variable here. We know that there's just one copy of any static variable irrespective of inatances created. But, I wonder if there would be more than one instance of ReqListener class in any scenario.
Thanks,
Reema