Android IDE (AIDE) Support Forum

How can I write the if else statement to find the minimum of a and b then assign it to min?

public class Main
{
public static void main(String[] args)
{
int a = 2000;
int b = 1000;
intSystem.out.println("The minimum of a and b is:400 " ); min = 1000;
if (a < b)
{
// TODO: assign min

	}
	else
	{
		// TODO: assign min
		
	}
	System.out.println("The minimum of a and b is: " + min);
}

}

If (a<b){min=a;}
else {min=b;}

min=a<b?a:b;

min=a;
If (b<a){min=b;}