2014-09-25 5 views

답변

0

import java.util.Scanner; 

public class BasicClasses { 
    public static void main(String[] args) { 
     System.out.println("Welcome to First National Bank (FNB)"); 
     Scanner Key = new Scanner(System.in); 
     String Question = Key.nextLine(); 
     BasicClasses flix = new BasicClasses(); 

     System.out.print(" | Withdraw | or | Deposit | [ "); 
     Scanner Key1 = new Scanner(System.in); 
     String Which = Key.nextLine(); 

     if(Which == "withdraw") { 
      System.out.println("|Withdraw| - | How much do you Want to Withdraw?"); 

     } else { 
      System.out.println("|Deposit| - | How much will you be Depositing?"); 
    } 


} 

}는 다음과 같이 비교 : 이 if(Which.equals("withdraw"))

+0

Thnx이 :) 완벽했다. –

관련 문제