M
mailmetosandeep
Can anyone suggest me a way wherein I can use java 1.5 features and the
source is compilable with 1.4
I tries out javac -source 1.4
But by doing so I am not able to use java 1.5 features
If I try to use 1.5 then there are errors on my 1.4 code i.e enum has
been reffered as an object ref but in 1.5 it is an type
I do not want to modify my 1.4 code and also wants to use 1.5 features
as well
Can someone suggest some way out for this
Suppose my class looks like
import java.util.Enumeration;
public class Hello {
public static void main(String[] args) {
System.out.printf("hello world"); // 1.5 feature
Enumeration enum ; // enum is a type in 1.5
}
}
Now I want to compile it in a go
Thanks in Advance
Sandeep
source is compilable with 1.4
I tries out javac -source 1.4
But by doing so I am not able to use java 1.5 features
If I try to use 1.5 then there are errors on my 1.4 code i.e enum has
been reffered as an object ref but in 1.5 it is an type
I do not want to modify my 1.4 code and also wants to use 1.5 features
as well
Can someone suggest some way out for this
Suppose my class looks like
import java.util.Enumeration;
public class Hello {
public static void main(String[] args) {
System.out.printf("hello world"); // 1.5 feature
Enumeration enum ; // enum is a type in 1.5
}
}
Now I want to compile it in a go
Thanks in Advance
Sandeep