O'Reilly logo

Java, A Beginner’s Guide, 5th Edition by Herbert Schildt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2: Introducing Data Types and Operators

1. Why does Java strictly specify the range and behavior of its primitive types?

Java strictly specifies the range and behavior of its primitive types to ensure portability across platforms.

2. What is Java’s character type, and how does it differ from the character type used by some other programming languages?

Java’s character type is char. Java characters are Unicode rather than ASCII, which is used by some other computer languages.

3. A boolean value can have any value you like because any non-zero value is true. True or False?

False. A boolean value must be either true or false.

4. Given this output,

use a single string to show the println( ) statement that produced it.

5. What is wrong with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required