Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Advanced-java] CLONE


  • From: darose@xxxxxxx (David Rosenstrauch)
  • Subject: [Advanced-java] CLONE
  • Date: Tue, 29 Jan 2002 11:18:48 -0500

Do a System.out.println(msg.getClass()) to find out what actual sub-class the object is.  See if that class supports clone.  If it does, then cast msg to the subclass type and call clone on it.


DR


At 02:52 AM 1/29/02 -0800, diya prakash wrote:
>Hello,
>
>I have what seems like a simple java question!!!!
>
>I have an interface Message and i have something like
>
>Message msg;
>
>I need to clone this msg variable!!!! I dont know how
>to acheive this as msg is not an object.
>
>Kindly help me.
>thank you,
>Ramya