多项选择题
11. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12?()
A. final B. static C. native D. public E. private F. abstract G. protected
Given the following code: 1) class Parent { 2) ...
单项选择题
Given the following code: 1) class Parent { 2) private String name; 3) public Parent(){} 4) } 5) public class Child extends Parent { 6) private String department; 7) public Child() {} 8) public String getValue(){ return name; } 9) public static void main(String arg[]) { 10) Parent p = new Parent(); 11) } 12) } Which line will cause error?()
A. line 3 B. line 6 C. line 7 D. line 8 E. line 10
AButtonispositionedinaFrame.OnlyheightoftheButtonisaffe...
单项选择题A Button is positioned in a Frame. Only height of the Button is affected by the Frame while the width is not. Which layout manager should be used?()
A. FlowLayout B. CardLayout C. North and South of BorderLayout D. East and West of BorderLayout E. GridLayout
class Parent { String one, two; public Parent(Stri...
class Parent { String one, two; public Parent(String a, String b){ one = a; two = b; } public void print(){ System.out.println(one); } } public class Child extends Parent { public Child(String a, String b){ super(a,b); } public void print(){ System.out.println(one + " to " + two); } public static void main(String arg[]){ Parent p = new Parent("south", "north"); Parent t = new Child("east", "west"); p.print(); t.print(); } } Which of the following is correct?()
A. Cause error during compilation. B. south east C. south to north east to west D. south to north east E. south east to west