摘要:
1.内部类的基本定义结构2.使用static定义内部类3.在方法中定义内部类从开发的角度内部类能少用就少用一. 概念:在一个类的下面有另一个类。class Outer{ private String msg = "Hello word" ; class Inner{ //定义... 阅读全文
posted @ 2016-01-10 22:02
式微胡不归
阅读(186)
评论(0)
推荐(0)
摘要:
尽可能不使用代码块1.普通代码块如果说一个代码块写在了方法里面,就叫普通代码块public class Test{ public static void main(String args[]){ if( true ){ int num = 10 ; } int num = 100 ; }}此程序可以... 阅读全文
posted @ 2016-01-10 20:39
式微胡不归
阅读(185)
评论(0)
推荐(0)
摘要:
1.统计产生对象的数量。 class Book{ private String title ; private static int num = 0 ; public Book (String book){ num ++ ; System.out.println("This is the num"... 阅读全文
posted @ 2016-01-10 20:04
式微胡不归
阅读(132)
评论(0)
推荐(0)
摘要:
http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html如果你不满足于使用现成的颜色主题的话,那我们来看一下如何修改环境配色。首先要掌握的命令是:highlight。" 使用默认的高亮(移除用户定义的高亮,即根据'ft'重新载入语法文... 阅读全文
posted @ 2016-01-10 19:04
式微胡不归
阅读(211)
评论(0)
推荐(0)
摘要:
class Book{ private String title ; private double price ; public Book(String title , double price ){ this.title = title ; this.price = price ; } publi... 阅读全文
posted @ 2016-01-10 16:51
式微胡不归
阅读(140)
评论(0)
推荐(0)

浙公网安备 33010602011771号