| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 587 人关注过本帖
标题:JAVA求助
只看楼主 加入收藏
1999
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2005-10-16
收藏
 问题点数:0 回复次数:2 
JAVA求助
1我用JCreat来编辑JAVA程序,但我发现当我作APPLET时,有的时候在一个文件夹中测试时会发现错误,而到了
另一个文件夹中就可以了,请问是不是在一个文件夹中后来的.class文件不能覆盖原来.class的原因?


2 在向量中, public void set(int index,Objict o)
             public void setElementAt(Objict o,int index)

  两者的区别是什么?
搜索更多相关主题的帖子: JAVA JAVA void int public 
2005-10-16 16:17
kai
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:52
帖 子:3450
专家分:59
注 册:2004-4-25
收藏
得分:0 
第一个问题我无法回答你,因为我不使用JCreator。 第二个问题的回答其实很简单,你自己其实也可以找到答案,算了这次我帮你找到了,下面是JDoc中的摘录:

setElementAt

public void setElementAt(E obj,
                         int index)
Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded. The index must be a value greater than or equal to 0 and less than the current size of the vector.
// 请注意这一段
This method is identical in functionality to the set method (which is part of the List interface). Note that the set method reverses the order of the parameters, to more closely match array usage. Note also that the set method returns the old value that was stored at the specified position.
Parameters:
obj - what the component is to be set to.
index - the specified index.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Als
size(), List, set(int, java.lang.Object)

你看看自己能不能看懂, 不明白再问.

自由,民主,平等,博爱,进步.
中华民国,我的祖国,中华民国万岁!中华民国加油!
本人自愿加入中国国民党,为人的自由性,独立性和平等性而奋斗!
2005-10-17 02:53
jeremydomett
Rank: 2
等 级:新手上路
威 望:3
帖 子:312
专家分:0
注 册:2004-6-10
收藏
得分:0 
用package 没?
你的文件夹 是不是和 它一样。

热爱编程........永不放弃.........
2005-10-17 14:41
快速回复:JAVA求助
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015025 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved