Java Interview Points
Java Interview Points Uses of finalizer :- It acts as a safety net. It may be better to free the resources than never e.g. FileInputStream, Connection etc. Object with native peers, the garbage collector doesn't know about it when it reclaimed the java peer. If native peer hold some critical resources, we can use this method to free the resources. Clone will not work if the array fields are final because clone would be prohibited from assigning a new value to the field. A method in an interface can’t be native, synchronized, strictfp but in the implementation class it can be since these keywords describe implementation properties rather than interface properties. Same is true for final. Only data associated with specific instances of a class is serialized, because static data is associated with a class as opposite to an instance, so it’s not serialized automatically. To serialize static data, one must provide class specific serialization. A...