fork download
  1. import java.util.Arrays;
  2. import java.util.List;
  3.  
  4. public class Main {
  5. public static void main(String[] args) {
  6. var smth = new String[]{"Foo", "ROOOO"};
  7. System.out.println(asd(smth));
  8. }
  9.  
  10. private static List<String> asd(String... smth) {
  11. for (var s : smth) {
  12. s = null;
  13. }
  14. return Arrays.asList(smth);
  15. }
  16. }
Success #stdin #stdout 0.1s 32500KB
stdin
Standard input is empty
stdout
[Foo, ROOOO]