Raw Types
This lesson explains what raw types are.
We'll cover the following...
Question # 1
Consider the Printer
class below which is parametrized on type T
.
public class Printer<T> {
T item;
public Printer(T item) {
this.item = item;
}
public void consolePrinter() {
System.out.println(item.toString());
}
public void changeItem(T item) {
Access this course and 1400+ top-rated courses and projects.