<dfn id="w48us"></dfn><ul id="w48us"></ul>
  • <ul id="w48us"></ul>
  • <del id="w48us"></del>
    <ul id="w48us"></ul>
  • JAVA系統(tǒng)分析筆試題

    時(shí)間:2020-12-09 20:46:34 筆試經(jīng)驗(yàn) 我要投稿

    JAVA系統(tǒng)分析筆試題

     選擇題

      1:public class X{

      public Object m(){

      Object o = new Float(3.14F);//line 3

      Object [] oa = new Object[1];//line 4

      oa[0] = o;//line 5

      o=null;//line 6

      return oa[0];//line 7

      }

      }

      When is the Float object, created in line 3,eligible for garbage collection?

      public class X{

      public Object m(){

      Object o = new Float(3.14F);//line 3

      Object [] oa = new Object[1];//line 4

      oa[0] = o;//line 5

      o=null;//line 6

      return oa[0];//line 7

      }

      }

      When is the Float object, created in line 3,eligible for garbage collection?

      A.just after line 5.

      B.just after line 6

      C.just after line 7(that is,as the method returns)

      D.never in this method

      2:Use the operator “>>” and “>>>”. Which statement is true?

      A.1010 0000 0000 0000 0000 0000 0000 0000 >> 4 give 0000 1010 0000 0000 0000 0000 0000 0000

      B.1010 0000 0000 0000 0000 0000 0000 0000 >> 4 give 1111 1010 0000 0000 0000 0000 0000 0000

      C.1010 0000 0000 0000 0000 0000 0000 0000 >>> 4 give 0000 0000 0000 0000 0000 0000 0000 0000

      D.1010 0000 0000 0000 0000 0000 0000 0000 >>> 4 give 1111 1010 0000 0000 0000 0000 0000 0000

      3:The following code is entire contents of a file called Example.java,causes precisely one error during compilation:

      class SubClass extends BaseClass{

      }

      class BaseClass(){

      String str;

      public BaseClass(){

      System.out.println(“ok”);}

      public BaseClass(String s){

      str=s;}}

      public class Example{

      public void method(){

      SubClass s=new SubClass(“hello”);

      BaseClass b=new BaseClass(“world”);

      }

      }

      Which line would be cause the error?

      The following code is entire contents of a file called Example.java,causes precisely one error during compilation:

      class SubClass extends BaseClass{

      }

      class BaseClass(){

      String str;

      public BaseClass(){

      System.out.println(“ok”);}

      public BaseClass(String s){

      str=s;}}

      public class Example{

      public void method(){

      SubClass s=new SubClass(“hello”);

      BaseClass b=new BaseClass(“world”);

      }

      }

      Which line would be cause the error?

      A.9

      B.10

      C.11

      D.12

      4:What will be the result of executing the following code?

      boolean a = true;

      boolean b = false;

      boolean c = true;

      if (a == true)

      if (b == true)

      if (c == true) System.out.println("Some things are true in this world");

      else System.out.println("Nothing is true in this world!");

      else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");

      else System.out.println("Hey this won't compile");

      Choices:

      What will be the result of executing the following code?

      boolean a = true;

      boolean b = false;

      boolean c = true;

      if (a == true)

      if (b == true)

      if (c == true) System.out.println("Some things are true in this world");

      else System.out.println("Nothing is true in this world!");

      else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");

      else System.out.println("Hey this won't compile");

      Choices:

      A.The code won't compile

      B."Some things are true in this world" will be printed

      C."Hey this won't compile" will be printed

      D.None of these

      5:Give the following java source fragement:

      //point x

      public class Interesting{

      //do something

      }

      Which statement is correctly Java syntax at point x?

      Give the following java source fragement:

      //point x

      public class Interesting{

      //do something

      }

      Which statement is correctly Java syntax at point x?

      A.public class MyClass{//do other thing…}

      B.static int PI=3.14

      C.class MyClass{//do something…}

      D.none

      6:public class Parent {

      int change() {…}

      }

      class Child extends Parent {

      }

      Which methods can be added into class Child?

      A.public int change(){}

      B.abstract int chang(){}

      C.private int change(){}

      D.none

      7:給出下面的代碼片斷。。。下面的哪些陳述為錯(cuò)誤的?

      1) public void create() {

      2) Vector myVect;

      3) myVect = new Vector();

      4) }

      給出下面的代碼片斷。。。下面的哪些陳述為錯(cuò)誤的?

      1) public void create() {

      2) Vector myVect;

      3) myVect = new Vector();

      4) }

      A.第二行的聲明不會(huì)為變量myVect分配內(nèi)存空間。

      B.第二行語(yǔ)句創(chuàng)建一個(gè)Vector類對(duì)象。

      C.第三行語(yǔ)句創(chuàng)建一個(gè)Vector類對(duì)象。

      D.第三行語(yǔ)句為一個(gè)Vector類對(duì)象分配內(nèi)存空間

      8:What is written to the standard output given the following statement:System.out.println(4|7);

      Select the right answer:

      A.4

      B.5

      C.6

      D.7

      9:Which fragments are not correct in Java source file?

      A.package testpackage; public class Test{//do something...}

      B.import java.io.*; package testpackage; public class Test{// do something...}

      C.import java.io.*; class Person{// do something...} public class Test{// do something...}

      D.import java.io.*; import java.awt.*; public class Test{// do something...}

      10:Give the following java class:

      public class Example{

      static int x[]=new int[15];

      public static void main(String args[]){

      System.out.println(x[5]);

      }

      }

      Which statement is corrected?

      Give the following java class:

      public class Example{

      static int x[]=new int[15];

      public static void main(String args[]){

      System.out.println(x[5]);

      }

      }

      Which statement is corrected?

      A.When compile, some error will occur.

      B.When run, some error will occur.

      C.Output is zero.

      D.Output is null.

      11:使用 JDBC 可以做到的是

      A.把二進(jìn)制代碼傳送到任何關(guān)系數(shù)據(jù)庫(kù)中

      B.把 Java 源代碼傳送到任何關(guān)系數(shù)據(jù)庫(kù)中

      C.把表單信息傳送到任何關(guān)系數(shù)據(jù)庫(kù)中

      D.很容易地把 SQL 語(yǔ)句傳送到任何關(guān)系數(shù)據(jù)庫(kù)中

      12:Which method you define as the starting point of new thread in a class from which new the thread can be excution?

      A.public void start()

      B.public void run()

      C.public void runnable()

      D.public static void main(String args[])

      13:Which statements about Java code security are not true?

      A.The bytecode verifier loads all classes needed for the execution of a program.

      B.Executing code is performed by the runtime interpreter.

      C.At runtime the bytecodes are loaded, checked and run in an interpreter.

      D.The class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources.

      14:關(guān)于垃圾收集的哪些敘述是對(duì)的。

      A.程序開發(fā)者必須自己創(chuàng)建一個(gè)線程進(jìn)行內(nèi)存釋放的.工作。

      B.垃圾收集將檢查并釋放不再使用的內(nèi)存。

      C.垃圾收集允許程序開發(fā)者明確指定并立即釋放該內(nèi)存。

      D.垃圾收集能夠在期望的時(shí)間釋放被java對(duì)象使用的內(nèi)存。

      15:Give the following java class:

      public class Example{

      public static void main(String args[]){

      static int x[] = new int[15];

      System.out.println(x[5]);

      }

      }

      Which statement is corrected?

      Give the following java class:

      public class Example{

      public static void main(String args[]){

      static int x[] = new int[15];

      System.out.println(x[5]);

      }

      }

      Which statement is corrected?

      A.When compile, some error will occur.

      B.When run, some error will occur.

      C.Output is zero.

      D.Output is null.

      16:Select valid identifier of Java:

      Select valid identifier of Java:

      A.%passwd

      B.3d_game

      C.$charge

      D.this

      簡(jiǎn)答題

      17:abstract class和interface有什么區(qū)別?

      18:hibernate中,什么情況下,對(duì)象的狀態(tài)可以由持久的變?yōu)橥泄艿?

      19:兩個(gè)數(shù)相乘,小數(shù)點(diǎn)后位數(shù)沒有限制,請(qǐng)寫一個(gè)高精度算法。

      20:求符合指定規(guī)則的數(shù)。

      給定函數(shù)d(n) = n n的各位之和,n為正整數(shù),如 d(78) = 78 7 8=93。 這樣這個(gè)函數(shù)

      可以看成一個(gè)生成器,如93可以看成由78生成。

      定義數(shù)A:數(shù)A找不到一個(gè)數(shù)B可以由d(B)=A,即A不能由其他數(shù)生成。現(xiàn)在要寫程序,找出

      1至10000里的所有符合數(shù)A定義的數(shù)。

      輸出:

      1

      3

      …
     

    JAVA系統(tǒng)分析筆試題

    【JAVA系統(tǒng)分析筆試題】相關(guān)文章:

    精選Java筆試題12-20

    Java經(jīng)典筆試題12-15

    java試題及答案08-12

    360筆試題目07-11

    華為2017筆試題08-16

    java基礎(chǔ)筆試題201710-15

    Java基礎(chǔ)筆試題大全10-15

    華為的Java筆試題07-31

    Java招聘筆試題目03-03

    高級(jí)Java筆試題集合02-10

    主站蜘蛛池模板: 欧美精品国产一区二区| 亚洲精品福利视频| 精品精品国产自在久久高清 | 精品人妻无码专区中文字幕 | 久久久久国产精品嫩草影院 | 精品人妻少妇一区二区三区| 2022国产精品自产拍在线观看| 久久青青草原精品国产软件| 欧美亚洲国产精品第一页| 久久精品国产亚洲av日韩| 亚洲精品网站在线观看不卡无广告 | 亚洲国产精品ⅴa在线观看| 国产成人精品日本亚洲专区 | 一本色道久久88综合日韩精品| 97精品国产高清自在线看超| 大伊香蕉精品一区视频在线| 亚洲国产精品18久久久久久 | 四虎永久在线精品884aa下载| 精品久久久无码人妻中文字幕豆芽 | 亚洲韩精品欧美一区二区三区| 国产午夜亚洲精品国产成人小说| 久久国产精品久久精品国产| 999久久久无码国产精品| 乱精品一区字幕二区| 四虎国产精品永久地址49| 久久这里只有精品18| 亚洲&#228;v永久无码精品天堂久久 | 国产网红主播无码精品| 四虎精品成人免费永久| 538国产精品一区二区在线| 无码精品国产一区二区三区免费| 少妇亚洲免费精品| 欧美成人精品一区二三区在线观看| 国产精品免费久久久久电影网| 中文字幕亚洲精品| 999国产精品视频| 国产成人精品日本亚洲专区| 国产精品午夜久久| 黑人巨茎精品欧美一区二区| 国产手机在线精品| 久久精品国产一区二区三区不卡 |