- byte - minimum value of -128 and a maximum value of 127
- short - minimum value of -32,768 and a maximum value of 32,767 (inclusive)
- int - minimum value of -2,147,483,648 and a maximum value of 2,147,483,647
- long - minimum -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807
- float - 1.1234f
- double - 1.127
- char - a single character such as 'a' or 'b'
- boolean - TRUE/FALSE
2) Java also supports another special type called the 'String' which is a set of characters within quotation marks. e.g. "Hello World"
2) The main ones most commonly used are String, int, and float.
3) There is a significant difference between a float and a double but this is beyond the scope of this entry tutorial. You can think of them both as types that will take a decimal point value. If you REALLY want to know the difference, look here.
4) Boolean values a
No comments:
Post a Comment