#5.1 major = 'Software Engineering' print("Is major =='Software Engineering'? I predict True.") print(major=='Software Engineering') print("Is major =='Software Engineering'? I predict False.") print(major=='Computer Science') #5.2 pri…
第五章习题 5.1 package ex0501; //[5.1]创建一个类,它包含一个未初始化的String引用.验证该引用被Java初始化成null class TestDefaultNull { public String string; } public class DefaultNull { public static void main(String[] args) { TestDefaultNull test = new TestDefaultNull(); System.out.…