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

 

sspiege3@schools.nyc.gov methodsintro > maxOfTwo
prev  |  next  |  chance

Write a method called maxOfTwo that accepts two integer parameters from the user and returns the larger of the two. Precondition: Assume that the two numbers are distinct


maxOfTwo(4, 5) → 5
maxOfTwo(7, 10) → 10
maxOfTwo(15, 19) → 19

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

public int maxOfTwo(int num1, int num2){ }

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: 101

Copyright Nick Parlante 2017 - privacy