Java技能测试试卷二及答案

Java技能测试试卷二

第一部分:基础部分 

 

软件基础 (每题3分,共18分) 

1、十进制数10相当于二进制数的多少?

 

1010

 2、请写出五个基本数据类型。

 

byte/short/int/long/boolean

 

 3、程序的控制语句有哪些?

 

 

 4、break语句和continue语句有什么区别?

 

break是指中断当前语句块/循环,而continue是执行当前循环块的下一次循环

 

 5、数字“2”在下面两个语句中各代表何种含义?   (1)int num[]=new int[2];

分配新数组的长度为2   (2)arr[2]=6;

给数组arr第3个元素赋值为6


 6、什么是OO?它的三个基本特征是什么?OO即面向对象,Object-Oriented .封装,继承,多态

 

java基础(每题2分,共12分) 

1、异常是指什么?请写出捕捉异常的完整语句。

 

异常指程序中运行时出现不可预料的运行情况.如

try{

throw new Exception("This is a exception test");

}

catch(Exception e){

e.printStackTrace();

}

 

 

 2、常用的java类有哪些?

 

System,String,StringBuffer,Math,ArrayList...


 3、请写出Java类的四种权限修饰符及各自的作用。

 

public 其他对象可以任意访问的类/方法/变量

protected 同一个包和子类对象可以访问的方法/变量

[default] 同一个包可以访问的方法/变量

private   只有本类或者本类的内部类可以访问的方法/变量

 

 

 4、super与this的区别是什么?

 

super指向父类的方法/变量

this指向本类的方法/变量

 

 5、请说明接口、内部类以及抽象类之间的区别?

 

接口定义方法,不存在任何实现

内部类可以访问包含它的外部类的任何方法/变量

抽象类不能被实例化,但可以有实现方法

 

 

 

6、Java中处理XML文档的标准API主要有哪两种?请说明它们之间的区别。 SAX(simple API for XML)

DOM(Document Object Model)

 

 

J2EE/web(每题2分,共10分) 

1、JSP有哪些隐含对象?

 

request,response,session,application,page,pageContext,out,config,exception

 

 2、JSP有哪些常用标签?

 

<jsp:useBean ...><jsp:setProperty/><jsp:getProperty><jsp:include page=".."/><jsp:plug-in/>

 

 3、JavaScript有哪些内置对象?

window,document,

 

 

 

 4、Servlet中有哪些常用的方法?

 

init(),service(ServletRequest request,ServletResponse response),doGet(xxxx)

 

 5、什么是MVC?(请画图并作文字介绍)

一种经典的当业务逻辑与视图分离的设计框架

 

 

 

J2EE/EJB(共15分) 

1、请说明EJB有哪几种类型?(10分) 

SessionBean,EntityBean,MDB

 

 

2、请说明remote接口和home接口的主要作用?(5分) 

Remote接口提供远程业务方法供客户进行业务调用

home接口利用厂实现EJB bean实例的创建

 

 

数据库(共25分) 

1、什么是事务?(5分) 

 

 

2、请解释术语记录、主键和索引。(10分) 

 

 

3、请写出下列SQL语句。(10分)查询A表中name字段等于“QQ”的记录。删除A表中name字段等于“QQ”的记录。

 

 

智力测试 (每题5分,共10分)

1、 12个乒乓球特征相同,其中只有一个重量异常,现在要求用一部没有砝码的天平称三次,将那个重量异常的球找出来。

第一次:44

   如果平了:

      那么剩下的球中取3放左边,3个好球放右边,称:

      如果左边重,那么取两个球称一下,哪个重哪个是次品,平的话第三个重,是次品,轻的话同理

      如果平了,那么剩下一个次品,还可根据需要称出次品比正品轻或者重

   如果不平:

      那么不妨设左边重右边轻,为了便于说明,将左边4颗称为重球,右边4颗称为轻球,剩下4颗称为好球

      取重球2颗,轻球2颗放在左侧,右侧放3颗好球和一颗轻球

      如果左边重

        称那两颗重球,重的一个次品,平的话右边轻球次品

      如果右边重

        称左边两颗轻球,轻的一个次品

      如果平

        称剩下两颗重球,重的一个次品,平的话剩下那颗轻球次品

 

 

