Compiling Java code written for 1.5 to work with 1.4 JRE?

后端 未结 4 1976
抹茶落季
抹茶落季 2021-01-05 05:21

I have a project that uses generics and a few Java 1.5/6 bits and pieces. Is it possible to compile this code to work on a system running a 1.4 JRE?

I use an ANT bui

4条回答
  •  灰色年华
    2021-01-05 06:03

    Generics are implemented by type erasure so they should work before generics were introduced. However you would be unable to compile the code with an older version of the compiler (I don't know why you would want to do that)

提交回复
热议问题