Type Error in Java 7 -
Type Error in Java 7 -
i have dialog box class extends jdialog. 1 method in class this:
public char gettype() { homecoming ((string)filetypecombo.getselecteditem()).charat(0); } where filetypecombo this:
jcombobox filetypecombo = new jcombobox( new string[] { "local", "shared", "remote" } ); i getting next error when effort compile using java 7:
[javac] /home/satin/decodes-8.0/lrgs/gui/netlistdialog.java:112: error: gettype() in netlistdialog cannot override gettype() in window [javac] public char gettype() [javac] ^ [javac] homecoming type char not compatible type it compiles fine java 6.
regards.
it because of method added window class in java 7.
the super class, window, has public window.type gettype() method signature in java 7. attempting override method, returning char instead of window.type object, compilation error occurring.
in java 6 method doesn't exist, don't errors.
java-7
Comments
Post a Comment