您的位置:首页 > 编程语言 > Java开发

StringDemo1.java

2008-05-18 10:59 267 查看
public class StringDemo{
public static void main(String[] args){
String text="hello";

System.out.println("字符串内容: "+text);
System.out.println("字符串长度:"+text.length());
System.out.println("等于hello? "+text.equals("hello"));
System.out.println("转为大写: "+text.toUpperCase());
System.out.println("转为小写: "+text.toLowerCase());
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: