As of now ,what i know abt cloning is that we can make a field to field copy of an object.ie when we clone an object,its state as well as a its behaviour is copied to the cloned object.My question is what is the neccesity of it? cant we create another object of the same class? so how does its different from cloned object (that is creating another object of that class rather than being cloned).is there any security issues coupled with this cloned object? And What is the Concrete purpose of
Latest Answer : No it won't work.Only one main methods is allowed ...
Latest Answer : Abstract class can have instance variable, static variable, constructor, abstract methods, concrete methods, instance blocks and static blocks.Subclass has to extend abstract class using extend keyword. ...
Latest Answer : In singleton class ,only one time the instance wil create.Example....public class Sin{ static Sin s=null; public static void main(String a[]) { create(); create(); ...
Latest Answer : Below are three signatures:public final void notify()public final void notifyAll()public final void wait(long timeout) ...
Latest Answer : Thisb java.lang.reflect package is uesd retrieve the member info for any loaded class.for example,Class c=Class.forName("java.lang.String");Method m[]=c.getDeclaredMethods();now m contains all declared method for String classhere String is loaded class.this ...
Latest Answer : Methods cannot be overloaded only on the basis of return type atleast one argument should be different, otherwise compiler will give the message "The function is already defined in the class". ...
Latest Answer : We need not call the finalize() method directly. The method is called automatically by the garbage collector when it determines no more references to the object exist. But when we need to clean-up non-Java resources ie closing a file, we need ...
Latest Answer : Apart from init,start,stop and destroy the Applet class has the following methods:1. public void paint(Graphics)2. public void repaint3. public void update(Graphics)4. public void showStatus(String)5. public String getParameter(String) ...
Latest Answer : init()- is called only once , when the browser sends the first request.start() is called everytime the browser sends the request ...