Question: ?i don't understand that in java ,what means in picture? It is easy to lose data when performing a cast. For example, the largest byte

 ?i don't understand that in java ,what means in picture? It ?i don't understand that in java ,what means in picture?

It is easy to lose data when performing a cast. For example, the largest byte value is 127 and the largest 75 int value is 2,147,483,647, so the following statements produce distorted results: int anOkayInt200; byte aBadByte-(byte)akayInt; A byte is constructed from eight Is and Os, or binary digits. The first binary digit, or bit, holds a 0 or 1 to represent positive or negative. The remaining seven bits store the actual value. When the integer value 200 is stored in the byte variable, its large value consumes the eighth bit, turning it to a 1, and forcing the aBadByte variable to appear to hold the value -72, which is inaccurate and misleading

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!