我的电脑怎么了,大虾来帮忙呀!给金

cxcx9910 2003-08-17 12:55:05
我写了一个最简单的HELLO的程序
一用JAVAC就出现
^
^
c:\jdk\java\nio\DirectShortBufferU.java:269: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (spos <= slim);
^
c:\jdk\java\nio\DirectShortBufferU.java:274: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferU.java:286: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (spos <= slim);
^
c:\jdk\java\nio\DirectShortBufferU.java:307: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferU.java:332: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferS.java:165: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferS.java:217: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferS.java:269: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (spos <= slim);
^
c:\jdk\java\nio\DirectShortBufferS.java:274: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferS.java:286: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (spos <= slim);
^
c:\jdk\java\nio\DirectShortBufferS.java:307: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectShortBufferS.java:332: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectByteBuffer.java:661: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
c:\jdk\java\nio\ByteBufferAsIntBufferB.java:34: warning: as of release 1.4, ass
rt is a keyword, and may not be used as an identifier
assert (pos <= cap);
^
c:\jdk\java\nio\ByteBufferAsIntBufferB.java:57: warning: as of release 1.4, ass
rt is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
c:\jdk\java\nio\DirectByteBuffer.java:752: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
c:\jdk\java\nio\DirectByteBuffer.java:843: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
c:\jdk\java\nio\DirectByteBuffer.java:934: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
c:\jdk\java\nio\Bits.java:626: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.Bits
assert (reservedMemory > -1);
^
c:\jdk\java\lang\CharacterDataLatin1.java:284: cannot resolve symbol
symbol : method assert (boolean)
location: class java.lang.CharacterDataLatin1
assert (data.length == (256 * 2));
^
c:\jdk\java\lang\CharacterData.java:956: cannot resolve symbol
symbol : method assert (boolean)
location: class java.lang.CharacterData
assert (data.length == (678 * 2));
^
c:\jdk\java\nio\DirectByteBufferR.java:165: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBufferR
assert (pos <= lim);
^
c:\jdk\java\nio\DirectByteBufferR.java:479: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBufferR
assert (off <= lim);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
100 errors
206 warnings
这个程序原来是可以,现在它怎么了呀
...全文
17 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
cxcx9910 2003-08-18
  • 打赏
  • 举报
回复
什么呀我的的程序就没用到assert
他的原程序是
public class hello
{
public static void main(String args[])
{
System.out.println("hello");
}
}
我也太感奇怪了

seaman0916 2003-08-17
  • 打赏
  • 举报
回复
看来楼主一定是高手!哈哈
Korny 2003-08-17
  • 打赏
  • 举报
回复
assert关键字不能用来做标识符的
你的最简单的HELLO程序有这么复杂吗?
onefox 2003-08-17
  • 打赏
  • 举报
回复
它说了啊:is a keyword

assert 是 java 的一个关键词,

不能用来做变量名或方法名……

换个单词就行

62,614

社区成员

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

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