for classes you can assign any type inside in angled brackets <>
class testing<T>{
T val;
public testing(T val){
this.val=val;
}
}
... in the main:
testing<Integer> test = new testing(1);
this is similar to how you would do it in C++ with templates