See More

public class PracticeTask1 { // write a java program that find maximum // of two numbers public static void main(String[] args) { int a=100; int b=10; if(a>b) { System.out.println("it is the max"); }else { System.out.println("max is :"+b); } // second way // int max= Math.max(a,b); // System.out.println(max); //3. way // int max2 = (a >= b) ? a : b; // System.out.println("Max2 is:" + max2); } }