Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Tolls

Thread: How to create an object of a Class whose default constroctor is deprecated

  1. #1
    Addymails is offline Member
    Join Date
    Jan 2012
    Posts
    14
    Rep Power
    0

    Default How to create an object of a Class whose default constroctor is deprecated

    Hello, correct me if i am wrong i have a class there it has a couple of constructors

    like default, passing one string argument, passing string argument and an object - among these three constructors i see that the first two constructors are deprecated, now i have a class where i have to create an object of that class by using the constructor passing String argument. How can it be possible ?

    any help is appreciated

    Thanks :)

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: How to create an object of a Class whose default constroctor is deprecated

    Are you talking about some JDK class or a proprietary, third-party class?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,009
    Rep Power
    20

    Default Re: How to create an object of a Class whose default constroctor is deprecated

    The documentation for the class should explain what is expected instead of the deprecated constructors.
    DarrylBurke likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. What is the Default value for a String object?
    By mkarthik90 in forum New To Java
    Replies: 4
    Last Post: 02-15-2012, 11:19 AM
  2. create object from a class
    By HearT.Hunt3r in forum Advanced Java
    Replies: 1
    Last Post: 10-28-2011, 02:46 AM
  3. Replies: 3
    Last Post: 05-02-2011, 04:37 AM
  4. Replies: 2
    Last Post: 06-22-2010, 04:29 AM
  5. Replies: 1
    Last Post: 04-09-2008, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •