字符数组构建字符串也可
String s ="we are students";
String s1 ="we are students";
String s2 =new String ("we are students");
System.out.println(s==s1);
System.out.println(s.equals(s1));
s==s2
//基本类型判断的值
//str.toLowerCase() str.toUpperCase()
//对象数组是引用
//判断内=内容
//indexOf 找字符串里的字符
//lastTndexOf 下标没变,变的是从后面第一个字符
//indexOf('e',3)
//replace("学生","Student")
//long starttime=System.currentTimeMillis();
//StringBuffer 动态 sb.append("a")
//StringBuilder
//类 一个类不要写公有属性 要访问 学号写get 学号,set 学号。
//封装
//继承 子类都有父类的行为。
//里氏替换
//重写 抛异常
//多态,动态绑定,
//作业 。。。。。。。
网友评论