Deprecated Java JList feature -


as retirement project learn , use java worked way through deitel book bought in 2005. working on cypher-breaking program thought up. have not yet progressed using tool such eclipse. java compiler warns "java uses or overrides deprecated api" , "java uses unscheduled or unsafe operations" concerning use of jlist. << private jlist foundjlist; >> , << foundjlist = new jlist(); >>

the program executes ok through initial loading of data jlist simple array << foundjlist.setlistdata( sortedletter ); >> program throws error later in program on identical << foundjlist.setlistdata( sortedletter ); >> statement after have changed values in supporting array 'sortedletter" . <<< correction may 18 2014 >>>> had misunderstood purpose of setlistdata feature, assuming loaded jlist array instead of real purpose of binding array jlist. deleted instruction containing second setlistdata , went well.

can recommend modern java book cover modern alternative deprecated jlist feature?

try letting jlist know kind of data intended hold, like:

jlist<string> list = new jlist<string>(); 

or

jlist<string> list = new jlist<>(); 

depending on version of java.

as far current resources on java, try ol' java tutorial. i'll hazard guess , book may predate java 1.5, introduced first of number of big changes on next couple of versions, including: swingfx, generics (which ran into), jdbc, file i/o... name few things off top of head. book should repurposed doorstop @ point. i'd recommend using tutorial until hit specialized area of interest warrants book -- tutorial quite good.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -