大數(shù)據(jù)基礎(chǔ)技能試題及答案.doc_第1頁
大數(shù)據(jù)基礎(chǔ)技能試題及答案.doc_第2頁
大數(shù)據(jù)基礎(chǔ)技能試題及答案.doc_第3頁
大數(shù)據(jù)基礎(chǔ)技能試題及答案.doc_第4頁
大數(shù)據(jù)基礎(chǔ)技能試題及答案.doc_第5頁
已閱讀5頁,還剩14頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、Java 基礎(chǔ)1. Which of the following will compile correctlyA) float f=10f;B) float f=;C) float f=;D) byte b=10b;2. Which declarations of identifiers are legal A. $personsB. TwoUsersC. *pointD. thisE. _endline3. Which statement of assigning a long type variable to a hexadecimal value is correctA. long nu

2、mber = 345L; B. long number = 0345; C. long number = 0345L; D. long number = 0x345L4. Which of the following fragments might cause errorsA. String s = Gone with the wind;String t = good ;String k = s + t;B. String s = Gone with the wind;String t;t = s3 + one;C. String s = Gone with the wind;String s

3、tandard = ();D. String s = home directory;String t = s - directory;5. Which are syntactically valid statement ati = m;B. i = b;C. i = ;D. i = (30);E. i = .6. Which layout manager is used when the frame is resized the buttonss position in the Frame might be changedA. BorderLayoutB. FlowLayoutC. CardL

4、ayoutD. GridLayout7. Given the following code fragment: 1) public void create() 2 Vector myVect;3 myVect = new Vector();4 Which of the following statements are trueA. The declaration on line 2 does not allocate memory space for the variable myVect. B. The declaration on line 2 allocates memory space

5、 for a reference to a Vectorobject.C. The statement on line 2 creates an object of class Vector.D. The statement on line 3 creates an object of class Vector.E. The statement on line 3 allocates memory space for an object of class Vector8. Which of the following answer is correct to express the value

6、 8 in octal numberA. 010B. 0x10C. 08D. 0x89. Which are not Java keywordsA. TRUE B. sizeof C. const D. super E. void10. Which of the following statements are trueA. The equals() method determines if reference values refer to the same object.B. The = operatordeterminesifthe contentsand type of two sep

7、arateobjectsmatch.C. The equals() method returns true only when the contents of two objects match.D. The classFileoverridesequals()to returntrueifthe contentsand typeoftwoseparate objects match.11. Which statements about inheritance are trueA. In Java programming language only allows single inherita

8、nce.B. In Java programming language allows a class to implement only one interface.C. In Java programming language a class cannot extend a class and implement a interface together.D. In Java programming language single inheritance makes code more reliable.12.1) class Person 2 public void printValue(

9、int i, int j) /*/ 3 public void printValue(int i)/*.*/ 4 5) public class Teacher extends Person 6 public void printValue() /*.*/ 7 public void printValue(int i) /*.*/8 public static void main(String args)9 Person t = new Teacher();10 (10);11 12 Which method will the statement on line 10 callA. on li

10、ne 2B. on line 3C. on line 6D. on line 713. Which are not Java primitive types A. shortB. Boolean C. unitD. float14 The method resume() is responsible for resuming which threads executionA. The thread which is stopped by calling method stop()B. The thread which is stopped by calling method sleep()D.

11、 The thread which is stopped by calling method suspend()15. Which of the following range of int is correctA. -27 27-1B. 0 232-1C. -215 215-1D. -231 231-116. Which keyword should be used to enable interaction with the lock of an object The flag allows exclusive access to that object.A. transientB. sy

12、nchronizedC. serializeD. static17. Which is the return type of the method main() A. intB. voidC. boolean D. static18. Given the following code:if (x0) first); else if (x-3) second); else third); Which range of x value would print the string secondA. x 0B. x -3C. x = -3D. x -319、 Which of the followi

13、ng answer is correct to express the value 10 in hexadecimal numberA. 0xAB. 0x16C. 0AD. 01620. Which statements about the garbage collection are trueA. The program developer must create a thread to be responsible for free the memory.B. The garbage collection will check for and free memory no longer n

14、eeded. C. The garbage collection allow the program developer to explicity and immediately free the memory.D. The garbage collection can free the memory used java object at expect time.21、 Given the following code:1) public class Test 2 int m, n;3 public Test() 4 public Test(int a) m=a; 5 public stat

15、ic void main(String arg) 6 Test t1,t2;7 int j,k;8 j=0; k=0;9 t1=new Test();10 t2=new Test(j,k);11 12 Which line would cause one error during compilationA. line 3B. line 5C. line 6D. line 1022、 Given the uncompleted code of a class:class Person String name, department;int age;public Person(String n)