2、 一个岔路口分别通向诚实国和说谎国。来了两个人,已知一个是诚实国的,另一个是说谎国的。诚实国永远说实话,说谎国永远说谎话。现在你要去说谎国,但不知道应该走哪条路,需要问这两个人。请问应该怎么问?

问其中一人:另外一个人会说哪一条路是通往诚实国的?回答者所指的那条路必然是通往说谎国的。

 

 

翻译题 10分)

 

AJAX Toolkit Framework (ATF) Project proposed for Eclipse

The Eclipse community has accepted the AJAX Toolkit Framework (ATF) Project as a project proposal, to provide tooling support for AJAX. The framework is supposed to provide a basis for building tools for various AJAX projects (Dojo, Zimbra, and OpenRico are mentioned specifically) as modules under Eclipse.

 

The framework as proposed will have two major components: ATF Tools, which focus on JavaScript editing, debugging, and inspection, and the ATF Personality Framework, which focuses on specific API support.


第二部分:高级部分

(只考虑实习或就业的学员必须测试此部分内容)

 

时间:180分钟 考试成绩___________

 

选择题: (每题1 , 50)

 

1. Given the following code:

class Test{

       private int m;

       public static void fun() {

           // some code...

      }

}

How can the member variable m be accessible directly in the method fun()?

A. change private int m to protected int m

B. change private int m to public int m

C. change private int m to static int m

D. change private int m to int m

 

2. Which methods are correct overloading methods of the following method:

public void example(){...}

A. public void example( int m){...}

B. public int example(){...}

C. public void example2(){...}

D. public int example ( int m, float f){...}

 

3. Given the following fragment of code:

 public class Base{

     int w, x, y ,z;

     public Base(int a,int b){

          x=a; y=b;

          }

     public Base(int a, int b, int c, int d){

          // assignment x=a, y=b

         w=d;

          z=c;

          }

      }

Which expressions can be used at the point of // assignment x=a, y=b?

A. Base(a,b);

B. x=a, y=b;

C. x=a; y=b;

D. this(a,b);

 

4. Given the following definition:

            String s = "story";

      Which of the following expressions are legal?

A. s += "books";

B. char c = s[1];

C. int len = s.length;

D. String t = s.toLowerCase();

 

 

5. What is the return value of the main() method in Java?

A. String

B. int

C. char

D. void

 

6. Which are the valid identifiers in Java?

A. fieldname

B. super

C. 3number

D. #number

E. $number

 

7. Which are valid Java keywords?

A. const

B. NULL

C. false

D. this

E. native

 

8. Which are valid integral expressions in Java?

A. 22

B. 0x22

C. 022

D. 22H

 

9. Given the following fragment of code, what are results of  i and j after execution?

int i = 1;

int j;

j = i++;

A. 1, 1

B. 1, 2

C. 2, 1

D. 2, 2

 

10. Which of the following statements are true?

A. >> is the arithmetic right shift operator.

B. >> is the logical right shift operator.

C. >>> is the arithmetic right shift operator.

D. >>> is the logical right shift operator.

 

11. Which of the following assignments are legal?

A. float a = 2.0

B. double b = 2.0

C. int c = 2

D. long d = 2

 

12. Which one of the following arguments is the correct argument of the main() method?

 

A. char args[]

B. char args[][]

C. String arg[]

D. String args

 

13. Which one of the following is correct to create an array?

A. float f[][] = new float[6][6];

B. float []f[] = new float[6][6];

C. float f[][] = new float[][6];

D. float [][]f = new float[6][6];

E. float [][]f = new float[6][];

 

14. Given the following expression: int m[] = {0, 1, 2, 3, 4, 5, 6 };

Which result of the following expressions equals to the number of the array elements?

A. m.length()

B. m.length

C. m.length()+1

D. m.length+1

 

15. Given the following command to run a correct class:  java MyTest a b c

Which statements are true?

A. args[0] = "MyTest a b c"

B. args[0] = "MyTest"

C. args[0] = "a"

D. args[1]= 'b'

 

16. Given the following code:

     public class Test{

          static long a[] = new long[10];

         public static void main ( String arg[] ) {

                 System.out.println ( a[6] );

         }

    }

   Which statement is true?

A. Output is null.

B. Output is 0.

C. When compile, some error will occur.

D. When running, some error will occur.

 

