- 1

Rearrange the code to declare a method returning the greater of the two arguments. return a; } public int max(int a, int b) { }

Rearrange the code to declare a method returning the greater of the two arguments. return a; } public int max(int a, int b) { } if (a > b) { return b; Unlock

4th Jul 2017, 7:38 AM
Walter Mugo
Walter Mugo - avatar
5 odpowiedzi
+ 5
public int max(int a, int b) { if (a > b) { return a; } return b; }
22nd Feb 2018, 12:59 PM
Carlos Pabón C.I.16.496.246
Carlos Pabón C.I.16.496.246 - avatar
+ 1
public int max(int a ,int b ) { if(a>b){ return a ; } return b ; }
17th Jul 2018, 2:32 PM
MEGUITIF MHAMED
MEGUITIF MHAMED - avatar
0
Help me out
30th Oct 2021, 2:19 PM
Abear Arif
Abear Arif - avatar
- 1
help me out
4th Jul 2017, 7:38 AM
Walter Mugo
Walter Mugo - avatar
- 1
public int max(int a, int b){ if(a>b){ return a; } return b; /* If you don't understand, ask ! */
4th Jul 2017, 7:50 AM
Jojo