Hexadecimal is not a separate data type. It is just a way to write numbers - in the base-16 numeric system instead of base-10 (decimal). When an integer literal in Java code starts with "0x", then it's in hexadecimal.

In addition to hexadecimal, you can write numbers in octal (the base-8 number system). A number is interpreted as octal if it starts with "0".

You're right, at a first glance 0xbeef looks more like something to eat than like an integer for many people. Similarly, 0xCAFE looks more like something to drink than like the number 51966.

But you have to know about the other two ways of writing an integer. Perhaps try this as a primer:

I'm terribly sorry that this output ends in a thirteen. But hopefully you are not supersticious. Ah, no, it doesn't end in a thirteen but in a nineteen!!! Phew!