-3
private List<Manufacturer> productManufacturer = new LinkedList<Manufacturer>();

I am not able to understand why <> this symbol is here and Manufacturer inside it to define a LinkedList in Java.

1

1 Answer 1

3

Generics

Please read about generics

  private List<Manufacturer> productManufacturer = new LinkedList<>();

Assuming Manufacturer is a java class/interface/enum type, the above line defines a List that can hold only objects of type Manufacturer or its subclass types

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.