哪位大侠帮我回答一下 谢谢了

[复制链接]
查看11 | 回复1 | 2010-2-26 11:04:01 | 显示全部楼层 |阅读模式
TechnicalScreening Questions for Execution Services Automation Team in Shanghai JavaQuestions: 1. What doesthe 'transient' modifier do?a. Tells the compiler that the variable maybe changed unexpectedlyb. Prevents the variable from being persistedas part of the object's statec. Allows the variable to be passed byreferenced. Prevents further changes to the variableafter assignment 2. What is'reflection'?a. The process of duplicating a variable andits state exactly.b.Runtime introspection of a class or packagec. Persistence of an object and its state todisk or other I/Od. The process of converting an object to auniquely identifiable hash code 3. Stringliterals in java are always interneda. trueb. false 4. What is a'weak reference'?a. A variable that is passed by copyb. A variable that is passed by valuec. A reference to an object that is stored inweak memoryd. A reference to an object that may begarbage collected 5. What is'auto boxing'?a. When the IDE generates the '[]' for youb. Automatic conversion of primitives type toreference typesc. The automatic encapsulation of variablesin an arrayd. The generation of protected memory blocksfor safety 6. What are'generic classes'?a. A feature introduced in Java 6b. General purposes classes like Object andString that are re-used in different waysc. A capability in Java to allow operationson various types while providing type safetyd. A capability in Java to allow operationson reference types while not converting to7. What's thedifference between a static synchronized method and a synchronized instancemethod?a. A static synchronized method will generatea compile-time errorb. A synchronized instance method can only beexecuted by at most 1 threadc. A static synchronized method can only beexecuted by 1 thread per classd. Only a synchronized instance method willlock the classes monitor
C# Questions: 1. What's thedifference between a delegate and an event?a. Events can trigger multiple delegatesb. Only delegates can be publicly declared onan interfacec. Delegates can only be invoked from withinthe defining classd. Delegates can chain together multipleevents 2. What's thedifference between a struct and a class?a. A struct has a private constructorb. A class cannot contain public membervariablesc. A class is a value typed. A struct is a value type 3. What is thedifference between a value type and a reference type?a. A value type is allocated on the stackb. A reference type is allocated on the heapc. A value type is passed by copyd. All of the above 4. What are'generic classes'?a. A feature introduced in .Net 1b. General purposes classes like Object andString that are re-used in different waysc. A capability in Java to allow operationson various types while providing type safetyd. A capability in Java to allow operationson reference types while not converting to primitives 5. Is itpossible to lock on an integer?a. No - it's not possible to lock onreference typesb. No - it's not possible to lock on valuetypesc. Yes - both reference types and value typescan be lockedd. Yes - autoboxing makes this possible 6. How do youdeclare a thread-safe method in C#?a. Using the 'synchronized' keywordb. By marking the method 'final'c. Using the 'MethodImplAttribute'd. The only way is by locking internally inthe method 7.What does the 'override' keyword mean?a. It hides the parent class implementationof a methodb. It's used to declare extending classeswhen using inheritancec. It's used to override the existing valueof a final variabled. None of the above

回复

使用道具 举报

千问 | 2010-2-26 11:04:01 | 显示全部楼层
好好学学java吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行