多项选择题

public class ConstOver { 
public ConstOver (int x, int y, int z)  { 
} 
}  
Which two overload the ConstOver constructor?()   

A. ConstOver ( ) { }
B. Protected int ConstOver ( ) { }
C. Private ConstOver (int z, int y, byte x) { }
D. Public Object ConstOver (int x, int y, int z) { }
E. Public void ConstOver (byte x, byte y, byte z) { }


您可能感兴趣的试卷

你可能感兴趣的试题

5.多项选择题

Integer i = new Integer (42); 
Long 1 = new Long (42); 
Double d = new Double (42.0);  
Which two expressions evaluate to True?()

A. (i ==1)
B. (i == d)
C. (d == 1)
D. (i.equals (d))
E. (d.equals (i))
F. (i.equals (42)

6.单项选择题

1.public class test ( 
2.public static void main (String args[])    { 
3.int  i = 0xFFFFFFF1; 
4.int  j = ~i; 
5.   
6.} 
7.)   
What is the decimal value of j at line 5?()  

A. 0
B. 1
C. 14
D. –15
E. An error at line 3 causes compilation to fail.
F. An error at line 4 causes compilation to fail.

7.多项选择题Which two are equivalent?()   

A. 3/2
B. 3<2
C. 3*4
D. 3<<2
E. 3*2^2
F. 3<<<2

8.单项选择题

public class X { 
public static void main (String[] args)  { 
byte b = 127; 
byte c = 126; 
byte d = b + c; 
} 
}  
Which statement is true?()  

A. Compilation succeeds and d takes the value 253.
B. Line 5 contains an error that prevents compilation.
C. Line 5 throws an exception indicating “Out of range”
D. Line 3 and 4 contain error that prevent compilation.
E. The compilation succeeds and d takes the value of 1.

9.单项选择题Which is a valid identifier?()  

A. false
B. default
C. _object
D. a-class

10.单项选择题

public class Mycircle { 
public double radius; 
public double diameter; 
public void setRadius(double radius) 
this.radius = radius; 
this.diameter= radius * 2; 
} 
public double getRadius()   { 
return radius; 
} 
Which statement is true?()  

A. The Mycircle class is fully encapsulated.
B. The diameter of a given MyCircle is guaranteed to be twice its radius.
C. Lines 6 and 7 should be in a synchronized block to ensure encapsulation.
D. The radius of a MyCircle object can be set without affecting its diameter.