Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class lab3 {
- public static void main(String[] args) {
- String [] greek = {"alpha", "beta", "gamma", "delta", "epsilon"};
- String [] english= {"A", "B", "C", "D", "E"};
- String type = args[0];
- //Creating statement for answer
- if( type == greek[0]) System.out.println(type + " translates to " + english[0]);
- if( type == greek[1]) System.out.println(type + " translates to " + english[1]);
- if( type == greek[2]) System.out.println(type + " translates to " + english[2]);
- if( type == greek[3]) System.out.println(type + " translates to " + english[3]);
- if( type == greek[4]) System.out.println(type + " translates to " + english[4]);
- }
- }
Add Comment
Please, Sign In to add comment