0

how to save strings into an array and display it? JAVA

This is pretty long code. https://code.sololearn.com/cbJNq1Vcrzmg I don't know how to save each string into an array and display it... I really appreciate any help!

11th Jun 2017, 1:36 AM
Kurt Cobain
Kurt Cobain - avatar
1 Respuesta
+ 2
Like this: String[] strings = new String[2]; strings[0] = "hello"; strings[1] = "world"; for (String s : strings) { System.out.println(s); }
11th Jun 2017, 2:19 AM
Jason Runkle
Jason Runkle - avatar