Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Samantha Degges
361 PointsCapitalization of objects and variables
Why do some objects get capitalized and variables are always capitalized? (String is always capitalized when declaring variable types) When referring to objects, console is not capitalized by System is. Does it matter? Why or why not?
2 Answers

Ken Alger
Treehouse TeacherSamantha;
Welcome to Treehouse!
Great questions. Does it matter, yes. Java is very case sensitive and you will get errors if you try to declare Strings as string
instead of String
or Int
instead of int
. Why the difference? In short int
is a primitive data type, String
derives from Object and is a class.
It is all part of the Java Code Conventions.
That probably just raised more questions than it answered, but there you have it.
Happy coding,
Ken

Samantha Degges
361 PointsThanks. I'll just have to read the Code Conventions to get up to date on that. Glad there's a reason!