请帮忙看看这个怎么回事?warning: [unchecked] unchecked call to put(K,V) as.....

rngguliu 2005-06-03 07:26:27
......
flightsTable = new Hashtable();
flightsTable.put(flightNum, new Flights(flightNum, numSeats, price));
.......

编译后 javac ResourceManagerImpl.java 产生如下信息: ^
Note: ResourceManagerImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
再编译后 javac -Xlint ResourceManagerImpl.java 产生如下警告:
ResourceManagerImpl.java:91: warning: [unchecked] unchecked call to put(K,V) as
a member of the raw type java.util.Hashtable
flightsTable.put(flightNum, new Flights(flightNum, numSeats, pri
ce));

请问如何解决??高手赐教。
...全文
1059 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ordos 2005-06-03
  • 打赏
  • 举报
回复
J2SE5 新功能 , 类似 C++ 模板.
它告诉你新建一个Hashtable 时应该指定 key 和 value 的类型,好让编译器帮你检查错误.

Hashtable<String,Date> map = new Hashtable<String , Date>();

以后你只能向里面 放 key 为 string , value 为 date 的东西, 别的就会出错.
au3反编译源码 myAut2Exe - The Open Source AutoIT Script Decompiler 2.9 ======================================================== *New* full support for AutoIT v3.2.6++ :) ... mmh here's what I merely missed in the 'public sources 3.1.0' This program is for studying the 'Compiled' AutoIt3 format. AutoHotKey was developed from AutoIT and so scripts are nearly the same. Drag the compiled *.exe or *.a3x into the AutoIT Script Decompiler textbox. To copy text or to enlarge the log window double click on it. Supported Obfuscators: 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.14 [June 16, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.15 [July 1, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.20 [Sept 8, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.22 [Oct 18, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.24 [Feb 15, 2008]' , 'EncodeIt 2.0' and 'Chr() string encode' Tested with: AutoIT : v3. 3. 0.0 and AutoIT : v2.64. 0.0 and AutoHotKey: v1.0.48.5 The options: =========== 'Force Old Script Type' Grey means auto detect and is the best in most cases. However if auto detection fails or is fooled through modification try to enable/disable this setting 'Don't delete temp files (compressed script)' this will keep *.pak files you may try to unpack manually with'LZSS.exe' as well as *.tok DeTokeniser files, tidy backups and *.tbl (<-Used in van Zande obfucation). If enable it will keep AHK-Scripts as they are and doesn't remove the linebreaks at the beginning Default:OFF 'Verbose LogOutput' When checked you get verbose information when decompiling(DeTokenise) new 3.2.6+ compiled Exe Default:OFF 'Restore Includes' will separated/restore includes. requires ';

62,623

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