HW2.19

时间:2021-02-05 20:37:02

HW2.19

 public class Solution
 {
     public static void main(String[] args)
     {
         char outcome;
         long randomNumber;

         while(true)
         {
             randomNumber = System.currentTimeMillis() % 91;
             if(randomNumber >= 65 && randomNumber <= 90)
                 break;
         }

         outcome = (char)randomNumber;
         System.out.println("The random char is " + outcome);
     }
 }

相关文章