Hi all,
I'm new to Java and I used to program in C++. Now I know that there is a way in C++ to use the templates to create generic methods that can take different types of variable as input. Is this applicable in Java??
I have written this method:
static boolean inject1=true; public static boolean check_equality(int v11, int v21){ if(v11==v21) if(inject1){ inject1=false; return false; } else return true; if(inject1) return true; return false; }
Now I want this method to take int, double and float for example as inputs.
Any suggestions are appreciated.