Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active February 15, 2021 19:48
Embed
What would you like to do?
/*
https://parzibyte.me/blog
*/
public class Main{
public static boolean esPar(int numero) {
return numero % 2 == 0;
}
public static void main(String[] args) {
int numero = 4;
if (esPar(numero)) {
System.out.println("Sí es par");
} else {
System.out.println("No es par");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment