摘要: 解决了一小问题撒!这段代码挺好,大家可以See Seeclass Test3 { private int t; Test3(int t) { this.t = t; } static void changeRef(Test3 te) { te = new Test3(1);// System.out.println(te.t); } public static void main(String[] args) { Test3 test = new Test3(2); changeRef(test); System.out.println(test.t); }} 阅读全文
posted @ 2013-03-19 21:27 翻滚的小豆哥 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.cnblogs.com/i2xd/archive/2010/01/17/1649825.html1. 简单类型是按值传递的Java 方法的参数是简单类型的时候,是按值传递的 (pass by value)。这一点我们可以通过一个简单的例子来说明:public class Test { public static void test(boolean test) { test = ! test; System.out.println("In test(boolean) : test = " + test); } public static void 阅读全文
posted @ 2013-03-19 20:31 翻滚的小豆哥 阅读(1204) 评论(0) 推荐(0) 编辑
摘要: NO.1class Lader{double above,bottom,height;Lader(){}Lader(double a,double b,double h){above=a;bottom=b;height=h;}public void setAbove(double a){above=a;}public void setBottom(double b){bottom=b;}public void setHeight(double h){height=h;}double computeArea(){return(above+bottom)*height/2.0;}}public c 阅读全文
posted @ 2013-03-19 18:54 翻滚的小豆哥 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 首先安装并配置好Java的运行环境,安装好EditPlus软件。实现对JAVA的编译首先,从菜单“工具(Tools)”->“配置用户工具...”进入用户工具设置。在类别里展开“工具”树形菜单->“用户工具”,选择“组和工具项目”中的“Group1”,点击面板右边的“组名称...”按钮,将文本“Group1”修改成“编译JAVA程序”。然后选择修改的组“编译JAVA程序”,点击“添加新工具”按钮,选择程序,建立“新建程序”,选中它。然后就是最重要的步骤(修改属性):1.添加编译功能“菜单文字”里的内容修改为“JAVAC”;“命令”选择安装JDK后的BIN目录中的编译程序JAVAC.E 阅读全文
posted @ 2013-03-19 11:54 翻滚的小豆哥 阅读(1058) 评论(0) 推荐(0) 编辑