Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What are integer constants and floating-point constants in java language?
What are integer constants and floating-point constants in java language?
Integer, such as-123,

0xff

(hexadecimal),

022 (octal)

True type,

For example: 3. 14,

3. 14f

(single sperm),

3. 14 lb

(double sperm),

1.2e04 (Science)

Character constant,

one

String constant,

" abc 123 "

Escape character constant

'\0'

" \n "

Macro definition identifier constant

# Definition

e

2.7 1

In-program

e

Prepared by 2.7 1

Replace,

logical constant

real

(In fact, it is also a macro definition constant. ) That's probably it. ...