17. Given the following fragment of code:

boolean m = true;

if ( m = false )

     System.out.println("False");

else

     System.out.println("True");

      What is the result of the execution?

A. False

B. True

C. None

D. An error will occur when running.

 

18. Given the following code:

public class Test{

   public static void main(String arg[]){

      int i = 5;

     do {

              System.out.println(i);

     } while (--i>5)

     System.out.println(“Finished”);

   }

}

What will be output after execution?

A. 5

B. 4

C. 6

D. Finished

E. None

 

19. What will be output after execution of the following code:

 outer: for(int i=0;i<3; i++)

      inner: for(int j=0;j<2;j++)

           {

              if(j==1) continue outer;

              System.out.println(j++  + “and” +  ++i);

           }

 

A. 0 and 0

B. 0 and 1

C. 0 and 2

D. 1 and 0

E. 1 and 1

F. 1 and 2

G. 2 and 0

H. 2 and 1

I. 2 and 2

 

20. Given the following code:

     switch (m)

    {

     case 0: System.out.println("Condition 0");

        case 1: System.out.println("Condition 1");

        case 2: System.out.println("Condition 2");

        case 3: System.out.println("Condition 3");break;

        default: System.out.println("Other Condition");

    }

    Which values of m will cause "Condition 2" is output?

A. 0

B. 1

C. 2

D. 3

E. 4

F. None

 

21. Which modifiers are legal in Java?

A. private

B. public

C. protected

D. protect

E. friend

 

22. If a member variable of a class can be accessible only by the same package, which modifier should be used?

A. private

B. public

C. protected

D. no modifier

E. final

 

23. Which modifier should be used to define a constant member variable?

A. static

B. final

C. abstract

D. No modifier can be used

 

24. Given the following definition of a class:

public class Test {

     private float f = 1.0f;

     int m = 12;

     static int n=1;

     public static void main(String arg[]) {

           Test t = new Test();

           // some code...

     }  

}

Which of the following usage are legal?

A. t.f

B. this.n

C. Test.m

D. Test.n

 

25. Given the following code:

1) class Example{

2)      String str;

3)      public Example(){

4)            str= "example";

5)      }

6)      public Example(String s){

7)            str=s;

8)      }

9) }

10) class Demo extends Example{

11) }

12) public class Test{

13)     public void f () {

14)         Example ex = new Example("Good");

15)         Demo d = new Demo("Good");

16) }

Which line will cause an error?

A. line 3

B. line 6

C. line 10

D. line 14

E. line 15

 

26. Given the following class definition in one source file:

class Base {

