Chapter 3 How to work with the primitive data type Murach's Java Programming

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

implicit cast or widening conversion

If you assign a less precise data type to a more precise data type, or you assign a smaller data type to a larger data type, Java automatically performs the cast and makes the conversion.

primitive data type

There are 8: boolean , byte , char , short , int , long , float and double . These types serve as the building blocks of data manipulation in Java. Such types serve only one purpose — containing pure, simple values of a kind.

explicit cast or narrowing conversion

To code an assignment statement that assigns a more precise data type to a less precise data type, you must use parenthesis to specify the less precise data type.

Boolean value

True or False

Unary operators

operate on just one operand

Binary operators

operate on two operands

Compound assignment operators

provide a shorthand way to code common assignment operations. can also be referred to as Augmented assignment operators

floating point numbers

provide for very large and small numbers that require decimal positions, but with a limited number of significant digits.

ASCII character set

provides characters for English Language.

double-precision number

provides for numbers with up to 16 significant digits

single-precision number

provides for numbers with up to 7 significant digits

Variables

store data that changes as an application runs

Constants

store data that doesn't change as an application runs

Integers

whole numbers and their opposites

Arithmetic operators

+, -, *, /, %

Unicode character set

Provides for over 65,000 characters with two bytes for each character. Each character maps to an integer value

Assignment Statement

assigns values to variables

wrapper classes

can be used to construct Integer and Double objects that contain (wrap around) int and double values. This can be useful when you need to pass an int or double value to a method that only accepts objects, not primitive data types

arithmetic expression

consists of arithmetic operators that operate on one or more numbers known as operands


संबंधित स्टडी सेट्स

Peripheral Vascular Disease/Peripheral Arterial Disease Prep-U/Test-Bank

View Set

Micro - Economics : EXAM 3 MULTIPLE CHOICE QUESTIONS

View Set

Module #6 - Consumer and Producer Surplus

View Set

Management Information Systems: Chapter 3 Information Systems, Organizations, and Strategy

View Set

Seleccionar/ write a question 2.2

View Set

Lifepac History & Geography 1002 Test

View Set

Філософія Рівень1

View Set