Determine Two Numbers which is the largest or Both Numbers are Equal in Java
In this Java program, the application will determine two input numbers which is the largest, or both the numbers input are equal. This is the same solution of Deitel & Deitel exercise 2.17 in Chapter 2. Write an application that ask the user to enter two integers, obtains the two numbers of the user and display the larger number followed by the words "is larger" in an information message dialog. If the number are equal, print the message "These numbers are equal". public class LargerOrEqual { public static void main(String args[]){ //Declare varables String fNumber, sNumber, result; int numb1, numb2; //Read the user inputs fNumber = JOptionPane.showInputDialog("Enter first number: "); sNumber = JOptionPane.showInputDialog("Enter second number: "); //Conver input string to integer values numb1 = Integer.parseInt(fNumber); numb2 = Integer.parseInt(sNumber); result = ""; if (numb1 > numb2) result = numb...