Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Sandy Woods
1,082 PointsJava package
What's the purpose of importing the java.util.Date package Also, Craig used this line private Date mCreationDate; after importing the package above. He's using it in the same fashion as a Data type. Does importing this particular package allow users to use the word Date as a data type as oppose to int?
2 Answers
Rebecca Rich
Courses Plus Student 8,592 PointsThe Date package comes with Java. By importing it into your project, you can create Date objects. When Craig uses the line private Date mCreationDate; he is initializing a Date object - mCreationDate. You can then with the help of other methods provided with the Date class use the object in your project. Here is a link with more details about Java's Date class: http://www.tutorialspoint.com/java/java_date_time.htm
Sandy Woods
1,082 PointsI love the follow through (jump shot reference) w/ the java tutorial points. ;-)