DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Shailesh Deshpande Guest

    Why Clone Method is Protected in Object class


    Hi,

    Will nay one tell me why clone mthod is having protected signature? By this
    access level, I can not clone the objects in another packages.

    Please reply to this question if anyone knows it. Thanx in advance.

    Shailesh

  2. #2
    MarkN Guest

    Re: Why Clone Method is Protected in Object class


    I don't know for sure but read the comments on the clone method in the Object
    class. You can always add your own method that calls clone.

  3. #3
    Allan Neoh Guest

    Re: Why Clone Method is Protected in Object class


    IMHO, protected would give a choice for subclasses whether
    to expose clone() or not. I hope this makes sense. Not everything
    is cloneable.

    Cheers



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links