Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class thesaurus {
- public static void main(String[] args) {
- String word = "big";
- String[][] thesaurus = {{"big", "huge", "massive", "gargantuan"},
- {"happy", "joyful", "gleeful"}, {"sad", "dejected", "sorrowful", "wretched", "crestfallen"}};
- for (int row = 0; row < thesaurus.length; row++){
- for (int column = 0; column < thesaurus[row].length; column++){
- if (!thesaurus[row][column].equals(word)){
- System.out.println(thesaurus[row][column]);
- }
- }
- }
- }
- }
- //Prints out:
- //[Ljava.lang.String;@366412da
- //[Ljava.lang.String;@6411c21b
- //[Ljava.lang.String;@49deadf0
Advertisement
Add Comment
Please, Sign In to add comment