Answers for "<? extends I>"

0

class extends

class className extends otherClassName{
	// code
}
Posted by: Guest on February-17-2021
0

<? extends I>

public static void printListObject(List<Object> list) {    
    for (Object element : list) {        
        System.out.print(element + " ");    
    }        
}    

public static void printListWildCard(List<?> list) {    
    for (Object element: list) {        
        System.out.print(element + " ");    
    }     
}
Posted by: Guest on August-01-2021

Browse Popular Code Answers by Language