Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
I made my class Cloneable but I still get 'Can't access protected method clone. Why?
I made my class Cloneable but I still get 'Can't access protected method clone. Why?
✍: Guest
Yeah, some of the Java books, in particular "The Java Programming Language", imply that all you have to do in order to have your class support clone() is implement the Cloneable interface. Not so. Perhaps that was the intent at some point, but that's not the way it works currently. As it stands, you have to implement your own public clone() method, even if it doesn't do anything special and just calls super.clone().
2013-02-07, 1937👍, 0💬
Popular Posts:
Write out a function that prints out all the permutations of a string. For example, abc would give y...
Do You Know the Book "JUnit in Action"? You should know this book. It received some good reviews. Ti...
What is NullPointerException and how to handle it? When an object is not initialized, the default va...
What’ is the sequence in which ASP.NET events are processed ? Following is the sequence in which the...
.NET INTERVIEW QUESTIONS - What is the difference between thread and process? A thread is a path of ...