<dfn id="w48us"></dfn><ul id="w48us"></ul>
  • <ul id="w48us"></ul>
  • <del id="w48us"></del>
    <ul id="w48us"></ul>
  • java高級工程師筆試題

    時(shí)間:2024-09-13 04:19:13 面試筆試 我要投稿
    • 相關(guān)推薦

    java高級工程師筆試題

      選擇題

    java高級工程師筆試題

      1:which is the main() method return of a application?

      a.string

      b.byte

      c.char

      d.void

      2:

      what will happen when you attempt to compile and run the following code?

      int output = 10;

      boolean b1 = false;

      if((b1 true) && ((output += 10) 20))

      {

      system.out.println("we are equal " + output);

      }

      else

      {

      system.out.println("not equal! " + output);

      }

      choices:

      what will happen when you attempt to compile and run the following code?

      int output = 10;

      boolean b1 = false;

      if((b1 true) && ((output += 10) 20))

      {

      system.out.println("we are equal " + output);

      }

      else

      {

      system.out.println("not equal! " + output);

      }

      choices:

      a.compilation error, attempting to perform binary comparison on logical data type

      b.compilation and output of "we are equal 10".

      c.compilation and output of "not equal! 20".

      d.compilation and output of "not equal! 10".

      3:

      what will happen when you attempt to compile and run the following code?

      class base

      {

      int i = 99;

      public void amethod()

      {

      system.out.println("base.amethod()");

      }

      base()

      {

      amethod();

      }

      }

      public class derived extends base

      {

      int i = -1;

      public static void main(string argv[])

      {

      base b = new derived();

      system.out.println(b.i);

      b.amethod();

      }

      public void amethod()

      {

      system.out.println("derived.amethod()");

      }

      }

      choices:

      what will happen when you attempt to compile and run the following code?

      class base

      {

      int i = 99;

      public void amethod()

      {

      system.out.println("base.amethod()");

      }

      base()

      {

      amethod();

      }

      }

      public class derived extends base

      {

      int i = -1;

      public static void main(string argv[])

      {

      base b = new derived();

      system.out.println(b.i);

      b.amethod();

      }

      public void amethod()

      {

      system.out.println("derived.amethod()");

      }

      }

      choices:

      a.derived.amethod() -1 derived.amethod()

      b.derived.amethod() 99

      c.compile time error

      d.derived.amethod()

      4:

      下述程序代碼中有語法錯(cuò)誤的行是( )。

      int i,ia[10],ib[10]; /*第一行*/

      for (i=0;i<=9;i++) /*第2行*/

      ia[i]=0; /*第3行*/

      ib=ia; /*第4行*/

      下述程序代碼中有語法錯(cuò)誤的行是( )。

      int i,ia[10],ib[10]; /*第一行*/

      for (i=0;i<=9;i++) /*第2行*/

      ia[i]=0; /*第3行*/

      ib=ia; /*第4行*/

      a.第1行

      b.第2行

      c.第3行

      d.第4行

      5:

      what will be the result of executing the following code?

      // filename; superclassx.java

      package packagex;

      public class superclassx

      {

      protected void superclassmethodx()

      {

      }

      int superclassvarx;

      }

      // filename subclassy.java

      1.package packagex.packagey;

      2.

      3.public class subclassy extends superclassx

      4.{

      5.superclassx objx = new subclassy();

      6.subclassy objy = new subclassy();

      7.void subclassmethody()

      8.{

      9.objy.superclassmethodx();

      10.int i;

      11.i = objy.superclassvarx;

      12.}

      13.}

      choices:

      what will be the result of executing the following code?

      // filename; superclassx.java

      package packagex;

      public class superclassx

      {

      protected void superclassmethodx()

      {

      }

      int superclassvarx;

      }

      // filename subclassy.java

      1.package packagex.packagey;

      2.

      3.public class subclassy extends superclassx

      4.{

      5.superclassx objx = new subclassy();

      6.subclassy objy = new subclassy();

      7.void subclassmethody()

      8.{

      9.objy.superclassmethodx();

      10.int i;

      11.i = objy.superclassvarx;

      12.}

      13.}

      choices:

      a.compilation error at line 5

      b.compilation error at line 9

      c.runtime exception at line 11

      d.none of these

      6:which are not java keywords?

      a.true

      b.const

      c.super

      d.void

      7: consider the class hierarchy shown below:

      ——————————————————————————————————

      class fourwheeler implements drivingutilities

      class car extends fourwheeler

      class truck extends fourwheeler

      class bus extends fourwheeler

      class crane extends fourwheeler

      ———————————————————————————————————

      consider the following code below:

      1.drivingutilities du;

      2.fourwheeler fw;

      3.truck mytruck = new truck();

      4.du = (drivingutilities)mytruck;

      5.fw = new crane();

      6.fw = du;

      which of the statements below are true?

      choices:

      a.line 4 will not compile because an interface cannot refer to an object.

      b.the code will compile and run.

      c.the code will not compile without an explicit cast at line 6, because going down the hierarchy without casting is not allowed.

      d.the code will compile if we put an explicit cast at line 6 but will throw an exception at runtime.

      8:exhibit :

      1. public class test (

      2. private static int j = 0;

      3.

      4. private static boolean methodb(int k) (

      5. j += k;

      6. return true;

      6. )

      7.

      8. public static void methoda(int i) {

      9. boolean b:

      10. b = i < 10 | methodb (4);

      11. b = i < 10 || methodb (8);

      12. )

      13.

      14. public static void main (string args[] } (

      15. methoda (0);

      16. system.out.printin(j);

      17. )

      18. )

      what is the result?

      a.the program prints “0”

      b.the program prints “4”

      c.the program prints “8”

      d.the program prints “12”

      9:

      public class outerclass {

      private double d1 = 1.0;

      //insert code here

      }

      you need to insert an inner class declaration at line 3. which two inner class declarations are

      valid?

      public class outerclass {

      private double d1 = 1.0;

      //insert code here

      }

      you need to insert an inner class declaration at line 3. which two inner class declarations are

      valid?

      a.class innerone{ public static double methoda() {return d1;} }

      b.public class innerone{ static double methoda() {return d1;} }

      c.private class innerone{ double methoda() {return d1;} }

      d.static class innerone{ protected double methoda() {return d1;} }

      10:

      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

      11:

      string s=”example string”;which operation is not legal?

      string s=”example string”;which operation is not legal?

      a.int i=s.length();

      b.s[3]=”x”;

      c.string short_s=s.trim();

      d.string t=”root”+s;

      12:軟件生命周期的瀑布模型把軟件項(xiàng)目分為3個(gè)階段、8個(gè)子階段,以下哪一個(gè)是正常的開發(fā)順序?

      a.計(jì)劃階段、開發(fā)階段、運(yùn)行階段

      b.設(shè)計(jì)階段、開發(fā)階段、編碼階段

      c.設(shè)計(jì)階段、編碼階段、維護(hù)階段

      d.計(jì)劃階段、編碼階段、測試階段

      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:a class design requires that a member variable should be accessible only by same package, which modifer word should be used?

      a.protected

      b.public

      c.no modifer

      d.private

      15:

      give the following method:

      public void method( ){

      string a,b;

      a=new string(“hello world”);

      b=new string(“game over”);

      system.out.println(a+b+”ok”);

      a=null;

      a=b;

      system.out.println(a);

      }

      in the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.

      give the following method:

      public void method( ){

      string a,b;

      a=new string(“hello world”);

      b=new string(“game over”);

      system.out.println(a+b+”ok”);

      a=null;

      a=b;

      system.out.println(a);

      }

      in the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.

      a.before line 5

      b.before line 6

      c.before line 7

      d.before line 9

      簡答題

      16:請闡述一下你對java多線程中“鎖”的概念的理解。

      17:列出jsp中包含外部文件的方式,兩者有何區(qū)別。

      18:請談?wù)剬σ粋(gè)系統(tǒng)設(shè)計(jì)的總體思路。針對這個(gè)思路,你覺得應(yīng)該具備哪些方面的知識(shí)?

      19:struts2中的攔截器,你用過那些自帶的攔截器,自己寫過的嗎?

      20:怎樣在復(fù)雜的各種形式的網(wǎng)頁中提取mp3下載的結(jié)構(gòu)化數(shù)據(jù)?

      21:編寫一個(gè)在二叉排序樹中查找大小為第k的元素的算法。

      22:java多線程編程。 用java寫一個(gè)多線程程序,如寫四個(gè)線程,二個(gè)加1,二個(gè)對一個(gè)變量減一,輸出。

      23:不允許使用系統(tǒng)時(shí)間,寫出一個(gè)隨機(jī)數(shù)生成函數(shù)。

      24:hibernate中的id(主鍵)生成器有那些?或者你常用的是那些?

      25:error和exception有什么區(qū)別?

    【java高級工程師筆試題】相關(guān)文章:

    迅雷JAVA廣州站二筆筆試題目分享09-28

    java的筆試題206-13

    Java經(jīng)典面試題07-17

    Java 經(jīng)典筆試題201606-18

    java筆試題及答案08-20

    java筆試題,筆試題目分享10-12

    華為Java面試題08-14

    JAVA面試筆試題09-13

    java面試題201408-11

    java面試題及答案10-27

    主站蜘蛛池模板: 亚洲精品无码专区在线播放 | 99久久伊人精品综合观看| 久久亚洲欧美国产精品| 无码精品国产VA在线观看DVD | 久久精品亚洲福利| 久久久99精品一区二区| 午夜成人精品福利网站在线观看 | 久久精品国产久精国产| 国产高清精品一区| 午夜成人精品福利网站在线观看 | 久久99精品国产| 久久亚洲国产精品一区二区 | 国产亚洲综合成人91精品| 国产成人精品视频在放| 国产成人精品免高潮在线观看| 国产天天综合永久精品日| 亚洲精品第一国产综合境外资源| 一本色道久久综合亚洲精品| 国产精品专区第二| 2022国产精品最新在线| 国产精品亚洲一区二区三区在线| 国产成人精品高清在线观看93| 98精品国产自产在线XXXX| 亚洲精品二三区| 热久久国产精品| 亚洲欧美国产∧v精品综合网| 99免费精品视频| 久久无码人妻精品一区二区三区| 精品偷自拍另类在线观看| 国产日韩精品无码区免费专区国产 | 国产精品久久久久jk制服| 精品欧美一区二区在线观看| 国产成人毛片亚洲精品| 亚洲AV午夜福利精品一区二区 | 呦交小u女国产精品视频| 欧美日韩精品乱国产538| 亚洲精品无码mv在线观看网站| 日韩精品中文字幕第2页| 九九热精品在线| 久久夜色精品国产噜噜亚洲AV| 精品国产一区二区三区AV性色 |