+ 1

why this is not working?

package com.logo; public class rogo{ int min(int a, int b){ if(a<b){ return a; } else if(a>b) { return b; } } double min(double a, double b){ if(a<b){ return a; } else if(a>b) { return b; } } } public class main { public static void main (String[ ] args) { rogo rog1 = new rogo(); int d = rog1.min(5,6); System.out.println(d); }

1st Sep 2020, 6:09 AM
Mahdi (Twelve Imam)
4 Réponses
+ 1
thanks Anisha Swain but why this isn't working
1st Sep 2020, 6:33 AM
Mahdi (Twelve Imam)
+ 1
and pls answer this :(thanks) can't i make a else if conditioner without making a else conditioner?
1st Sep 2020, 6:40 AM
Mahdi (Twelve Imam)