Skip to content

ArrayList requires a type  #1

@rianfowler

Description

@rianfowler

When I go to build this application, I get errors on all of the ArrayLists. I was able to resolve them by giving them explicit types. For example on line 64 of the Products Controller:

List<Tag> tags = new ArrayList<>();

Gives me an error: illegal start of type
screenshot_7_12_13_9_48_am-4

When I change it to:

List<Tag> tags = new ArrayList<Tag>();

The application compiles and runs just fine. I'm not experienced with Java at all so this might be an oversight with my configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions