Ad
Code
Diff
  • public class BiggerNum{
    
      /**
       * @param a integer of param1
       * @param b integer of param2
       * @return the bigger integer of a and b
       * If a equals b, eiter one is acceptance
       */
      public static int compare(int a, int b) {
        return a >= b ? a : b;
      }
    }
    • public class BiggerNum{
    • /**
    • * @param a integer of param1
    • * @param b integer of param2
    • * @return the bigger integer of a and b
    • * If a equals b, eiter one is acceptance
    • */
    • public static int compare(int a, int b) {
    • if(a > b){
    • return a;
    • }else{
    • return b;
    • }
    • return a >= b ? a : b;
    • }
    • }

Return the bigger integer

public class BiggerNum{

  public static int compare(int a, int b) {
    return 0;
  }

}