Which one of the following reserved words is used in Java to represent a value without a fractional part?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Prepare for the Arizona State University CSE110 Exam 1. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for success!

In Java, the reserved word that represents a value without a fractional part is "int." This keyword is used to declare variables that are intended to hold integer values, meaning whole numbers that do not include decimals. The use of "int" is part of Java's primitive data types, and it specifically defines a 32-bit signed integer.

The other terms provided do not serve the same purpose in Java. "Integer" is not a reserved word; rather, it refers to a wrapper class in Java that allows for the use of integers as objects. "Int" with a lowercase "i" does not exist; the correct representation is always with a lowercase "i." Finally, "Float" is a class that represents a floating-point number, which includes decimal values. Therefore, "int" is the only correct choice for defining a variable that holds whole numbers in Java.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy