Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem with java.util.Date

807598Aug 12 2006 — edited Jul 16 2008
i have this little function
 public static String getLocalTime()
 {
        Date d = new Date();
        String str = d.toGMTString();       
                
        return str;
 }
when i compile causes this warning :

Warning(92,24): method toGMTString() in class java.util.Date has been deprecated

what must i do to fix this warning???

thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2008
Added on Aug 12 2006
7 comments
447 views