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

I've watched the whole video and i can't get the meaning of the "int"?.

I've watched the whole video and i can't get the meaning of the "int"?.

"int" is a primitive type. Variables of type int store the actual binary value for the integer you want to represent. In this video int is representing the numeric value of the age limit that you must be in order to use this program.

Thank you, Sandra Your answer Helped me Alot!, Thanks to you and happy codding:D .

sankalp yadav
sankalp yadav
2,101 Points

Not to worry , it seems you are just noobie, In java there is style just like names in Game of Thrones ,people uses their name . Tywin lannister - person from lannister house, => attributes could be bastard, dishonest, backstabber, whore licker. Int x - person from number family => attributes could be all [-inf,+inf] , plus or minus but not decimal. "int" is a primitive type. Variables of type int store the actual binary value for the integer . Its ranges from -32768 to + 32767 , if you say int x= 32769 it will throw error because its 8 bit data type.

Hey there sankalp, Well sorry i couldn't get the meaning of you answer because i don't watch "Game of Thornes", Try harder next time and i thank you trying to help me.

It basically means integer. You are declaring that the variable type is an integer. Just like previously in the course, you declare a string.

Some other primitive types are: char: a single letter (For example, char letter = 'C') boolean: true or false statements double: decimal numbers float: numbers as well

Hannie Kim
Hannie Kim
3,938 Points

int equals integer or a number if a variable is given int you will be able to make math calculations with it

1 Answer

Saad Hamid
Saad Hamid
3,150 Points

"int" is a data type used to store integer variables. It's a primitive datatype and can be used to store whole numbers only inside a variable e.g 1,2,3,-1,-2,-3 .