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 trialMax Greer
7,637 PointsI think i missed something... awhile back.... Why Long instead of long?????
What is the difference between Long phone, and long phone.
Why do we use one instead of the other.
2 Answers
gyorgyandorka
13,811 PointsLong
is a so-called primitive wrapper class. All primitive types in Java have their correspondig "wrapper" type, starting with a capital letter - they are simply classes which encapsulate the given primitive type as a field (and contain some additional helper methods). There can be various reasons for using them, e.g. to put them in collections, which can only contain Objects.
Max Greer
7,637 Points..I think i was staring at my computer too much that night! Thank you for the quick answer!