Suvojit Chakraborty wrote:
What do you expect?
Suvojit Chakraborty wrote :
..... But I was really expecting another error. In line public static Iterator reverse(List list)
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
warnings are not errors.if you apply generic, it will disappear.
Warning will come if you JVM5 or after versions, but those are not problem.
What do you expect?
Suvojit Chakraborty wrote :
..... But I was really expecting another error. In line public static Iterator reverse(List list)
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
I don't understand why do I get warning with add(), I am using pre generics syntax completely, so why does it gives me warning???
be a well encapsulated person, don't expose your privates, unless you public void getWife()!
[b]public static void reverse(List list)
be a well encapsulated person, don't expose your privates, unless you public void getWife()!
Stephen Davies wrote:
[b]public static void reverse(List list)
No, you are mistaken, look at the Java 5 API, the signature is actually public static void reverse(List<?>list)
What I meant was, we already have a definition for reverse()[Collections.reverse()] which is a static method. Are we not trying to redefine it in the program. So isnt this act of violation??