Professional Documents
Culture Documents
Java 5nd Program
Java 5nd Program
// Using Bitwise OR
// Main class
public class GFG {
// Condition check
// if n|1 if greater than n then this number is even
if ((n | 1) > n) {
// Print statement
System.out.println("Number is Even");
}
else {
// Print statement
System.out.println("Number is Odd");
}
}
}