Java Generics not working

后端 未结 5 645
孤独总比滥情好
孤独总比滥情好 2021-01-29 15:45

Why Generics not working in my machine. Why below code not working in Eclipse without Type casting to the String. I am using Java 1.6

package com.wi         


        
5条回答
  •  故里飘歌
    2021-01-29 16:03

    Write an ENTIRE PROGRAM that has in it the lines you've posted above. Do NOT copy-and-paste them, type them all in. Include lines necessary for a java program, i.e. public static void main (String[] args) etc. Do a 'clean' and 'build' on that program, and tell us the entire result. If that's still causes an error, post the entire program and the entire error.

    Also be aware that it is difficult (at best) to figure out what's wrong with another machine's configuration without being able to look at it; help us get information about what's there. Abrupt answers make it appear that it is really Java you want us to fix.

提交回复
热议问题