      public Base (){ //... }

      public Base ( int m ){ //... }

      protected void fun( int  n ){ //... }

}

public class Child extends Base{

     // member methods

}

Which methods can be added into the Child class correctly?

A. private void fun( int n ){ //...}

B. void fun ( int n ){ //... }

C. protected void fun ( int n ) { //... }

D. public void fun ( int n ) { //... }

E. public m(){ //... }

 

27. Which statements are correct?

A. In Java single inheritance is allowed, which makes code more reliable.

B. A subclass inherits all methods ( including the constructor ) from the superclass.

C. A class can implement as many interfaces as needed.

D. When a class implements an interface, it can define as many methods of the interface as needed.

 

28. In the Test.java source file, which are correct class definitions?

A. public class test {

        public int x = 0;

        public test(int x)            

          {

             this.x = x;

            }

      }

B. public class Test{

                   public int x=0;

                   public Test(int x) {

                          this.x = x;

                   }

          }

C. public class Test extends T1, T2 {

               public int x = 0;

                public Test (int x) {

                     this.x = x;

                }

       }

    D.    public class Test extends T1{

                   public int x=0;

                   public Test(int x){

                          this.x = x;

                   }

           }                                                              

   E.    protected class Test extends T2{

                   public int x=0;

                   public Test(int x){

                           this.x=x;

                  }

          }

 

29. The Person, Student and Teacher are class names. These classes have the following inheritance relation as shown below:

                      Person

                 |

        ---------------

          |            |

       Student    Teacher

There is the following expression in a Java source file:

              Person p = new Student();

Which one of the following statements are true?

A. The expression is legal.

B. The expression is illegal.

C. Some errors will occur when compile.

D. Compile is correct but it will be wrong when running.

 

30. The Person, Student and Teacher are class names. These classes have the following inheritance relation as shown below:

               Person

                |

          ---------------

          |             |

       Student    Teacher

       In Java source file a specific method has an argument. In order to handle all these classes in this method which type of argument of this method should be used?

A. Person

B. Student

C. Teacher

D. Object

E. None of them can be used.

 

31. .The Person, Student and Teacher are class names. These classes have the following inheritance relation as shown below:

               Person

                 |

          ---------------

          |             |

        Student    Teacher

        There is the following expression in a Java source file:

              Person p = new Teacher();

        Which of the following expressions return true?

A. p instanceof Teacher

B. p instanceof Student

C. p instanceof Person

D. None of them returns true

 

32. Given the following code:

public class Test{

    public static void main(String args[])

    {

        String str=new String("World");

        char ch[]={'H','e','l','l','o'};

        change(str,ch);

        System.out.println(str + "and" + ch);

    }

    public static void change(String str, char ch[])

    {

        str="Changed";  ch[0]='C';

    }

}

What is the result after execution?

A. World and Hello

B. World and Cello

C. Changed and Hello

D. Changed and Cello

 

33. Given the following fragment of code:

      Double d1 = new Double(1.0);

      Double d2 = new Double(1.0);

      Float f = new Float(1.0F);

Which results of the following expressions are true?

A. d1 == d2

B. d1.equals(d2)

C. d1 = f

D. f.equals(d1)

 

34. Given the following code:

public void fun ()

{

           int i;

           try

           {

                  i=System.in.read ();

                  System.out.println("Location 1");

            } catch (IOException e) {

                  System.out.println("Location 2");

            } finally {

                  System.out.println("Location 3");

            }

            System.out.println("Location 4");

        }

        If an IOException occurs, what will be printed?

A. Location 1

B. Location 2

C. Location 3

D. Location 4

 

35. If the method func() is allowed to throw out the IOException, which declaration of this method can used?

A. public int func(int i)

B. public int func(int i) throw IOException

C. public int func(int i) throw Exception

D. public int func(int i) throws IOException

E. public int func(int i) throws Exception

 

36. Consider the following class:

1. class Test(int i) {

2. void test(int i) {

3. System.out.println("I am an int.");

4. }

5. void test(String s) {

6. System.out.println("I am a string.");

7. }

8.

9. public static void main(String args[]) {

10. Test t=new Test();

11. char ch="y";

12. t.test(ch);

13. }

14. }

Which of the statements below is true?(Choose one.)

A. Line 5 will not compile, because void methods cannot be overridden.

B. Line 12 will not compile, because there is no version of test() that rakes a char argument.

C. The code will compile but will throw an exception at line 12.

D. The code will compile and produce the following output: I am an int.

E. The code will compile and produce the following output: I am a String.

 

 

37.  Which of the following fragments might cause errors?

A. String s = "Gone with the wind";

   String t = " good ";

   String k = s + t;

B. String s = "Gone with the wind";

   String t;

   t = s[3] + "one";

C. String s = "Gone with the wind";

   String standard = s.toUpperCase();

D. String s = "home directory";

   String t = s - "directory".

 

38.  Which of the following answer is correct to express the value 8 in octal number?

A. 010

B. 0x10

C. 08

D. 0x8

 

39.  Which of the following assignment is not correct?

A. float f = 11.1;

B. double d = 5.3E12;

C. double d = 3.14159;

D. double d = 3.14D.

 

40. Which of the following statements about variables and their scopes are true?

A. Instance variables are member 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.

 

41.  Which of the following statements about declaration are true?

A. Declaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.

B. Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.

C. Declaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.

D. Declaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.

 

42.  Which fragments are 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...}

 

43. class Parent {

     String one, two;

     public Parent(String a, String b){

        one = a;

        two = b;

     }

     public void print(){ System.out.println(one); }

   }

   public class Child extends Parent {

      public Child(String a, String b){

        super(a,b);

      }

      public void print(){

           System.out.println(one + " to " + two);

      }

      public static void main(String arg[]){

           Parent p = new Parent("south", "north");           

           Parent t = new Child("east", "west");

           p.print();

           t.print();

      }

   }

Which of the following is correct?

A. Cause error during compilation.

B. south

   east

C. south to north

   east to west

D. south to north

   east

E. south

   east to west

 

44.  Given the uncompleted method:

1)

2) { success = connect();

3) if (success==-1) {

4)   throw new TimedOutException();

5) }

6)}

TimedOutException is not a RuntimeException.  Which can complete the method of declaration when added at line 1?

A. public void method()

B. public void method() throws Exception

C. public void method() throws TimedOutException

D. public void method() throw TimedOutException

E.public throw TimedOutException void method()

 

 

45.  Which of the following are permissible styles of comment in Java program?

A. /**      */

B. //

C. rem

D. /*        */

E. "          "

 

46.  Which of the following statements are correct to create an empty String array of 6 elements?

A. String s[6];

B. String [6]s;

C. String s[]={ "","","","","","" };

D. String s[]=new String[6];

