2010年9月1日
摘要: 1、indexOf:返回指定子字符串在此字符串中第一次出现的索引值。(1)例子:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package com.java.test;publicclass T {publicstaticvoid main(String args[]) {String s ="hahaheihei";String s1 ="ha";String s2 ="h" 阅读全文
posted @ 2010-09-01 09:08 snowdrop 阅读(274) 评论(0) 推荐(0)
摘要: void 方法中的return语句,跳出的范围是他所在的上层方法的块,不是整个类,也不是他的上一级括号例子:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package com.java.test;publicclass T {int countNumber=4;publicvoid test(){if(countNumber >0){countNumber --;System.out.println(countNumber);r 阅读全文
posted @ 2010-09-01 09:04 snowdrop 阅读(4810) 评论(0) 推荐(0)