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.

Java Java Basics Perfecting the Prototype Reviewing Our Feedback

Object Data Types

What is object data types and how do they differ from primitive data types?

1 Answer

David Grimm
David Grimm
12,532 Points

Primitive data types are basically just simple values and the actions (operations) you can do with them are very limited. Examples of these are booleans (True/False), single characters and integers.

Objects on the other hand are much more complex. They are like "data types on steroids". They have their own methods and properties and there are much more things you can do with them. Examples of objects are Integers ("objectified" integers), Strings, Arrays, Class instances etc