fork download
  1. class Ideone
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. foo("one", "two", "three");
  6. foo(new String[] { "four", "five", "six"});
  7. }
  8.  
  9. private static void foo(String... args) {
  10. for (String s : args) {
  11. System.out.println(s);
  12. }
  13. }
  14. }
Success #stdin #stdout 0.11s 320576KB
stdin
Standard input is empty
stdout
one
two
three
four
five
six