大数据基础技能试题与答案.docx

. . . . . . . . Java 基础 Which of the following will compile correctly? float f=10f; float f=10.1; float f=10.1f; byte b=10b; Which declarations of identifiers are legal $persons TwoUsers *point this _endline Which statement of assigning a long type variable to a hexadecimal value is correct long number = 345L; long number = 0345; long number = 0345L; long number = 0x345L Which of the following fragments might cause errors String s = Gone with the wind; String t = good ; String k = s + t; String s = Gone with the wind; String t; t = s[3] + one; String s = Gone with the wind; String standard = s.toUpperCase(); String s = home directory; String t = s - directory; Which are syntactically valid statement at// point x class Person { private int a; public int change(int m){ return m; } } public class Teacher extends Person { public int b; public static void main(String arg[]){ Person p = new Person(); Teacher t = new Teacher(); int i; // point x } } i = m; i = b; i = p.a; i = p.change(30); i = t.b. Which layout manager is used when the frame is resized the buttonss position in the Frame might be changed BorderLayout FlowLayout CardLayout GridLayout Given the following code fragment: 1) public void create() { 2} Vector myVect; 3} myVect = new Vector(); 4} } Which of the following statements are true The declaration on line 2 does not allocate memory space for the variable myVect. The declaration on line 2 allocates memory space for a reference to a Vector object. The statement on line 2 creates an object of class Vector. The statement on line 3 creates an object of class Vector. The statement on line 3 allocates memory space for an object of class Vector Which of the following answer is correct to express the value 8 in octal number A. 0x10 08 0x8 Which are not Java keywords TRUE sizeof const super void Which of the following statements are true The equals() method determines if reference values refer to the same object. The == operator determines if the contents and ty

文档评论(0)

1亿VIP精品文档

相关文档