                for ( int m=0; m<6; m++) { s[m]=""; }

E. String s[]=new String[6];

for ( int m=0; m<6; m++) { s[m]=null; }

 

47.  Which statement defines a block of code that always executes, regardless of whether or not an exception was thrown?

A. catch

B. finally

C. final

D. throw

E. throws

 

 

 

48.  Given the following uncompleted method:

1)  // declaration of a method

2)  {  int result;

3)     result = connect ( );

4)     if ( result == -1 ) {

5)  

6)     }

7)  }

Which clause can be added at line 5 where a user-defined MyException will be thrown?

A.  throw MyException;

B.  throws MyException;

C.  throw new MyException();

D.  throws new MyException();

 

 

49.  Given:

1.   Class EnclosingClass {

2 Public class Inner {

3 Inner(int a ) { /* Constructor code */}

4 }

5   }

     6

7     Class SubClassOfInner extends EnclosingClass.Inner {

8 // how to write a constructor?

9     }

      

      What is the correct way to write a constructor for the SubClassOfInner class?

 

A.  There is no correct way to provide a constructor in this scenario.

B.  SubClassOfInner(int a) {super(a);}

C.  SubClassOfInner(EnclosingClass outer, int a) {outer.super(a);}

D.  SubClassOfInner(int a) {EnclosingClass.super(a);}

 

 

50.  Given

1 public class MyClass {

2 private class MyRunner implements Runnable {

3 public void run() {

4 //do something

5 }

6 }

7 public static void main(String[] args) {

8 (new Thread(new MyRunner())).start();

9 }

10 }

 

This code does not compile. Which of the following statements is the reason why it does not compile?

 

A. Line 8 should create an instance of MyRunner with new MyClass.MyRunner().

B. MyRunner in line 2 is private ;

C. The code is missing an import statement for Thread from java.lang

D. The code should create an instance of MyRunner with an enclosing instance of MyClass

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

简答题(共30分)

 

1OverloadOverride的区别。Overloaded的方法是否可以改变返回值的类型?. (10 )

 

方法的重写Overriding和重载OverloadingJava多态性的不同表现。重写Overriding是父类与子类之间多态性的一种表现,重载Overloading是一个类中多态性的一种表现。如果在子类中定义某方法与其父类有相同的名称和参数,我们说该方法被重写 (Overriding)。子类的对象使用这个方法时,将调用子类中的定义,对它而言,父类中的定义如同被"屏蔽"了。如果在一个类中定义了多个同名的方法,它们或有不同的参数个数或有不同的参数类型,则称为方法的重载(Overloading)Overloaded的方法是可以改变返回值的类型。

 

 

2.abstract classinterface有什么区别? (10 )

 

声明方法的存在而不去实现它的类被叫做抽象类(abstract class),它用于要创建一个体现某些基本行为的类,并为该类声明方法,但不能在该类中实现该类的情况。不能创建abstract 类的实例。然而可以创建一个变量,其类型是一个抽象类,并让它指向具体子类的一个实例。不能有抽象构造函数或抽象静态方法。Abstract 类的子类为它们父类中的所有抽象方法提供实现,否则它们也是抽象类为。取而代之,在子类中实现该方法。知道其行为的其它类可以在类中实现这些方法。

