DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    4

    Unhappy really dumb problem

    i'm using eclipse, coding a servlet.

    at the top of the page I am importing like:

    java.util.Date;

    but eclipse shows as illegal (systax error or what):

    Date wooyay = new Date();

    why can it be?

    the javadoc says it is legal?

    http://java.sun.com/j2se/1.3/docs/ap...te.html#Date()

    but "the constructor Date() is undefined"


  2. #2
    Join Date
    Nov 2003
    Posts
    4
    ahh ok Date() has been depricated in v 1.4.2



    but how do you instantiate an object with the date at the moment then?


  3. #3
    Join Date
    Nov 2003
    Posts
    4
    arrgh not even right.

    there is sql.Date and util.Date.

    I had put sql.Date.


    eh? eclipse maybe?

  4. #4
    Join Date
    Nov 2003
    Posts
    4
    YAY IT WORKS

  5. #5
    Join Date
    Mar 2003
    Posts
    834
    Date itself is not deprecated, but most of its methods are:

    http://java.sun.com/j2se/1.3/docs/ap...util/Date.html
    ArchAngel.
    O:-)

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