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(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
public class Parent {
int change() {…}
}
class Child extends Parent {
}
Which methods can be added into class Child?()
A. public int change(){}
B. int chang(int i){}
C. private int change(){}
D. abstract int chang(){}
A. long l = 4990;
B. int i = 4L;
C. float f = 1.1;
D. double d = 34.4;
E. double t = 0.9F;
String s= "hello";
String t = "hello";
char c[] = {’h’,’e’,’l’,’l’,’o’} ;
Which return true?()
A. s.equals(t);
B. t.equals(c);
C. s==t;
D. t.equals(new String("hello"));
E. t==c;
A. char str[];
B. char str[][];
C. String str[];
D. String str[10];
A. public int MAX_LENGTH=100;
B. final int MAX_LENGTH=100;
C. final public int MAX_LENGTH=100;
D. public final int MAX_LENGTH=100;
A. private
B. no modifier
C. public
D. protected
public class Parent {
public int addValue( int a, int b) {
int s;
s = a+b;
return s;
}
}
class Child extends Parent {
}
Which methods can be added into class Child?()
A. int addValue( int a, int b ){// do something...}
B. public void addValue (){// do something...}
C. public int addValue( int a ){// do something...}
D. public int addValue( int a, int b )throws MyException {//do something...}
Given the following code:
public class Person{
int arr[] = new int[10];
public static void main(String a[]) {
System.out.println(arr[1]);
}
}
Which statement is correct?()
A. When compilation some error will occur.
B. It is correct when compilation but will cause error when running.
C. The output is zero.
D. The output is null.
Given the following code:
public class Person{ static int arr[] = new int[10];
public static void main(String a[]) {
System.out.println(arr[1];)
}
}
Which statement is correct?()
A. When compilation some error will occur.
B. It is correct when compilation but will cause error when running.
C. The output is zero.
D. The output is null.
最新试题
Which statement is true about the set variable on line 12?()
What is the result?()
A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()
Which statement is true?()
What is the result?()
What is the output if the main() method is run?()
Which two can be results?()
What is the appropriate definition of the hashCode method in class Person?()
A programmer iterates over the TreeSet and prints the name of each Drink object. What is the result?()
What is the result?()