How can I initialize a String array with length 0 in Java?

后端 未结 6 1765
悲哀的现实
悲哀的现实 2020-12-23 00:27

The Java Docs for the method
String[] java.io.File.list(FilenameFilter filter)
includes this in the returns description:

The arra

6条回答
  •  囚心锁ツ
    2020-12-23 00:56

    String[] str = {};
    

    But

    return {};
    

    won't work as the type information is missing.

提交回复
热议问题