Java Reference
In-Depth Information
Notice that show( ) specifies one long parameter. This does not mean that you al-
ways have to pass show( ) a long value, however. Because of Java's automatic type
promotions, any integer type can be passed to show( ) . The number of bits displayed
is determined by the value stored in numbits . After each group of 8 bits, show( )
outputs a space. This makes it easier to read the binary values of long bit patterns.
4. The ShowBitsDemo program is shown here:
Search WWH ::




Custom Search