hello all
when I do javac ,I often warn to use -Xlint
,and then the result has one or more warning.
As example I attach the javac's result below.The question is
how to eliminate warning

thank you
denny

C:\LJava>javac -Xlint -d build src\KwitansiJava04.java
warning: [path] bad path element "%classpath%": no such file or directory
src\KwitansiJava04.java:65: warning: [rawtypes] found raw type: JComboBox
    JComboBox comboSebut;
    ^
  missing type arguments for generic class JComboBox<E>
  where E is a type-variable:
    E extends Object declared in class JComboBox
src\KwitansiJava04.java:316: warning: [rawtypes] found raw type: JComboBox
                comboSebut=new JComboBox(sebutan);
                               ^
  missing type arguments for generic class JComboBox<E>
  where E is a type-variable:
    E extends Object declared in class JComboBox
src\KwitansiJava04.java:316: warning: [unchecked] unchecked call to JComboBox(E[
]) as a member of the raw type JComboBox
                comboSebut=new JComboBox(sebutan);
                           ^
  where E is a type-variable:
    E extends Object declared in class JComboBox
src\KwitansiJava04.java:59: warning: [serial] serializable class KwitansiJava04
has no definition of serialVersionUID
public class KwitansiJava04 extends JFrame implements  ActionListener,KeyListene
r {
       ^
5 warnings

First is an error in your classpath - delete the invalid directory
The last one (serialVersionUID) is an annoying silly one that you can ignore, or add the following var to your class
static final long serialVersionUID = 1L;
All the others are warnings about generics or absence of generics - too much to explain here, but the following tutorial will explain all:
http://download.oracle.com/javase/tutorial/java/generics/index.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.