Eclipse Kepler

时间:2017-11-30 21:11:45

标签: java eclipse syntax ide

(第17-22行)

public List<Course> getAllCourses(String exampleId){
    List<Course> courses = new ArrayList<>();       
    courseRepository.findByExampleId(exampleId)
        .forEach(courses::add);
    return courses;
}

错误1:

  

令牌“:”上的语法错误,预期的EnhancedForStatementHeaderInit   在这之后   token CourseService.java / example / src / main / java / com / example / app / courses line   20 Java问题

错误2:

  

令牌上的语法错误,放错位置   construct(s)CourseService.java / example / src / main / java / com / example / app / courses line   19 Java问题

这适用于eclipse霓虹灯,但我下载了kepler,它似乎不再起作用了,我不完全确定原因。

0 个答案:

没有答案
相关问题