Java Data Types

  • Java Boolean

    Java Boolean

    Definition:Boolean data type only holds two values, either true or false. Syntax: Application:Boolean can be used in variety of cases, for example, when you need to check if one value is bigger then the other, which will return you a true or falls. Let’s break it down and see what actually happens when boolean…

  • Java Char

    Java Char

    Definition:Char data type holds only single character value, for example: ‘a’ or ‘A’ or ‘@’ etc. Syntax: Note that char data type must be surrounded by single quotes.

  • Java Double and Float

    Java Double and Float

    Definition:Double and Float both are numerical data type which holds positive or negative with decimal points. Difference:Float – is suited for up to 7 decimal pointsDouble – is suited for up to 15 decimal points Let’s see an example:

  • Java Integer

    Java Integer

    Definition:Integer is a numerical data type which holds only whole numbers: 1, 2, 3, 4… etc. either positive or negative. Break it down to smaller pieces:int – is a variable type integer which holds only whole numbers. (integer will not accept decimal points)variableName – is the name you give to the variable.quotation marks ” “ – note…