really dumb problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: really dumb problem

  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:-)

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center