Java
soslord
这个作者很懒,什么都没留下…
展开
-
从键盘输入整数,判断其最大值。
第一种方法:运用bufferedReader类读入数据,并转换成整数。 import java.io.*;public class keyboard { static int array[] = new int[3]; public static void main(String[] args) throws IOException{ //定义缓冲区读入对原创 2009-11-12 11:11:00 · 1302 阅读 · 0 评论 -
java字符串处理
1、length() 字符串的长度 例:char chars[]={a,b.c}; String s=new String(chars); int len=s.length();2、charAt() 截取一个字符 例:char ch; ch="abc".charAt(1); 返回b3、getChars() 截取多个字符 void getChars(转载 2009-11-19 11:22:00 · 579 阅读 · 0 评论