- 4

Please explain true or false code

3rd Jun 2017, 10:23 PM
Akinlolu Tobi
Akinlolu Tobi - avatar
4 Respuestas
+ 10
True = True False = False Code = Code
3rd Jun 2017, 10:25 PM
Tim G
Tim G - avatar
+ 5
something is true if it is not false. something is false if it is not true. 😛 A boolean can be only true or false. True means correct. Am I correct to say 2 equals 2? Yes, ok so 2 == 2 is true. boolean a = (2 == 2); // a is true
3rd Jun 2017, 10:25 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
Some thing is true when it is. Some other thing is false when it is not.
27th Apr 2018, 12:23 PM
Johannes
Johannes - avatar
0
it also relate with conditional statement eg.... if (password1.equals (password2)){ JOptionPane.showMessageDialog(rootPane"welcome ") } else{ JOptionPane.showMessageDialog(rootPane"check password and try again") } this shows if the data you input in password field 1 is true to that of passwords Field 2 I.e password1= Victor password 2 = Victor display the true message (welcome) otherwise, password 1 = Victor password 2 = victorh display the true message (check password and try again) @ my understanding
14th Sep 2017, 6:48 AM
Oluwatobiloba Victor Ayobami
Oluwatobiloba Victor Ayobami - avatar