Computer Science, asked by ruturajkolekar, 10 months ago

True or false
In java boolean true value is a non-zero value and false value is zero.​

Answers

Answered by jennisinu2004il
4

Answer:

false.......................

Answered by mad210219
22

In java boolean true value is a non-zero value and false value is zero.​

Explanation:

False

Because,

In c and C++ there is no data type called BOOLEAN Thats why it uses 1 and 0 as true false value. and in JAVA 1 and 0 are count as an INTEGER type so it produces error in java. And java have its own boolean values true and false with boolean data type.

Also ,

In java the JVM(JAVA VIRTUAL MACHINE) represents Boolean in terms of objects that represent classes so there is no 1 or 0 assoisiated with Boolean datatype in java

In Java, a boolean is a value that is either true or false. You can declare a boolean variable in the following way:

boolean ant = true;

But we cannot declare Boolean variable as  

Boolean ant=1; //it is false because Boolean don’t take integers  

Similar questions