學(xué)神ITKali安全高級工程師進階班
public class Test {
? ?public static <T> T cast(Object obj) {
? ? ? ?return (T) obj;
? ?}
? ?public static void main(String[] args) {
? ? ? ?String string = cast("");
? ? ? ?Integer i = cast(123);
? ?}}
標(biāo)簽:
public class Test {
? ?public static <T> T cast(Object obj) {
? ? ? ?return (T) obj;
? ?}
? ?public static void main(String[] args) {
? ? ? ?String string = cast("");
? ? ? ?Integer i = cast(123);
? ?}}