English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In java, what is the literal that represents a true value ?

2006-09-23 05:06:03 · 2 answers · asked by Anonymous in Computers & Internet Software

2 answers

The previous reply from Nick_F was almost right. I think maybe he mixed in a little something else (C++?). In Java, the type is "boolean", not "bool".

The boolean type has two literal values: true and false. While beneath the covers they may map to 0 and !=0, integer values are not assignable to boolean variables.

boolean value = true;

2006-09-25 06:33:50 · answer #1 · answered by vincentgl 5 · 0 0

it's: true

as in

bool b = true;

2006-09-23 05:20:41 · answer #2 · answered by Nick F 6 · 0 0

fedest.com, questions and answers