apl-mhd

java generic data type

Jan 23rd, 2019
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. public class AnyDataTyoe<T> {
  4.  
  5.  
  6.     T t;
  7.  
  8.     void  setT(T t){
  9.  
  10.  
  11.         this.t =t;
  12.  
  13.     }
  14.  
  15.     T getT(){
  16.  
  17.  
  18.         return t;
  19.     }
  20.  
  21.  
  22.  
  23.  
  24. }
RAW Paste Data