package cn.itheima;
/**
* Created by Dang
* 2019/2/27
* 10:04
*/
public class Day01Test {
public static void main(String[] args) {
int i = 10;
//局部变量 (在某个地方的变量) 定义变量的时候,此变量在哪个大括号里面,就属于哪个大括号的局部变量
{
i = 20;
System.out.println(i);
int a = 5;
System.out.println(a);
}
// a = 15;
int b = 1;
int c = 2;
System.out.println(b + " + " + c + " = " + (b + c));
//int类型和字符串相加减 此时 加好带表的意思叫拼接
}
}
|
|