id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > whoIsOlder8252015
prev  |  next  |  chance

Write a method that uses an "if statement" to decide which is the older of two ages. Return the older of the two ages. If the ages are the same just return that age. You may NOT use a tertiary conditional or and "Math." operations.


whoIsOlder8252015(45, 34) → 45
whoIsOlder8252015(10, 14) → 14
whoIsOlder8252015(7, 7) → 7

...Save, Compile, Run (ctrl-enter)

public int whoIsOlder8252015(int age1, int age2) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200

Copyright Nick Parlante 2017 - privacy