What is the meaning of the term "zero-extends" and "sign extends" ?
843789May 6 2009 — edited May 6 2009[JLS 1.0 |http://java.sun.com/docs/books/jls/first_edition/html/5.doc.html#170671] states that :
A widening conversion of a signed integer value to an integral type T simply sign-extends the two's-complement representation of the integer value to fill the wider format. A widening conversion of a character to an integral type T zero-extends the representation of the character value to fill the wider format.
What does this whole paragraph mean ? Do we have a example or some pointers to explain this ?
Thank you for your consideration.