Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GetAge {
- public static void main(String[] args) {
- System.out.println(oldEnough(37));
- System.out.println(oldEnough(15));
- }
- static boolean oldEnough(int age) {
- boolean result = false;
- if (age >= 21) {
- result = true;
- }
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement