2017-04-07 91 views

回答

0

這是您的解決方案:

public class NewMain { 
    public static void main(String args[]) throws ParseException { 
     Scanner s = new Scanner(System.in); 
     char yes; 
     do { 
      System.out.println("Hi"); 
      yes = s.next().charAt(0); 
     } while (yes == 'Y'); // if u enter 'Y' the it will continue 

    } 
} 

要退出進入其他任何東西,然後'Y'

+0

好的,謝謝 –