package com.codegym.task.task12.task1209;
import java.util.*;
/*
Three methods and a minimum
*/
public class Solution {
public static void main(String[] args) {
}
public static int min(int a, int b){
a<b ? return a : return b;
}
public static long min(long a, long b){
a <b ?return a : return b;
}
public static double min(double a, double b){
a<b ?return a : return b;
}
//write your code here
}
ternary
Resolved
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Nouser
18 September 2020, 06:36
Ternary operator isn't used this way. It's used to assign values.
or
And it's hard to assign eg. return a +1