16、name = n; public Person(String n, int a) name = n; age = a; public Person(String n, String d, int a) . part of the constructorA. Person(n,a);B. this(Person(n,a);C. this(n,a);D. this(name,age).23、 Which of the following statements about variables and their scopes are true A. Instance variables are me

17、mber variables of a class.B. Instance variables are declared with the static keyword.C. Local variables defined inside a method are created when the method is executed.D. Local variables must be initialized before they are used.24、 public void test() try oneMethod();condition 1); catch (ArrayIndexOu

18、tOfBoundsException e) condition 2); catch(Exception e) condition 3); finally finally);Which will display if oneMethod run normallyA. condition 1B. condition 2C. condition 3D. finally25、 Given the following code:public class Test void printValue(int m)do The value is+m);while( -m 10 )public static vo

19、id main(String arg) int i=10;Test t= new Test();(i);Which will be outputA. The value is 8B. The value is 9C. The value is 10D. The value is 1126、 Which of the following statements about declaration are trueA. Declaration of primitive types such as boolean, byte and so on does not allocate memory spa

20、ce for the variable.B. Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.C. Declaration of nonprimitivetypes such as String, Vector and soon does notallocate memory space for the object.D. Declaration of nonprimitive types such as String, Vector a

21、ns so on allocates memory space for the object.27、 In the Java API documentation which sections are included in a class documentA. The description of the class and its purposeB. A list of methods in its super classC. A list of member variableD. The class hierarchy28、 Given the following code:1) publ

22、ic void modify() 2) int i, j, k;3) i = 100;4) while ( i 0 ) 5) j = i * 2;6) ( The value of j is + j );7) k = k + 1;8) i-;9) 10 Which line might cause an error during compilationA. line 4B. line 6C. line 7D. line 829、 Which of the following statements about variables and scope are trueA. Local variab

23、les defined inside a method are destroyed when the method is exited.B. Local variables are also called automatic variables.C.Variablesdefinedoutsidea method are createdwhen the objectis constructed.D. A method parameter variable continues to exist for as long as the object isneeded in which the meth

24、od is defined.30、 A class design requires that a member variable cannot be accessible directly outside the class. Which modifier should be used to obtain the access controlA. publicB. no modifierC. protectedD. private31、 Given the following code fragment:1) String str = null;2) if (str != null) & ()

25、 10) 3 more than 10);4 5) else if (str != null) & () 5) 6 less than 5);7 8) else end); Which line will cause errorA. line 1B. line 2C. line 5D. line 832、 Which statements about Java code security are trueA. The bytecode verifierloads allclassesneeded forthe executionof a program.B. Executing code is

26、 performed by the runtime interpreter.C. At runtime the bytecodes are loaded, checked and run in an interpreter.D. The classloaderadds securityby separatingthe namespaces fortheclassesof the local file system from those imported from network sources.33、 Given the following code:public class Personin

27、t arr = new int10;public static void main(String a) Which statement is correctA. 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.34、 public class Parent public int addValue( int a, int b) int s;s =

28、 a+b;return s;class Child extends Parent Which methods can be added into class ChildA. int addValue( int a, int b ).B. public void addValue ().C. public int addValue( int a ).D. public int addValue( int a, int b )throws MyException .35、 Which statements about thread are trueA. Once a thread is creat

29、ed, it can star running immediately.B. To use the start()method makes a threadrunnable,but itdoes not necessarilystart immediately.C. When a threadstopsrunningbecause of pre-emptive,itis placedat the frontend of the runnable queue.D. A thread may cease to be ready for a variety of reasons.36、 A memb

30、er variabledefinedin a classcan be accessed onlyby the classesin thesame package. Which modifier should be used to obtain the access controlA. privateB. no modifierC. publicD. protected37、 A public member vairable called MAX_LENGTH which is int type, the value of the variable remains constant value

31、100. Use a short statement to define the variable.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.38、 Which expressions are correct to declare an array of 10 String objectsA. char str;B. char str;C. String str;D. String s

32、tr10;39、 Which fragments are correct in Java source fileA. package testpackage;public class Test.B. import .*;package testpackage;public class Test.C. import .*;class Person.public class Test.D. import .*;import .*;public class Test.40:String s= hello;String t = hello;char c = h,e,l,l,o ;Which retur

33、n trueA. (t);B. (c);C. s=t;D. (new String(hello);E. t=c.41. Which of the following statements are legalA. long l = 4990;B. int i = 4L;C. float f = ;D. double d = ;E. double t = .42public class Parent int change() class Child extends Parent Which methods can be added into class ChildA. public int cha

34、nge()B. int chang(int i)C. private int change()D. abstract int chang()43class Parent String one, two;public Parent(String a, String b)one = a;two = b;public void print() public class Child extends Parent public Child(String a, String b)super(a,b);public void print()+ to + two);public static void mai

