jinfeng_wang

G-G-S,D-D-U!

BlogJava 首页 新随笔 联系 聚合 管理
  400 Posts :: 0 Stories :: 296 Comments :: 0 Trackbacks
http://java.sun.com/j2se/1.4/compatibility.html


The compiler now rejects import statements that import a type from the unnamed namespace. Previous versions of the compiler would accept such import declarations, even though they were arguably not allowed by the language (because the type name appearing in the import clause is not in scope). The specification is being clarified to state clearly that you cannot have a simple name in an import statement, nor can you import from the unnamed namespace.

To summarize, the syntax

import SimpleName;

is no longer legal. Nor is the syntax
import ClassInUnnamedNamespace.Nested;

which would import a nested class from the unnamed namespace. To fix such problems in your code, move all of the classes from the unnamed namespace into a named namespace.
posted on 2008-01-25 11:52 jinfeng_wang 阅读(756) 评论(1)  编辑  收藏 所属分类: java

评论

# re: fuck u to death ---无法使用 "default package" 类 2010-09-29 19:10 jpj
kkkkkkkkkkkllllllllllllhhhhhhhhhhhhhooooooooo  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: