Comment on Tutorial - clone() and the Cloneable Interface in Java By Henry
Comment Added by : siva kiran
Comment Added at : 2011-01-20 11:40:23
Comment on Tutorial : clone() and the Cloneable Interface in Java By Henry
Question: if clone is a protected method then why the sub class has to implement Cloneable interface type to use its super class method?
Answer: clone is a dangerous method. So by implementing Cloneable interface you are telling JVM that "There is a good reason to clone my class, so please allow me"
View Tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Java program to get location meta data from an image
Program using concept of byte long short and int in java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
Archived Comments
1. any one can send serial port communication using n
View Tutorial By: prakash at 2013-07-01 15:44:48
2. I think it is the best article for freshers.thanks
View Tutorial By: srikanth at 2010-11-01 23:27:53
3. Plz tell me the classes to import for this code an
View Tutorial By: Nitin at 2009-11-10 02:54:50
4. how to trim in jsp page and to send the trimed con
View Tutorial By: monishaa at 2015-07-16 10:06:11
5. Thank you. This was a very annoying problem unti
View Tutorial By: CBL at 2009-03-02 02:52:00
6. Thank you very much you resolved my issue.
View Tutorial By: ketan at 2012-02-01 11:16:47
7. Thanks for the help, however I am having some diff
View Tutorial By: Andrew at 2008-09-30 14:51:14
8. It may be good ,when you stressed on the point why
View Tutorial By: Kishore Mylavarapu at 2011-05-25 01:28:50
9. nice example
View Tutorial By: pavang at 2010-07-20 01:16:22
10. Exception in thread "main" java.lang.NoC
View Tutorial By: Lahrach Abdelhakim at 2015-02-18 14:38:03