1.内容总览 while循环 格式化输出 运算符 and or not 编码的初识 2. 具体内容 while 循环 where:程序中:你需要重复之前的动作,输入用户名密码时,考虑到while循环. what:while 无限循环. how: 基本结构: while 条件: 循环体 初识循环 while True: print('狼的诱惑') print('我们不一样') print('月亮之上') print('庐州月') print('人间') 循环如何终止?--3种 改变条件. flag
一.数据类型自动转换 public class Test{ public static void main(String[] args){ int a = 1; double b = 1.5; double a_b_count = a+b; //整型与双精度型相加时,结果会自动转换为双精度型 String c = "凌"; char d = '晨'; char e = '好'; String c_d_e_content = c+d+e; //字符型与字符串型相加时,结果会自动转换为字符