Guest User

Untitled

a guest
Sep 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public class lab3 {
  2.  
  3. public static void main(String[] args) {
  4.  
  5. String [] greek = {"alpha", "beta", "gamma", "delta", "epsilon"};
  6.  
  7. String [] english= {"A", "B", "C", "D", "E"};
  8. String type = args[0];
  9.  
  10.  
  11. //Creating statement for answer
  12. if( type == greek[0]) System.out.println(type + " translates to " + english[0]);
  13. if( type == greek[1]) System.out.println(type + " translates to " + english[1]);
  14. if( type == greek[2]) System.out.println(type + " translates to " + english[2]);
  15. if( type == greek[3]) System.out.println(type + " translates to " + english[3]);
  16. if( type == greek[4]) System.out.println(type + " translates to " + english[4]);
  17.  
  18. }
  19.  
  20. }
Add Comment
Please, Sign In to add comment