I'm studying the book for the JAVA OCA certification. I'm in the chapter of binary operator. The book mentions the following rule.
byte, short and char will be promoted to int when they use binary operators.
So, at the moment, if I define and initialize a variable of type short or byte it will be automatically converted to int.
In the book, it says = assignment is a binary operator.
Is there any point of using these kind of variables?
How can I print this type of variable in java?