首页 > 学院 > 开发设计 > 正文

使用eclipse开发

2019-11-14 21:57:34
字体:
来源:转载
供稿:网友
使用eclipse开发

Eclipse下载地址:http://www.eclipse.org/

下载后进行解压缩,点击eclipse.exe即可使用eclipse

workspace:工作区 PRoject:项目

打开eclipse,在Package Explorer右键选择New→java Project,输入Project Name,其余默认

用同样的方法创建一个Package,Interface和class

package chavez.wang;public interface Student {public void study();public void eat();}
package chavez.wang;public class ChineseStudent implements Student {@Overridepublic void study() {System.out.println("学习");}@Overridepublic void eat() {System.out.println("吃饭");}}
package chavez.wang;public class Test {public static void main(String[] args) {ChineseStudent cs = new ChineseStudent();cs.study();cs.eat();}}

当对源文件进行保存时,eclipse会自动进行编译。要运行的话,选中文件,右键选择Run As ,结果输出在Console窗口中


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表