public boolean equals(Object obj)
public int length()
public String concat(String str):拼接字符串
public char charAt(int index):获得索引对应的单个字符.
public boolean indexOf(String str):查找参数字符串在本字符串中首次出现的索引位置.
字符串一旦创建, 不再变更.
public boolean equals(Object obj)
public int length()
public String concat(String str):拼接字符串
public char charAt(int index):获得索引对应的单个字符.
public boolean indexOf(String str):查找参数字符串在本字符串中首次出现的索引位置.
字符串一旦创建, 不再变更.
equals
双引号直接写的字符串在常量池中, new的不再常量池中.
创建字符串对象的方式
1. public String()
2. public String(char[] array)
3. public String(byte[] array)
4. String str = "string";
char zifu1='A';
System.out.println('A'+1);//输出66
计算机的底层会用一个数字来代表字符.
1. 类型转换分为两种, 分别是自动类型转换和强制类型转换.
2. 强制类型转换不建议使用, 因为很可能导致数值精度损失和数据溢出.
3. 以下三种类型byte/short/char在进行运算的时候会首先提升成int变量
比如:
byte num1 = 1;
byte num2 = 2;
byte result = num1+num2;//这里就会报错, 因为右边自动转换成int类型, 左边是byte类型, 并没有强制类型转换.
4. boolean类型不能发生数据转换.
清屏:cls
1、消息队列五种模型
1、请求处理过程:
1、跨域名问题的解决方案:
1、跨域问题
1、Nginx作为反向代理服务器:
1、项目结构: