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

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