[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Intermediate Java Tutorial – 18 – Implementing a Generic Method
by
Tags:
Comments
21 responses to “Intermediate Java Tutorial – 18 – Implementing a Generic Method”
-
please replace my uni teachers
-
Thank you Bucky, this is so useful! I finally got an idea about what generics class is. Thanks to you! I'm not sure why my professor explain it so complicated
-
Thank god I'm doing my data structures and algorithms in java. Another semester with the buckmeister 🙂
-
my god this is SO much more easier to understand
-
why you dont use Object class instead of T?
-
thanks, Great Explanation.
-
How come this code does not work with primitive arrays? ex. int[] instead of Integer[]
-
what should i do if i want to print collections
-
Awesome man 🙂
-
oh shit wuddup this is useful
-
So is it good programming practice to use generic methods? Or should one use specific data types whenever possible?
-
Why would you use generics when you could just use an Object[]?
-
Why aren't we using int and char?
-
Thanks so much Bucky, these tutorials are just awesome. I've watched every one since the first beginner tutorial and I've learned so much. Generics always looked scary to me but you explain it so simply it just clicks. Huge credit to you man.
-
type sysout and then control space for a SHORTCUT for System.out.println("");
Only in elcipse -
lol its funny that u start worrying about code conventions only now 1:06 … well… better late than never ey? other than that best tutorials ever!!! thx for putting them up!!!
-
Why do we need a wrapper class Integer and Character here?? Instead of having int and char..
-
hello my name is jeff
-
import java.util.*;
public class julian {
public static void main(String[] args) {Integer[] iray = {1,2,3,4};
Character[] cray = {'b', 'u', 'c', 'k'};printMe(iray);
printMe(cray);
}public static <T> void printMe(T[] x) {
for(T b : x)
System.out.printf("%s ", b);
System.out.println();
}
} -
its worth mentioning that generic methods can only use the parametrized type within the scope of the block
-
What's the difference between Integer[] and int[] array (Character[] and char[] array) ?
I know Integer and Character are built-in classes ad int and char are datatypes but still what's the difference between using the two ?
Leave a Reply