摘要: 静态方法: String与其他数据类型之间的转换: int → String: String s = String.valueOf(int i) Stirng → int: int i = Integer.parseInt( s ); 方法: 1.string.trim()---去掉两端空格 2.s 阅读全文
posted @ 2014-03-19 19:50 rhythm of the rain 阅读(389) 评论(0) 推荐(0)
摘要: 1.static(用static修饰的方法或属性属于类,属于对象) 修饰属性:属于类而不属于对象,存在内存中的数据区,多个对象共享此属性。注意在继承的时候,父类中的static属性子类也共享。 修饰方法:可以由类直接调用,不用new对象。 修饰语句块:在classloader加载类的时候执行(new 阅读全文
posted @ 2014-03-19 15:26 rhythm of the rain 阅读(130) 评论(0) 推荐(0)