想了解一下实际工作中需要解决的 NP-complete 问题?# Engineering - 工程
c*n
1 楼
the following code compiles fine under commandline
but it fails in eclipse, with error msg:
....having the same erasure ......
I checked the .class bytecode , it is exactly the same for the 2
methods (except for return and exception), caller code is able to pick
up the differences because javac actually did add annotation about the
generics parameter, so "erasure" is a lie!!!!!
import java.util.Map;
class ffff{
private static Integer fun(Map s) throws Exception {
return null;}
private static String fun(Map s){
return null;
}
}
but it fails in eclipse, with error msg:
....having the same erasure ......
I checked the .class bytecode , it is exactly the same for the 2
methods (except for return and exception), caller code is able to pick
up the differences because javac actually did add annotation about the
generics parameter, so "erasure" is a lie!!!!!
import java.util.Map;
class ffff{
private static Integer fun(Map
return null;}
private static String fun(Map
return null;
}
}