aspose file tools*
The moose likes Beginning Java and the fly likes What's wrong with this code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What Watch "What New topic
Author

What's wrong with this code?

Chaturaka Gunatilaka
Greenhorn

Joined: Oct 06, 2012
Posts: 16


This code is not excuting.Why?Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42950
    
  70
I can compile and run it fine. What do you think is wrong with it? In other words, what were you expecting it to do differently?
Chaturaka Gunatilaka
Greenhorn

Joined: Oct 06, 2012
Posts: 16


when I try to compile this I got the above message.
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

What's wrong with this code?

Indentation.

Besides, when you compile the code with:

you'll get details about why the compiler complains. And after you see that message, you can refer back to this topic where someone else has provided a solution for the same issue.


The quieter you are, the more you are able to hear.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40059
    
  28
Please use copy‑and‑paste for such messages.
Try javac -Xlint:unchecked and compile it again. You can find out about the lint tool here and here.
That particular warning (not error) probably means that you are using a parametrised type (probably the Combo Box) without giving it an actual type parameter. If you add an actual type parameter to the combo box declaration and don’t use a raw type, you can be sure it will work.
Another way to put it: you ought to use generics somewhere and you didn’t. If you find old versions of the combo box API you can see that only the most recent versions of combo box actually had a formal type parameter. You can read about generics in the Java Tutorials.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What's wrong with this code?