I got part of this code written, but I am not sure how to make it so that it will return the smaller of the two passwords entered.
package password; /*50. Write a program that reads two words representing passwords from //the Java console and outputs the number of characters in the smaller //of the two. For example, if the two words are open and sesame, then //the output should be 4, the length of the shorter word, open. */ import java.util.Scanner; public class PassWord { public static void main( String [] args ) { Scanner scan = new Scanner (System.in ); System.out.print("Enter your first Password > " ); String passOne = scan.next( ); System.out.print("Enter your 2nd Password > " ); String passTwo = scan.next ( ); System.out.print("Your password is " + passOne + " Your other password is " + passTwo); } }