Tom wants to implement an ArrayList of Strings. Which one of the following lines of code cannot satisfy his requirements?

OA List strList = new ArrayList(); OB ArrayList strList = new ArrayList(); OC List<> strList = new ArrayList(); OD ArrayList strList4 = new ArrayList<>();

OC - List<> strList = new ArrayList(); (syntax error - missing type parameter for List)

Java ArrayList of Strings: Identifying the Incorrect Code

原文地址: https://www.cveoy.top/t/topic/ozWE 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录