35、n(String arg)Parent p = new Parent(south, north);Parent t = new Child(east, west);();();Which of the following is correctA. Cause error during compilation.B. south eastC. south to north east to westD. south to north eastE. southeast to west44、 Given the uncompleted method:1)2) success = connect() 3

36、if (success=-1) 4 throw new TimedOutException();5 6TimedOutException is not a RuntimeException. Which can complete the method of declaration when added at line 1A. public void method()B. public void method() throws ExceptionC. public void method() throws TimedOutExceptionD. public void method() thro

37、w TimedOutExceptionE. public throw TimedOutException void method()45、 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

38、(String arg) 10 Parent p = new Parent();11 12) Which line will cause errorA. line 3B. line 6C. line 7D. line 8E. line 1046、 The variable result is boolean. Which expressions are legal A. result = true;B. if ( result ) . C. if ( result!= 0 ) . D. result = 147、 Class Teacher and Student are subclass o

39、f class Person.Person p;Teacher t;Student s;p, t and s are all non-null.if(t instanceof Person) s = (Student)t; What is the result of this sentenceA. It will construct a Student object.B. The expression is legal.C. It is illegal at compilation.D. It is legal at compilation but possible illegal at ru

40、ntime.48、 Given the following class:public class Samplelong length;public Sample(long l) length = l; public static void main(String arg)Sample s1, s2, s3;s1 = new Sample(21L);s2 = new Sample(21L);s3 = s2;long m = 21L;Which expression returns trueA. s1 = s2;B. s2 = s3;C. m = s1;D. (m).49、 Which class

41、es can be used as the argument of the constructor of the class FilterInputStreamA. FilterOutputStreamB. FileC. InputStreamD. RandomAccessFile50、 Which classes can be used as the argument of the constructor of the class FileInputStreamA. InputStreamB. FileC. FileOutputStreamD. String51、 Which is not

42、a method of the class InputStreamA. int read(byte)B. void flush()C. void close()D. int available()52、 Given the following code:class Person String name,department;public void printValue()name is +name);department is +department);public class Teacher extends Person int salary;public void printValue()

43、salary is +salary);Which expression can be added at the doing the same as. part of the method printValue()A. printValue();B. ();C. ();D. ().53. Which of the following assignment is not correctA. float f = ;B. double d = ;C. double d = ;D. double d = .Linux 基礎(chǔ)1. Linux文件權(quán)限一共10 位長度,分成四段,第三段表示的內(nèi)容是_。A 文件

44、類型B文件所有者的權(quán)限C 文件所有者所在組的權(quán)限D(zhuǎn) 其他用戶的權(quán)限2在使用mkdir 命令創(chuàng)建新的目錄時,在其父目錄不存在時先創(chuàng)建父目錄的選項是_。A -m B -d C -f D p3. 具有很多 C 語言的功能,又稱過濾器的是_ 。A cshB tcshC awkD sed4. 下列文件中,包含了主機名到IP地址的映射關(guān)系的文件是: _ 。A /etc/HOSTNAME B /etc/hosts C /etc/ D /etc/networks5. 命令可以從文本文件的每一行中截取指定內(nèi)容的數(shù)據(jù)。_A cp B dd C fmt D cut6對名為 fido 的文件用 chmod 551 f

45、ido進行了修改,則它的許可權(quán)是_。A -rwxr-xr-x B -rwxr-r- C -r-r-r- D -r-xr-xx7 用 ls al 命令列出下面的文件列表,_ 文件是符號連接文件。A -rw-rw-rw- 2 hel-s users 56 Sep 09 11:05 helloB -rwxrwxrwx 2 hel-s users 56 Sep 09 11:05 goodbeyC drwxr-r- 1 hel users 1024 Sep 10 08:10 zhangD lrwxr-r- 1 hel users 2024 Sep 12 08:12 cheng8在 vi編輯器中的命令模式

46、下,鍵入_可在光標(biāo)當(dāng)前所在行下添加一新行。A ; B ; C ; D A9在 vi編輯器中的命令模式下,重復(fù)上一次對編輯的文本進行的操作,可使用_ 命令。A 上箭頭B 下箭頭 C ; D ;10用命令ls -al顯示出文件ff的描述如下所示,由此可知文件ff的類型為_。-rwxr-xr- 1 root root 599 Cec 10 17:12 ffA 普通文件B硬鏈接 C 目錄 D 符號鏈接11刪除文件命令為:_ 。A mkdir B rmdir C mv D rm12對文件進行歸檔的命令為_ 。A dd B cpio C gzip D tar13改變文件所有者的命令為_。A chmod B touch C chown D cat14在給定文件中查找與設(shè)定條件相符字符串的命令為:_。A grep B gzip C find D sort15建立一個新文件可以使用的命令為_。A chmod B more C cp D touch16 在下列命令中,不能顯示文本文件內(nèi)容的命令

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論