why this is not working? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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)
2 Answers
+ 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)