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
Subscribe to Tutorials
Related Tutorials
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
MultiLevel Inheritance sample in Java
Archived Comments
1. Dear Gurus, I have arrived at your site lloking f
View Tutorial By: Fred Mah at 2012-09-22 07:40:27
2. good
View Tutorial By: sasikiran at 2008-03-30 23:33:24
3. i avinash can i know how ur problem is resolved ,i
View Tutorial By: santosh at 2011-12-06 10:35:42
4. Lots of thanks for this example
View Tutorial By: Santosh at 2011-06-28 16:42:25
5. Please, if it is incomplete, can you please send m
View Tutorial By: Marcio at 2009-03-01 09:06:45
6. it giving me error in following statment (using Li
View Tutorial By: Priyadarsan at 2007-11-27 22:31:56
7. This example has helped me a lot.! kudos to the wr
View Tutorial By: Disha Sareen at 2014-12-24 09:30:12
8. Hi,
I am designing a client server multipla
View Tutorial By: Varun Gupta at 2012-10-15 00:01:57
9. not that much clear exampl.. you should explain it
View Tutorial By: elangovan at 2010-06-09 02:36:19
10. Please don't give example from book this example i
View Tutorial By: aniruddha at 2011-03-23 00:34:32