public class Tester { static boolean isEven(int x) { return (x % 2 == 0) ? true : false; } public static void main(String[] args) { System.out.print(isEven(2)); System.out.print(isEven(3)); System.out.print(isEven(4)); } }
static boolean isEven(int x) {
return (x % 2 == 0) ? true : false;
}
public static void main(String[] args) {
System.out.print(isEven(2));
System.out.print(isEven(3));
System.out.print(isEven(4));
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.