bool in java
class App {
public static void main(String[] args) {
// The boolean keyword is for creating a variable with boolean data type.
boolean result = true;
System.out.println(result);
}
}
bool in java
class App {
public static void main(String[] args) {
// The boolean keyword is for creating a variable with boolean data type.
boolean result = true;
System.out.println(result);
}
}
boolean method java example
javaCopypublic class booleanMethod {
public static boolean isEven(int mynumber)
{
return (mynumber % 2 == 0);
}
public static void main(String[] args)
{
int mynumber = 130;
if(isEven(mynumber) == true)
System.out.print("Even Number");
else
System.out.print("Odd Number");
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us