【java学习第二天】变量赋值
public class TestVar {public static void main (String[] testvar) { boolean b = true; int x,y = 10; double d = 3.1415; char c1,c2; c1 = '\u8776' ; c2 = 'c'; x = 12; System.out.println("b=" + b); System.out.println("x=" + x); System.out.println("y=" + y); System.out.println("c1=" + c1); System.out.println("c2" + c2); }}需注意:单字符 要用单引号。
ps:eclipse真的好大哦。。中文版要450MB。。。
页:
[1]