Difference between char and byte data types

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pariforum
    New Member
    • Mar 2007
    • 5

    Difference between char and byte data types

    Pls let me know Difference between char and byte data types in core java
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    u better to look for google .... if anything confusing then come here again

    best of luck

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Ripped straight from the Java Language Specification:

      4.2.1 Integral Types and Values
      The values of the integral types are integers in the following ranges:

      For byte, from -128 to 127, inclusive
      For short, from -32768 to 32767, inclusive
      For int, from -2147483648 to 2147483647, inclusive
      For long, from -922337203685477 5808 to 922337203685477 5807, inclusive
      For char, from '\u0000' to '\uffff' inclusive, that is, from 0 to 65535

      kind regards,

      Jos

      Comment

      Working...