Java学习之Hello World 第一个小程序

class  hello{
	public static void main(String[] args) 
	{
		int b,c;
		char a = 'b' ;
		b=1;c=2;
		
		System.out.println(a);
		System.out.println(b+c);
	}
}

/*
变量必须先声明,赋值, 后使用
变量在只能在其作用域内生效,离开范围无效
同一个作用域内,不允许生成2个同名的
*/

posted @ 2019-06-02 23:36  指剑  阅读(104)  评论(0)    收藏  举报