fork download
  1. class Ideone
  2. {
  3. public static void main(String[] args)
  4. {
  5. bar(foo());
  6. }
  7.  
  8. public static void bar(String... bars)
  9. {
  10. for (String s : bars)
  11. {
  12. System.out.println(s);
  13. }
  14. }
  15.  
  16. public static String[] foo()
  17. {
  18. return new String[]{"hello"};
  19. }
  20. }
Success #stdin #stdout 0.07s 2184192KB
stdin
Standard input is empty
stdout
hello