接口(interface)是抽象类的变体。在接口中,所有方法都是抽象的。多继承性可通过实现这样的接口而获得。接口中的所有方法都是抽象的,没有一个有程序体。接口只可以定义static final成员变量。接口的实现与子类相似,除了该实现类不能从接口定义中继承行为。当类实现特殊接口时,它定义(即将程序体给予)所有这种接口的方法。然后,它可以在实现了该接口的类的任何对象上调用接口的方法。由于有抽象类,它允许使用接口名作为引用变量的类型。通常的动态联编将生效。引用可以转换到接口类型或从接口类型转换,instanceof 运算符可以用来决定某对象的类是否实现了接口。

 

 

3EJB是基于哪些技术实现的?并说出SessionBeanEntityBean的区别,StatefulBeanStatelessBean的区别。10分)

 

EJB包括Session BeanEntity BeanMessage Driven Bean,基于JNDIRMIJAT等技术实现。

    SessionBeanJ2EE应用程序中被用来完成一些服务器端的业务操作,例如访问数据库、调用其他EJB组件。EntityBean被用来代表应用系统中用到的数据。

    对于客户机,SessionBean是一种非持久性对象,它实现某些在服务器上运行的业务逻辑。

    对于客户机,EntityBean是一种持久性对象,它代表一个存储在持久性存储器中的实体的对象视图,或是一个由现有企业应用程序实现的实体。

    Session Bean 还可以再细分为 Stateful Session Bean Stateless Session Bean ,这两种的 Session Bean都可以将系统逻辑放在 method之中执行,不同的是 Stateful Session Bean 可以记录呼叫者的状态,因此通常来说,一个使用者会有一个相对应的 Stateful Session Bean 的实体。Stateless Session Bean 虽然也是逻辑组件,但是他却不负责记录使用者状态,也就是说当使用者呼叫 Stateless Session Bean 的时候,EJB Container 并不会找寻特定的 Stateless Session Bean 的实体来执行这个 method。换言之,很可能数个使用者在执行某个 Stateless Session Bean methods 时,会是同一个 Bean Instance 在执行。从内存方面来看, Stateful Session Bean Stateless Session Bean 比较, Stateful Session Bean 会消耗 J2EE Server 较多的内存,然而 Stateful Session Bean 的优势却在于他可以维持使用者的状态。

 

 

智力题 (每题5分,共10分)

1. 门外三个开关分别对应室内三盏灯,线路良好,在门外控制开关时候不能看到室内灯的情况,现在只允许进门一次,确定开关和灯的对应关系? 5分)

三个开关分别:关,开,开10分钟,然后进屋,暗且凉的为开关1控制的灯,亮的为开关2控制的灯,暗且热的为开关3控制的灯。

2. 有三个人去住旅馆,住三间房,每一间房$10元,于是他们一共付给老板$30, 第二天,老板觉得三间房只需要$25元就够了于是叫小弟退回$5给三位客人, 谁知小弟贪心,只退回每人$1,自己偷偷拿了$2,这样一来便等于那三位客人每人各花了九元, 于是三个人一共花了$27,再加上小弟独吞了不$2,总共是$29。可是当初他们三个人一共付出$30那么还有$1呢?  (5分)

人付出27=老板25+小弟2元。

翻译题 10分)

In early 2004, Martin Fowler asked the readers of his site: when talking about Inversion of Control: "the question, is what aspect of control are they inverting?". After talking about the term Inversion of Control Martin suggests renaming the pattern, or at least giving it a more self-explanatory name, and starts to use the term Dependency Injection. His article continues to explain some of the ideas behind Inversion of Control or Dependency Injection.

“In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they perform the wiring, a concept they refer under the very generic name of "Inversion of Control". In this article I dig into how this pattern works, under the more specific name of "Dependency Injection", and contrast it with the Service Locator alternative. The choice between them is less important than the principle of separating configuration from use.”

 

 

第二部分:高级部分

 

1 C

2 AD

3 CD

4 AD

5 D

6 AE

7 ACDE

8 ABC

9 C

10 AD

11 BCD

12 C

13 ABDE

14 B

15 C

16 B

17 B

18 AD

19 B

20 ABC

21 ABC

22 D

23 B

24 AD

25 E

26 CD

27 AC

28 BD

29 A

30 AD

31 AC

32 B

33 B

34 BCD

35 DE

36 D

37 BD

38 A

39 A

40 ACD

41 BC

42 ACD

43 E

44 BC

45 ABD

46 CD

47 B

48 C

49 C

50 D

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值