I was reading some tutorial where I came across terms like
Key<Car> rootKey = new Key<Car>(Car.class, 959);
What does <Car>
mean in this code? Why are these "<>" symbols used here? Please help.
The in your snippet represents a generic type specifier. You can instantiate class Key with a type other than Car and its methods will be type-safe for that variable at compile time.
For example, the following statement is type-safe, just as your example is:
Key<String> rootKey = new Key<String>(String.class, "someString");
See http://docs.oracle.com/javase/tutorial/java/generics/gentypes.html for more information.
Java Generic Types: http://docs.oracle.com/javase/tutorial/java/generics/gentypes.html