Java Make Array D L R O W O L L E H Appear Hello World Output Q37193081

Java! How do I make the array {“D”, “L”, “R”, “O”, “W”}, {“O”,”L”, “L”, “E”, “H”} appear as “Hello World” for the output.


Answer


public class PrintArray { public static void main(String[] args) { String[][] data = {{“D”, “L”, “R”, “O”, “W”}, {“O”, “L”, “L”, “E”, “H”}}; for (int i = data.length-1; i >= 0; i–) { for (int j = data[i].length – 1; j >= 0; j–) {

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.