Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 87

INTERVIEW QUESTIONS IN C++

1. What is encapsulation?? A. Containing and hiding information about an object, such as internal data structures and code. Encapsulation isolates the internal complexity of an object's operation from the rest of the application. For example, a client component asking for net revenue from a business object need not know the data's origin. 2. What is inheritance? A. Inheritance allows one class to reuse the state and behavior of another class. The derived class inherits the properties and method implementations of the base class and extends it by overriding methods and adding additional properties and methods. 3. What is Polymorphism? A. Polymorphism allows a client to treat different objects in the same way even if they were created from different classes and exhibit different behaviors. You can use implementation inheritance to achieve polymorphism in languages such as C+ + and Java. Base class object's pointer can invoke methods in derived class objects. You can also achieve polymorphism in C++ by function overloading and operator overloading. 4. What is constructor or ctor? Constructor creates an object and initializes it. It also creates vtable for virtual functions. It is different from other methods in a class. 5. What is destructor? Destructor usually deletes any extra resources allocated by the object. 6. What is default constructor? Constructor with no arguments or all the arguments has default values. 7. What is copy constructor? A. Constructor which initializes the it's object member variables ( by shallow copying) with another object of the same class. If you don't implement one in your class then compiler implements one for you. for example: Boo Obj1(10); // calling Boo constructor Boo Obj2(Obj1); // calling boo copy constructor Boo Obj2 = Obj1;// calling boo copy constructor 8. When are copy constructors called? A. Copy constructors are called in following cases: a) when a function returns an object of that class by value

b) when the object of that class is passed by value as an argument to a function c) when you construct an object based on another object of the same class d) When compiler generates a temporary object 9. What is assignment operator? A. Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy) 10. What are all the implicit member functions of the class? Or what are all the functions which compiler implements for us if we don't define one.?? A. )default ctor B)copy ctor C)assignment operator D)default destructor E)address operator 11)What is conversion constructor? A. Constructor with a single argument makes that constructor as conversion ctor and it can be used for type conversion. for example: class Boo { public: Boo( int i ); }; Boo BooObject = 10 ; // assigning int 10 Boo object 12. What is conversion operator? A. Class can have a public method for specific data type conversions. for example: class Boo { double value; public: Boo(int i ) operator double() { return value; }}; Boo BooObject; double i = BooObject; // assigning object to variable i of type double. now conversion operator gets called to assign the value.

13. What is diff between malloc()/free() and new/delete? A. malloc allocates memory for object in heap but doesn't invoke object's constructor to initiallize the object. new allocates memory and also invokes constructor to initialize the object. malloc() and free() do not support object semantics Does not construct and destruct objects string * ptr = (string *)(malloc (sizeof(string))) Are not safe Does not calculate the size of the objects that it construct Returns a pointer to void int *p = (int *) (malloc(sizeof(int))); int *p = new int; Are not extensible new and delete can be overloaded in a class "delete" first calls the object's termination routine (i.e. its destructor) and then releases the space the object occupied on the heap memory. If an array of objects was created using new, then delete must be told that it is dealing with an array by preceding the name with an empty []:Int_t *my_ints = new Int_t[10]; ... delete []my_ints; 14. What is the diff between "new" and "operator new" ? A. "operator new" works like malloc. 15. What is difference between template and macro?? A. There is no way for the compiler to verify that the macro parameters are of compatible types. The macro is expanded without any special type checking. If macro parameter has a post incremented variable ( like c++ ), the increment is performed two times. Because macros are expanded by the preprocessor, compiler error messages will refer to the expanded macro, rather than the macro definition itself. Also, the macro will show up in expanded form during debugging. for example: Macro: #define min(i, j) (i < j ? i : j) template: template<class T> T min (T i, T j) { return i < j ? i : j; } 16. What are C++ storage classes?

auto register static extern auto: the default. Variables are automatically created and initialized when they are defined and are destroyed at the end of the block containing their definition. They are not visible outside that block register: a type of auto variable. a suggestion to the compiler to use a CPU register for performance static: a variable that is known only in the function that contains its definition but is never destroyed and retains its value between calls to that function. It exists from the time the program begins execution extern: a static variable whose definition and placement is determined when all object and library modules are combined (linked) to form the executable code file. It can be visible outside the file where it is defined. 17. What are storage qualifiers in C++ ? A. They are.. const volatile mutable Const keyword indicates that memory once initialized, should not be altered by a program. volatile keyword indicates that the value in the memory location can be altered even though nothing in the program code modifies the contents. for example if you have a pointer to hardware location that contains the time, where hardware changes the value of this pointer variable and not the program. The intent of this keyword to improve the optimization ability of the compiler. mutable keyword indicates that particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant. struct data { char name[80]; mutable double salary; } const data MyStruct = { "Satish Shetty", 1000 }; //initlized by complier strcpy ( MyStruct.name, "Shilpa Shetty"); // compiler error

MyStruct.salaray = 2000 ; // complier is happy allowed 18. What is reference ? A. reference is a name that acts as an alias, or alternative name, for a previously defined variable or an object. prepending variable with "&" symbol makes it as reference. for example: int a; int &b = a; 19. What is passing by reference? A. Method of passing arguments to a function which takes parameter of type reference. for example: void swap( int & x, int & y ) { int temp = x; x = y; y = x; } int a=2, b=3; swap( a, b ); Basically, inside the function there won't be any copy of the arguments "x" and "y" instead they refer to original variables a and b. so no extra memory needed to pass arguments and it is more efficient. 20. When do use "const" reference arguments in function? a) Using const protects you against programming errors that inadvertently alter data. b) Using const allows function to process both const and non-const actual arguments, while a function without const in the prototype can only accept non constant arguments. c) Using a const reference allows the function to generate and use a temporary variable appropriately. 21. When are temporary variables created by C++ compiler? A. Provided that function parameter is a "const reference", compiler generates temporary variable in following 2 ways. a) The actual argument is the correct type, but it isn't Lvalue double Cuberoot ( const double & num ) { num = num * num * num; return num;

} double temp = 2.0; double value = cuberoot ( 3.0 + temp ); // argument is a expression and not a Lvalue; b) The actual argument is of the wrong type, but of a type that can be converted to the correct type long temp = 3L; double value = cuberoot ( temp); // long to double conversion 22. What is virtual function? A. When derived class overrides the base class method by redefining the same function, then if client wants to access redefined the method from derived class through a pointer from base class object, then you must define this function in base class as virtual function. class parent { void Show() { cout << "i'm parent" << endl; } }; class child: public parent { void Show() { cout << "i'm child" << endl; } }; parent * parent_object_ptr = new child; parent_object_ptr->show() // calls parent->show() i now we goto virtual world... class parent { virtual void Show() { cout << "i'm parent" << endl; } }; class child: public parent { void Show() { cout << "i'm child" << endl; } };

parent * parent_object_ptr = new child; parent_object_ptr->show() // calls child->show() 23. What is pure virtual function? or what is abstract class? A. When you define only function prototype in a base class without and do the complete implementation in derived class. This base class is called abstract class and client won't able to instantiate an object using this base class. You can make a pure virtual function or abstract class this way.. class Boo { void foo() = 0; } Boo MyBoo; // compilation error 24. What is Memory alignment?? A. The term alignment primarily means the tendency of an address pointer value to be a multiple of some power of two. So a pointer with two byte alignment has a zero in the least significant bit. And a pointer with four byte alignment has a zero in both the two least significant bits. And so on. More alignment means a longer sequence of zero bits in the lowest bits of a pointer.

25.What problem does the namespace feature solve? A. Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a library's external declarations with a unique namespace that eliminates the potential for those collisions. namespace [identifier] { namespace-body } A namespace declaration identifies and assigns a name to a declarative region. The identifier in a namespace declaration must be unique in the declarative region in which it is used. The identifier is the name of the namespace and is used to reference its members. 26. What is the use of 'using' declaration? A. A using declaration makes it possible to use a name from a namespace without the scope operator. 27.What is an Iterator class? A. A class that is used to traverse through the objects maintained by a container

class. There are five categories of iterators: input iterators, output iterators, forward iterators, bidirectional iterators, random access. An iterator is an entity that gives access to the contents of a container object without violating encapsulation constraints. Access to the contents is granted on a one-at-a-time basis in order. The order can be storage order (as in lists and queues) or some arbitrary order (as in array indices) or according to some ordering relation (as in an ordered binary tree). The iterator is a construct, which provides an interface that, when called, yields either the next element in the container, or some value denoting the fact that there are no more elements to examine. Iterators hide the details of access to and update of the elements of a container class. Something like a pointer. 28. What is a dangling pointer? A. A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning addresses of the automatic variables from a function or using the address of the memory block after it is freed. 29. What do you mean by Stack unwinding? A. It is a process during exception handling when the destructor is called for all local objects in the stack between the place where the exception was thrown and where it is caught. 30. Name the operators that cannot be overloaded?? A. sizeof, ., .*, .->, ::, ?:

31. What is a container class? What are the types of container classes? A. A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a supporting class whose purpose is to hide the topology used for maintaining the list of objects in memory. When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous

container. 32. What is inline function?? A. The __inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only at the compiler's discretion. For example, the compiler does not inline a function if its address is taken or if it is too large to inline. 33. What is overloading?? A. With the C++ language, you can overload functions and operators. Overloading is the practice of supplying more than one definition for a given function name in the same scope. - Any two functions in a set of overloaded functions must have different argument lists. - Overloading functions with argument lists of the same types, based on return type alone, is an error. 34. What is Overriding? A. To override a method, a subclass of the class that originally declared the method must declare a method with the same name, return type (or a subclass of that return type), and same parameter list. The definition of the method overriding is: Must have same method name. Must have same data type. Must have same argument list. Overriding a method means that replacing a method functionality in child class. To imply overriding functionality we need parent and child classes. In the child class you define the same method signature as one defined in the parent class. 35. What is "this" pointer? A. The this pointer is a pointer accessible only within the member functions of a class, struct, or union type. It points to the object for which the member function is called. Static member functions do not have a this pointer. When a nonstatic member function is called for an object, the address of the object is passed as a hidden argument to the function. For example, the following function call

myDate.setMonth( 3 ); can be interpreted this way: setMonth( &myDate, 3 ); The object's address is available from within the member function as the this pointer. It is legal, though unnecessary, to use the this pointer when referring to members of the class. 36. What happens when you make call "delete this;" ? A. The code has two built-in pitfalls. First, if it executes in a member function for an extern, static, or automatic object, the program will probably crash as soon as the delete statement executes. There is no portable way for an object to tell that it was instantiated on the heap, so the class cannot assert that its object is properly instantiated. Second, when an object commits suicide this way, the using program might not know about its demise. As far as the instantiating program is concerned, the object remains in scope and continues to exist even though the object did itself in. Subsequent dereferencing of the pointer can and usually does lead to disaster. You should never do this. Since compiler does not know whether the object was allocated on the stack or on the heap, "delete this" could cause a disaster. 37. How virtual functions are implemented C++? A. Virtual functions are implemented using a table of function pointers, called the vtable. There is one entry in the table per virtual function in the class. This table is created by the constructor of the class. When a derived class is constructed, its base class is constructed first which creates the vtable. If the derived class overrides any of the base classes virtual functions, those entries in the vtable are overwritten by the derived class constructor. This is why you should never call virtual functions from a constructor: because the vtable entries for the object may not have been set up by the derived class constructor yet, so you might end up calling base class implementations of those virtual functions. 38. What is name mangling in C++?? A. The process of encoding the parameter types with the function/method name into a unique name is called name mangling. The inverse process is called demangling. For example Foo::bar(int, long) const is mangled as `bar__C3Fooil'. For a constructor, the method name is left out. That is Foo::Foo(int, long) const is

10

mangled as `__C3Fooil'. 39. What is the difference between a pointer and a reference? A. A reference must always refer to some object and, therefore, must always be initialized; pointers do not have such restrictions. A pointer can be reassigned to point to different objects while a reference always refers to an object with which it was initialized. 40. How are prefix and postfix versions of operator++() differentiated? A. The postfix version of operator++() has a dummy parameter of type int. The prefix version does not have dummy parameter. 41. What is the difference between const char *myPointer and char *const myPointer? A. Const char *myPointer is a non constant pointer to constant data; while char *const myPointer is a constant pointer to non constant data. 42. How can I handle a constructor that fails? A. throw an exception. Constructors don't have a return type, so it's not possible to use return codes. The best way to signal constructor failure is therefore to throw an exception. 43. How can I handle a destructor that fails? A. Write a message to a log-file. But do not throw an exception. The C++ rule is that you must never throw an exception from a destructor that is being called during the "stack unwinding" process of another exception. For example, if someone says throw Foo(), the stack will be unwound so all the stack frames between the throw Foo() and the } catch (Foo e) { will get popped. This is called stack unwinding. During stack unwinding, all the local objects in all those stack frames are destructed. If one of those destructors throws an exception (say it throws a Bar object), the C++ runtime system is in a no-win situation: should it ignore the Bar and end up in the } catch (Foo e) { where it was originally headed? Should it ignore the Foo and look for a } catch (Bar e) { handler? There is no good answer -- either choice loses information. So the C++ language guarantees that it will call terminate() at this point, and terminate() kills the process. Bang you're dead.

11

44. What is Virtual Destructor? A. Using virtual destructors, you can destroy objects without knowing their type the correct destructor for the object is invoked using the virtual function mechanism. Note that destructors can also be declared as pure virtual functions for abstract classes. if someone will derive from your class, and if someone will say "new Derived", where "Derived" is derived from your class, and if someone will say delete p, where the actual object's type is "Derived" but the pointer p's type is your class. Can you think of a situation where your program would crash without reaching the breakpoint 45. which you set at the beginning of main()? A. C++ allows for dynamic initialization of global variables before main() is invoked. It is possible that initialization of global will invoke some function. If this function crashes the crash will occur before main() is entered. 46. Name two cases where you MUST use initialization list as opposed to assignment in constructors. A. Both non-static const data members and reference data members cannot be assigned values; instead, you should use initialization list to initialize them. 47. Can you overload a function based only on whether a parameter is a value or a reference? A. No. Passing by value and by reference looks identical to the caller.

48. What are the differences between a C++ struct and C++ class? A. The default member and base class access specifiers are different. The C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base class inheritance, and a class defaults to the private access specifier and private base class inheritance. 49. What does extern "C" int func(int *, Foo) accomplish? A. It will turn off "name mangling" for func so that one can link to code compiled by a C compiler. 50. How do you access the static member of a class? A.

12

<ClassName>::<StaticMemberName> 51. What is multiple inheritance(virtual inheritance)? What are its advantages and disadvantages? A. Multiple Inheritance is the process whereby a child can be derived from more than one parent class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion(ambiguity) when two base classes implement a method with the same name. 52. What are the access privileges in C++? What is the default access level? A. The access privileges in C++ are private, public and protected. The default access level assigned to members of a class is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it's sub-classes. Public members of a class can be accessed by anyone. 53. What is a nested class? Why can it be useful? A. A nested class is a class enclosed within the scope of another class. For example: // Example 1: Nested class // class OuterClass { class NestedClass { // ... }; // ... }; Nested classes are useful for organizing code and controlling access and dependencies. Nested classes obey access rules just like other parts of a class do; so, in Example 1, if NestedClass is public then any code can name it as OuterClass::NestedClass. Often nested classes contain private implementation details, and are therefore made private; in Example 1, if NestedClass is private, then only OuterClass's members and friends can use NestedClass. When you instantiate as outer class, it won't instantiate inside class.

13

54. What is a local class? Why can it be useful? A. local class is a class defined within the scope of a function -- any function, whether a member function or a free function. For example: // Example 2: Local class // int f() { class LocalClass { // ... }; // ... }; Like nested classes, local classes can be a useful tool for managing code dependencies. 55. Can a copy constructor accept an object of the same class as parameter, instead of reference of the object? A. No. It is specified in the definition of the copy constructor itself. It should generate an error if a programmer specifies a copy constructor with a first argument that is an object and not a reference. 56. (From Microsoft) Assume I have a linked list contains all of the alphabets from A to Z. I want to find the letter Q in the list, how does you perform the search to find the Q? 57. How do you write a function that can reverse a linked-list? (Cisco System) void reverselist(void) { if(head==0) return; if(head->next==0) return; if(head->next==tail) { head->next = 0; tail->next = head; } else { node* pre = head; node* cur = head->next; node* curnext = cur->next; head->next = 0;

14

cur->next = head; for(; curnext!=0; ) { cur->next = pre; pre = cur; cur = curnext; curnext = curnext->next; } curnext->next = cur; } } 58. How do you find out if a linked-list has an end? (i.e. the list is not a cycle) A. You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. If that is the case, then you will know the linked-list is a cycle. 59. How can you tell what shell you are running on UNIX system? A. You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID. 60. What is Boyce Codd Normal form? A. A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a->b, where a and b is a subset of R, at least one of the following holds: a->b is a trivial functional dependency (b is a subset of a) a is a superkey for schema R 61. Could you tell something about the Unix System Kernel? A. The kernel is the heart of the UNIX openrating system, its reponsible for controlling the computers resouces and scheduling user jobs so that each one gets its fair share of resources. 62. What is a Make file? A. Make file is a utility in Unix to help compile large programs. It helps by only compiling the portion of the program that has been changed 63. How do you link a C++ program to C functions? A. By using the extern "C" linkage specification around the C function declarations.

15

64. Explain the scope resolution operator. A. Design and implement a String class that satisfies the following: Supports embedded nulls Provide the following methods (at least) Constructor Destructor Copy constructor Assignment operator Addition operator (concatenation) Return character at location Return substring at location Find substring Provide versions of methods for String and for char* arguments 65. Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321]. Answer: quicksort ((data + 222), 100); 66. What is a modifier? 67. What is an accessor? 68. Differentiate between a template class and class template. 69. When does a name clash occur? 70. Define namespace. 71. What is the use of using declaration. 72. What is an Iterator class? 73. List out some of the OODBMS available. 74. List out some of the object-oriented methodologies. 75. What is an incomplete type? 76. What is a dangling pointer? 77. Differentiate between the message and method. 78. What is an adaptor class or Wrapper class? 79. What is a Null object? 80. What is class invariant? 81. What do you mean by Stack unwinding? 82. Define precondition and post-condition to a member function. 83. What are the conditions that have to be met for a condition to be an invariant of the class? 84. What are proxy objects? 85. Name some pure object oriented languages. 86. Name the operators that cannot be overloaded. 87. What is a node class? 88. What is an orthogonal base class? 89. What is a container class? What are the types of container classes?

16

90. What is a protocol class? 91. What is a mixin class? 92. What is a concrete class? 93. What is the handle class? 94. What is an action class? 95. When can you tell that a memory leak will occur? 96. What is a parameterized type? 97. Differentiate between a deep copy and a shallow copy? 98. What is an opaque pointer? 99. What is a smart pointer? 100. What is reflexive association? 101. What is slicing? 102. What is name mangling? 103. What are proxy objects? 104. What is cloning? 105. Describe the main characteristics of static functions. 106. Will the inline function be compiled as the inline function always? Justify. 107. Define a way other than using the keyword inline to make a function inline. 108. How can a '::' operator be used as unary operator? 109. What is placement new?

17

UML
1. What do you mean by analysis and design? 2. What are the steps involved in designing? 3. What are the main underlying concepts of object orientation? 4. What do u meant by "SBI" of an object? 5. Differentiate persistent & non-persistent objects? 6. What do you meant by active and passive objects? 7. What is meant by software development method? 8. What do you meant by static and dynamic modeling? 9. How to represent the interaction between the modeling elements? 10. Why generalization is very strong? 11. Differentiate Aggregation and containment? 12. Can link and Association applied interchangeably? 13. What is meant by "method-wars"? 14. Whether unified method and unified modeling language are same or different? 15. Who were the three famous amigos and what was their contribution to the object community? 16. Differentiate the class representation of Booch, Rumbaugh and UML? 17. What is an USECASE? Why it is needed? 18. Who is an Actor? 19. What is guard condition? 20. Differentiate the following notations? 21. USECASE is an implementation independent notation. How will the designer give the implementation details of a particular USECASE to the programmer? 22. Suppose a class acts an Actor in the problem domain, how to represent it in the static model? 23. Why does the function arguments are called as "signatures"?

18

INTERVIEW QUESTIONS IN

Java

1. What is a transient variable? A. A transient variable is a variable that may not be serialized. 2. Which containers use a border Layout as their default layout? A. The window, Frame and Dialog classes use a border layout as their default layout. 3. Why do threads block on I/O? A. Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed. 4. How are Observer and Observable used? A. Objects that subclass the Observable class maintain a list of observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects. 5. What is synchronization and why is it important? A. With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often leads to significant errors. 6. Can a lock be acquired on a class? A. Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object. 7. What's new with the stop(), suspend() and resume() methods in JDK 1.2? A. The stop(), suspend() and resume() methods have been deprecated in JDK 1.2. 8. Is null a keyword? A. The null value is not a keyword. 9. What is the preferred size of a component? A. The preferred size of a component is the minimum component size that will allow the component to display normally. 10. What method is used to specify a container's layout? A. The setLayout() method is used to specify a container's layout. 11. Which containers use a FlowLayout as their default layout? A. The Panel and Applet classes use the FlowLayout as their default layout.

19

12. What state does a thread enter when it terminates its processing? A. When a thread terminates its processing, it enters the dead state. 13. What is the Collections API? A. The Collections API is a set of classes and interfaces that support operations on collections of objects. 14. which characters may be used as the second character of an identifier, but not as the first character of an identifier? A. The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier. 15. What is the List interface? A. The List interface provides support for ordered collections of objects. 16. How does Java handle integer overflows and underflows? A. It uses those low order bytes of the result that can fit into the size of the type allowed by the operation. 17. What is the Vector class? A. The Vector class provides the capability to implement a growable array of objects 18. What modifiers may be used with an inner class that is a member of an outer class? A. A (non-local) inner class may be declared as public, protected, private, static, final, or abstract. 19. What is an Iterator interface? A. The Iterator interface is used to step through the elements of a Collection. 20. What is the difference between the >> and >>> operators? A. The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out. 21. Which method of the Component class is used to set the position and size of a component? A. setBounds() 22. How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? A. Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns. 23 What is the difference between yielding and sleeping?

20

A. When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state. 24. Which java.util classes and interfaces support event handling? A. The EventObject class and the EventListener interface support event processing. 25. Is sizeof a keyword? A. The sizeof operator is not a keyword. 26. What are wrapper classes? A. Wrapper classes are classes that allow primitive types to be accessed as objects. 27. Does garbage collection guarantee that a program will not run out of memory? A. Garbage collection does not guarantee that a program will not run out of memory. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection. 28. What restrictions are placed on the location of a package statement within a source code file? A. A package statement must appear as the first line in a source code file (excluding blank lines and comments). 29. Can an object's finalize() method be invoked while it is reachable? A. An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects. 30. What is the immediate superclass of the Applet class? A. Panel 31. What is the difference between preemptive scheduling and time slicing? A. Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines which task should execute next, based on priority and other factors. 32. Name three Component subclasses that support painting. A. The Canvas, Frame, Panel, and Applet classes support painting. 33. What value does readLine() return when it has reached the end of a file? A. The readLine() method returns null when it has reached the end of a file.

21

34. What is the immediate superclass of the Dialog class? A. Window. 35. What is clipping? A. Clipping is the process of confining paint operations to a limited area or shape. 36. What is a native method? A. A native method is a method that is implemented in a language other than Java. 37. Can a for statement loop indefinitely? A. Yes, a for statement can loop indefinitely. For example, consider the following: for(;;) ; 38. What are order of precedence and associativity, and how are they used? A. Order of precedence determines the order in which operators are evaluated in expressions. Associatity determines whether an expression is evaluated left-toright or right-to-left 39. When a thread blocks on I/O, what state does it enter? A. A thread enters the waiting state when it blocks on I/O. 40. To what value is a variable of the String type automatically initialized? A. The default value of a String type is null. 41. What is the catch or declare rule for method declarations? A. If a checked exception may be thrown within the body of a method, the method must either catch the exception or declare it in its throws clause. 42. What is the difference between a MenuItem and a CheckboxMenuItem? A. The CheckboxMenuItem class extends the MenuItem class to support a menu item that may be checked or unchecked. 43. What is a task's priority and how is it used in scheduling? A. A task's priority is an integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks. 44. What class is the top of the AWT event hierarchy? A. The java.awt.AWTEvent class is the highest-level class in the AWT eventclass hierarchy. 45. When a thread is created and started, what is its initial state? A. A thread is in the ready state after it has been created and started.

22

46. Can an anonymous class be declared as implementing an interface and extending a class? A. An anonymous class may implement an interface or extend a superclass, but may not be declared to do both. 47. What is the range of the short type? A. The range of the short type is -(2^15) to 2^15 - 1. 48. What is the range of the char type? A. The range of the char type is 0 to 2^16 - 1. 49. In which package are most of the AWT events that support the eventdelegation model defined? A. Most of the AWT-related events of the event-delegation model are defined in the java.awt.event package. The AWTEvent class is defined in the java.awt package. 50. What is the immediate superclass of Menu? A. MenuItem 51. What is the purpose of finalization? A. The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected. 52. Which class is the immediate superclass of the MenuComponent class. A. Object 53. What invokes a thread's run() method? A. After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed. 54. What is the difference between the Boolean & operator and the && operator? A. If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped. 55. Name three subclasses of the Component class. A. Box.Filler, Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, or TextComponent 56. What is the GregorianCalendar class? A. The GregorianCalendar provides support for traditional Western calendars.

23

57. Which Container method is used to cause a container to be laid out and redisplayed? A. validate() 58. What is the purpose of the Runtime class? A. The purpose of the Runtime class is to provide access to the Java runtime system. 59. How many times may an object's finalize() method be invoked by the garbage collector? A. An object's finalize() method may only be invoked once by the garbage collector. 60. What is the purpose of the finally clause of a try-catch-finally statement? A. The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught. 61. What is the argument type of a program's main() method? A. A program's main() method takes an argument of the String[] type. 62. Which Java operator is right associative? A. The = operator is right associative. 63. What is the Locale class? A. The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region. 64. Can a double value be cast to a byte? A. Yes, a double value can be cast to a byte. 65. What is the difference between a break statement and a continue statement? A. A break statement results in the termination of the statement to which it applies (switch, for, do, or while). A continue statement is used to end the current loop iteration and return control to the loop statement. 66. What must a class do to implement an interface? A. It must provide all of the methods in the interface and identify the interface in its implements clause. 67. What method is invoked to cause an object to begin executing as a separate thread? A. The start() method of the Thread class is invoked to cause an object to begin executing as a separate thread. 68. Name two subclasses of the TextComponent class.

24

A. TextField and TextArea 69. What is the advantage of the event-delegation model over the earlier eventinheritance model? A. The event-delegation model has two advantages over the event-inheritance model. First, it enables event handling to be handled by objects other than the ones that generate the events (or their containers). This allows a clean separation between a component's design and its use. The other advantage of the eventdelegation model is that it performs much better in applications where many events are generated. This performance improvement is due to the fact that the event-delegation model does not have to repeatedly process unhandled events, as is the case of the event-inheritance model. 70. Which containers may have a MenuBar? A. Frame 71. How are commas used in the initialization and iteration parts of a for statement? A. Commas are used to separate multiple statements within the initialization and iteration parts of a for statement. 72. What is the purpose of the wait(), notify(), and notifyAll() methods? A. The wait(),notify(), and notifyAll() methods are used to provide an efficient way for threads to wait for a shared resource. When a thread executes an object's wait() method, it enters the waiting state. It only enters the ready state after another thread invokes the object's notify() or notifyAll() methods. 73. What is an abstract method? A. An abstract method is a method whose implementation is deferred to a subclass. 74. How are Java source code files named? A. A Java source code file takes the name of a public class or interface that is defined within the file. A source code file may contain at most one public class or interface. If a public class or interface is defined within a source code file, then the source code file must take the name of the public class or interface. If no public class or interface is defined within a source code file, then the file must take on a name that is different than its classes and interfaces. Source code files use the .java extension. 75. What is the relationship between the Canvas class and the Graphics class? A. A Canvas object provides access to a Graphics object via its paint() method. 76. What are the high-level thread states? A. The high-level thread states are ready, running, waiting, and dead.

25

77. What value does read() return when it has reached the end of a file? A. The read() method returns -1 when it has reached the end of a file. 78. Can a Byte object be cast to a double value? A. No, an object cannot be cast to a primitive value. 79. What is the difference between a static and a non-static inner class? A. A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances. 80. What is the difference between the String and StringBuffer classes? A. String objects are constants. StringBuffer objects are not. 81. If a variable is declared as private, where may the variable be accessed? A. A private variable may only be accessed within the class in which it is declared. 82. What is an object's lock and which objects have locks? A. An object's lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object's lock. All objects and classes have locks. A class's lock is acquired on the class's Class object. 83. What is the Dictionary class? A. The Dictionary class provides the capability to store key-value pairs. 84. How are the elements of a BorderLayout organized? A. The elements of a BorderLayout are organized at the borders (North, South, East, and West) and the center of a container. 85. What is the % operator? A. It is referred to as the modulo or remainder operator. It returns the remainder of dividing the first operand by the second operand. 86. When can an object reference be cast to an interface reference? A. An object reference be cast to an interface reference when the object implements the referenced interface. 87. What is the difference between a Window and a Frame? A. The Frame class extends Window to define a main application window that can have a menu bar. 88. Which class is extended by all other classes? A. The Object class is extended by all other classes.

26

89. Can an object be garbage collected while it is still reachable? A. A reachable object cannot be garbage collected. Only unreachable objects may be garbage collected.. 90. Is the ternary operator written x : y ? z or x ? y : z ? A. It is written x ? y : z. 91. What is the difference between the Font and FontMetrics classes? A. The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object. 92. How is rounding performed under integer division? A. The fractional part of the result is truncated. This is known as rounding toward zero. 93. What happens when a thread cannot acquire a lock on an object? A. If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available. 94. What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy? A. The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented. 95. What classes of exceptions may be caught by a catch clause? A. A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Error and Exception types. 96. If a class is declared without any access modifiers, where may the class be accessed? A. A class that is declared without any access modifiers is said to have package access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package. 97. What is the SimpleTimeZone class? A. The SimpleTimeZone class provides support for a Gregorian calendar. 98. What is the Map interface? A. The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values. 99. Does a class inherit the constructors of its superclass? A. A class does not inherit constructors from any of its super classes. 100. For which statements does it make sense to use a label?

27

A. The only statements for which it makes sense to use a label are those statements that can enclose a break or continue statement. 101. What is the purpose of the System class? A. The purpose of the System class is to provide access to system resources. 102. Which TextComponent method is used to set a TextComponent to the readonly state? A. setEditable() 103. How are the elements of a CardLayout organized? A. The elements of a CardLayout are stacked, one on top of the other, like a deck of cards. 104. Is &&= a valid Java operator? A. No, it is not. 105. Name the eight primitive Java types. A. The eight primitive types are byte, char, short, int, long, float, double, and boolean. 106. Which class should you use to obtain design information about an object? A. The Class class is used to obtain information about an object's design. 107. What is the relationship between clipping and repainting? A. When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that requires repainting. 108. Is "abc" a primitive value? A. The String literal "abc" is not a primitive value. It is a String object. 109. What is the relationship between an event-listener interface and an eventadapter class? A. An event-listener interface defines the methods that must be implemented by an event handler for a particular kind of event. An event adapter provides a default implementation of an event-listener interface. 110. What restrictions are placed on the values of each case of a switch statement? A. During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value. 111. What modifiers may be used with an interface declaration? A. An interface may be declared as public or abstract. 112. Is a class a subclass of itself?

28

A. A class is a subclass of itself. 113. What is the highest-level event class of the event-delegation model? A. The java.util.EventObject class is the highest-level class in the eventdelegation class hierarchy. 114. What event results from the clicking of a button? A. The ActionEvent event is generated as the result of the clicking of a button. 115. How can a GUI component handle its own events? A. A component can handle its own events by implementing the required eventlistener interface and adding itself as its own event listener. 116. What is the difference between a while statement and a do statement? A. A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once. 117. How are the elements of a GridBagLayout organized? A. The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes. 118. What advantage do Java's layout managers provide over traditional windowing systems? A. Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems. 119. What is the Collection interface? A. The Collection interface provides support for the implementation of a mathematical bag - an unordered collection of objects that may contain duplicates. 120. What modifiers can be used with a local inner class? A. A local inner class may be final or abstract. 121. What is the difference between static and non-static variables? A. A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.

29

122. What is the difference between the paint() and repaint() methods? A. The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() to be invoked by the AWT painting thread. 123. What is the purpose of the File class? A. The File class is used to create objects that provide access to the files and directories of a local file system. 124. Can an exception be rethrown? A. Yes, an exception can be rethrown. 125. Which Math method is used to calculate the absolute value of a number? A. The abs() method is used to calculate absolute values. 126. How does multithreading take place on a computer with a single CPU? A. The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially. 127. When does the compiler supply a default constructor for a class? A. The compiler supplies a default constructor for a class if no other constructors are provided. 128. When is the finally clause of a try-catch-finally statement executed? A. The finally clause of the try-catch-finally statement is always executed unless the thread of execution terminates or an exception occurs within the execution of the finally clause. 129. Which class is the immediate superclass of the Container class? A. Component 130. If a method is declared as protected, where may the method be accessed? A. A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared. 131. How can the Checkbox class be used to create a radio button? A. By associating Checkbox objects with a CheckboxGroup. 132. Which non-Unicode letter characters may be used as the first character of an identifier? A. The non-Unicode letter characters $ and _ may appear as the first character of an identifier 133. What restrictions are placed on method overloading? A. Two methods may not have the same name and argument list but different return types.

30

134. What happens when you invoke a thread's interrupt method while it is sleeping or waiting? A. When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an InterruptedException is thrown. 135. What is casting? A. There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference. 136. What is the return type of a program's main() method? A. A program's main() method has a void return type. 137. Name four Container classes. A. Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane. 138. What is the difference between a Choice and a List? A. A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List items are visible. A List supports the selection of one or more List items. 139. What class of exceptions are generated by the Java run-time system? A. The Java runtime system generates RuntimeException and Error exceptions. 140. What class allows you to read objects directly from a stream? A. The ObjectInputStream class supports the reading of objects from input streams. 141. What is the difference between a field variable and a local variable? A. A field variable is a variable that is declared as a member of a class. A local variable is a variable that is declared local to a method. 142. Under what conditions is an object's finalize() method invoked by the garbage collector? A. The garbage collector invokes an object's finalize() method when it detects that the object has become unreachable. 143. How are this () and super () used with constructors? A. this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.

31

144. What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution? A. A method's throws clause must declare any checked exceptions that are not caught within the body of the method. 145. What is the difference between the JDK 1.02 event model and the eventdelegation model introduced with JDK 1.1? A. The JDK 1.02 event model uses an event inheritance or bubbling approach. In this model, components are required to handle their own events. If they do not handle a particular event, the event is inherited by (or bubbled up to) the component's container. The container then either handles the event or it is bubbled up to its container and so on, until the highest-level container has been tried. In the event-delegation model, specific objects are designated as event handlers for GUI components. These objects implement event-listener interfaces. The event-delegation model is more efficient than the event-inheritance model because it eliminates the processing required to support the bubbling of unhandled events. 146. How is it possible for two String objects with identical values not to be equal under the == operator? A. The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory. 147. Why are the methods of the Math class static? A. So they can be invoked as if they are a mathematical code library. 148. What Checkbox method allows you to tell if a Checkbox is checked? A. getState() 149. What state is a thread in when it is executing? A. An executing thread is in the running state. 150. What are the legal operands of the instanceof operator? A. The left operand is an object reference or null value and the right operand is a class, interface, or array type. 151. How are the elements of a GridLayout organized? A. The elements of a GridBad layout are of equal size and are laid out using the squares of a grid. 152. What an I/O filter? A. An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.

32

153. If an object is garbage collected, can it become reachable again? A. Once an object is garbage collected, it ceases to exist. It can no longer become reachable again. 154. What is the Set interface? A. The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements. 155. What classes of exceptions may be thrown by a throw statement? A. A throw statement may throw any expression that may be assigned to the Throwable type. 156. What are E and PI? A. E is the base of the natural logarithm and PI is mathematical value pi. 157. Are true and false keywords? A. The values true and false are not keywords. 158. What is a void return type? A. A void return type indicates that a method does not return a value. 159. What is the purpose of the enableEvents() method? A. The enableEvents() method is used to enable an event for a particular object. Normally, an event is enabled when a listener is added to an object for a particular event. The enableEvents() method is used by objects that handle events by overriding their event-dispatch methods. 160. What is the difference between the File and RandomAccessFile classes? A. The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file. 161. What happens when you add a double value to a String? A. The result is a String object.162. What is your platform's default character encoding? If you are running Java on English Windows platforms, it is probably Cp1252. If you are running Java on English Solaris platforms, it is most likely 8859_1.. 163. Which package is always imported by default? A. The java.lang package is always imported by default. 164. What interface must an object implement before it can be written to a stream as an object? A. An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.

33

165. How are this and super used? A. this is used to refer to the current object instance. super is used to refer to the variables and methods of the superclass of the current object instance. 166. What is the purpose of garbage collection? A. The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources may be reclaimed and reused. 167. What is a compilation unit? A. A compilation unit is a Java source code file. 168. What interface is extended by AWT event listeners? A. All AWT event listeners extend the java.util.EventListener interface. 169. What restrictions are placed on method overriding? Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method. 170. How can a dead thread be restarted? A dead thread cannot be restarted. 171. What happens if an exception is not caught? A. An uncaught exception results in the uncaughtException() method of the thread's ThreadGroup being invoked, which eventually results in the termination of the program in which it is thrown. 172. What is a layout manager? A. A layout manager is an object that is used to organize components in a container. 173. Which arithmetic operations can result in the throwing of an ArithmeticException? A. Integer / and % can result in the throwing of an ArithmeticException. 174. What are three ways in which a thread can enter the waiting state? A. A thread can enter the waiting state by invoking its sleep() method, by blocking on I/O, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. It can also enter the waiting state by invoking its (deprecated) suspend() method. 175. Can an abstract class be final? A. An abstract class may not be declared as final.

34

176. What is the ResourceBundle class? A. The Resource Bundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run. 177. What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement? A. The exception propagates up to the next higher level try-catch statement (if any) or results in the program's termination. 178. What is numeric promotion? A. Numeric promotion is the conversion of a smaller numeric type to a larger numeric type, so that integer and floating-point operations may take place. In numerical promotion, byte, char, and short values are converted to int values. The int values are also converted to long values, if necessary. The long and float values are converted to double values, as required. 179. What is the difference between a Scrollbar and a ScrollPane? A. A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane handles its own events and performs its own scrolling. 180. What is the difference between a public and a non-public class? A. A public class may be accessed outside of its package. A non-public class may not be accessed outside of its package. 181. To what value is a variable of the boolean type automatically initialized? A. The default value of the boolean type is false. 182. Can try statements be nested? A. Try statements may be tested. 183. What is the difference between the prefix and postfix forms of the ++ operator? A. The prefix form performs the increment operation and returns the value of the increment operation. The postfix form returns the current value all of the expression and then performs the increment operation on that value. 184. What is the purpose of a statement block? A. A statement block is used to organize a sequence of statements as a single statement group. 185. What is a Java package and how is it used? A. A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control accessibility to these classes and interfaces.

35

186. What modifiers may be used with a top-level class? A. A top-level class may be public, abstract, or final. 187. What are the Object and Class classes used for? A. The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program. 188. How does a try statement determine which catch clause should be used to handle an exception? A. When an exception is thrown within the body of a try statement, the catch clauses of the try statement are examined in the order in which they appear. The first catch clause that is capable of handling the exception is executed. The remaining catch clauses are ignored. 189. Can an unreachable object become reachable again? A. An unreachable object may become reachable again. This can happen when the object's finalize() method is invoked and the object performs an operation which causes it to become accessible to reachable objects.190. When is an object subject to garbage collection? A. An object is subject to garbage collection when it becomes unreachable to the program in which it is used. 191. What method must be implemented by all threads? A. All tasks must implement the run() method, whether they are a subclass of Thread or implement the Runnable interface. 192. What methods are used to get and set the text label displayed by a Button object? A. getLabel() and setLabel() 193. Which Component subclass is used for drawing and painting? A. Canvas 194. What are synchronized methods and synchronized statements? A. Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement. 195. What are the two basic ways in which classes that can be run as threads may be defined? A. A thread class may be declared as a subclass of Thread, or it may implement the Runnable interface.

36

196. What are the problems faced by Java programmers who don't use layout managers? A. Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints imposed by each windowing system. 197. What is the difference between an if statement and a switch statement? A. The if statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.

37

J2EE
1. What is "abstract schema" A. The part of an entity bean's deployment descriptor that defines the bean's persistent fields and relationships. 2. What is "abstract schema name" A. A logical name that is referenced in EJB QL queries. 3. What is "access control" A. The methods by which interactions with resources are limited to collections of users or programs for the purpose of enforcing integrity, confidentiality, or availability constraints. 4.What is "ACID" A. The acronym for the four properties guaranteed by transactions: atomicity, consistency, isolation, and durability. 5. What is "activation" A. The process of transferring an enterprise bean from secondary storage to memory. (See passivation.) What is "anonymous access" Accessing a resource without authentication. 6. What is "applet" A. A J2EE component that typically executes in a Web browser but can execute in a variety of other applications or devices that support the applet programming model. 7. What is "applet container" A. A container that includes support for the applet programming model. 8. What is "application assembler" A. A person who combines J2EE components and modules into deployable application units. 9. What is "application client" A. A first-tier J2EE client component that executes in its own Java virtual machine. Application clients have access to some J2EE platform APIs. 10. What is "application client container" A. A container that supports application client components. 11. What is "application client module" A. A software unit that consists of one or more classes and an application client deployment descriptor.

38

12. What is "application component provider" A. A vendor that provides the Java classes that implement components' methods, JSP page definitions, and any required deployment descriptors. 13.What is "application configuration resource file" A. An XML file used to configure resources for a JavaServer Faces application, to define navigation rules for the application, and to register converters, validators, listeners, renderers, and components with the application. 14. What is "archiving" A. The process of saving the state of an object and restoring it. 15. What is "asant"? A. A Java-based build tool that can be extended using Java classes. The configuration files are XML-based, calling out a target tree where various tasks get executed. 16. What is "attribute" A. A qualifier on an XML tag that provides additional information. 17. What is authentication A. The process that verifies the identity of a user, device, or other entity in a computer system, usually as a prerequisite to allowing access to resources in a system. The Java servlet specification requires three types of authentication-basic, form-based, and mutual-and supports digest authentication. 18. What is authorization? A. The process by which access to a method or resource is determined. Authorization depends on the determination of whether the principal associated with a request through authentication is in a given security role. A security role is a logical grouping of users defined by the person who assembles the application. A deployer maps security roles to security identities. Security identities may be principals or groups in the operational environment. 19. What is authorization constraint A. An authorization rule that determines who is permitted to access a Web resource collection. 20. What is B2B A. B2B stands for Business-to-business. 21. What is backing bean A. A JavaBeans component that corresponds to a JSP page that includes JavaServer Faces components. The backing bean defines properties for the

39

components on the page and methods that perform processing for the component. This processing includes event handling, validation, and processing associated with navigation. 22. What is basic authentication A. An authentication mechanism in which a Web server authenticates an entity via a user name and password obtained using the Web application's built-in authentication mechanism. 23. What is bean-managed persistence A. The mechanism whereby data transfer between an entity bean's variables and a resource manager is managed by the entity bean. 24. What is bean-managed transaction A. A transaction whose boundaries are defined by an enterprise bean. 25. What is binary entity A. See unparsed entity. 26. What is binding (XML) A. Generating the code needed to process a well-defined portion of XML data. 27. What is binding (JavaServer Faces technology) Wiring UI components to back-end data sources such as backing bean properties. 28. What is build file? A. The XML file that contains one or more asant targets. A target is a set of tasks you want to be executed. When starting asant, you can select which targets you want to have executed. When no target is given, the project's default target is executed. 29. What is business logic A. The code that implements the functionality of an application. In the Enterprise JavaBeans architecture, this logic is implemented by the methods of an enterprise bean. 30. What is business method ? A. A method of an enterprise bean that implements the business logic or rules of an application. 31. What is callback methods? A. Component methods called by the container to notify the component of important events in its life cycle. 32. What is caller?

40

A. Same as caller principal. 33. What is caller principal? A. The principal that identifies the invoker of the enterprise bean method. 34. What is cascade delete A. A deletion that triggers another deletion. A cascade delete can be specified for an entity bean that has container-managed persistence. 35. What is CDATA? A. A predefined XML tag for character data that means "don't interpret these characters," as opposed to parsed character data (PCDATA), in which the normal rules of XML syntax apply. CDATA sections are typically used to show examples of XML syntax. 36. What is certificate authority? A. A trusted organization that issues public key certificates and provides identification to the bearer. 37. What is client-certificate authentication? A. An authentication mechanism that uses HTTP over SSL, in which the server and, optionally, the client authenticate each other with a public key certificate that conforms to a standard that is defined by X.509 Public Key Infrastructure. 38. What is comment? A. In an XML document, text that is ignored unless the parser is specifically told to recognize it. 39. What is commit? A. The point in a transaction when all updates to any resources involved in the transaction are made permanent. 40. What is component? A. See what is J2EE component. 41. What is component (JavaServer Faces technology)? A. See what is JavaServer Faces UI component. 42. What is component contract? A. The contract between a J2EE component and its container. The contract includes life-cycle management of the component, a context interface that the instance uses to obtain various information and services from its container, and a list of services that every container must provide for its components. 43. What is component-managed sign-on? A. A mechanism whereby security information needed for signing on to a resource is provided by an application component.

41

44. What is connection? A. See what is resource manager connection. 45. What is connection factory? A. See what is resource manager connection factory. 46. What is connector? A. A standard extension mechanism for containers that provides connectivity to enterprise information systems. A connector is specific to an enterprise information system and consists of a resource adapter and application development tools for enterprise information system connectivity. The resource adapter is plugged in to a container through its support for system-level contracts defined in the Connector architecture. 47. What is Connector architecture? A. An architecture for integration of J2EE products with enterprise information systems. There are two parts to this architecture: a resource adapter provided by an enterprise information system vendor and the J2EE product that allows this resource adapter to plug in. This architecture defines a set of contracts that a resource adapter must support to plug in to a J2EE product-for example, transactions, security, and resource management. 48. What is container? A. An entity that provides life-cycle management, security, deployment, and runtime services to J2EE components. Each type of container (EJB, Web, JSP, servlet, applet, and application client) also provides component-specific services. 49. What is container-managed persistence? A. The mechanism whereby data transfer between an entity bean's variables and a resource manager is managed by the entity bean's container. 50. What is container-managed sign-on? A. The mechanism whereby security information needed for signing on to a resource is supplied by the container. 51. What is container-managed transaction? A. A transaction whose boundaries are defined by an EJB container. An entity bean must use container-managed transactions. 52. What is content? In an XML document, the part that occurs after the prolog, including the root element and everything it contains.

42

53. What is context attribute ? A. An object bound into the context associated with a servlet. 54. What is context root? A. A name that gets mapped to the document root of a Web application. 55. What is conversational state? A. The field values of a session bean plus the transitive closure of the objects reachable from the bean's fields. The transitive closure of a bean is defined in terms of the serialization protocol for the Java programming language, that is, the fields that would be stored by serializing the bean instance. 56. What is CORBA? Common Object Request Broker Architecture. A language-independent distributed object model specified by the OMG. 57. What is create method? A. A method defined in the home interface and invoked by a client to create an enterprise bean. 58. What is credentials? A. The information describing the security attributes of a principal. 59. What is CSS? A. Cascading style sheet. A stylesheet used with HTML and XML documents to add a style to all elements marked with a particular tag, for the direction of browsers or other presentation mechanisms. 60. What is CTS? A. Compatibility test suite. A suite of compatibility tests for verifying that a J2EE product complies with the J2EE platform specification. 61. What is data? A. The contents of an element in an XML stream, generally used when the element does not contain any subelements. When it does, the term content is generally used. When the only text in an XML structure is contained in simple elements and when elements that have subelements have little or no data mixed in, then that structure is often thought of as XML data, as opposed to an XML document. 62. What is DDP? A. Document-driven programming. The use of XML to define applications. 63. What is declaration? A. The very first thing in an XML document, which declares it as XML. The

43

minimal declaration is <?xml version="1.0"?>. The declaration is part of the document prolog. 64. What is declarative security? A. Mechanisms used in an application that are expressed in a declarative syntax in a deployment descriptor. 65. What is delegation? A. An act whereby one principal authorizes another principal to use its identity or privileges with some restrictions. 66. What is deployer? A. A person who installs J2EE modules and applications into an operational environment. 67. What is deployment? A. The process whereby software is installed into an operational environment. 68. What is deployment descriptor? A. An XML file provided with each module and J2EE application that describes how they should be deployed. The deployment descriptor directs a deployment tool to deploy a module or application with specific container options and describes specific configuration requirements that a deployer must resolve. 69. What is destination? A. A JMS administered object that encapsulates the identity of a JMS queue or topic. See point-to-point messaging system, publish/subscribe messaging system. 70. What is digest authentication? A. An authentication mechanism in which a Web application authenticates itself to a Web server by sending the server a message digest along with its HTTP request message. The digest is computed by employing a one-way hash algorithm to a concatenation of the HTTP request message and the client's password. The digest is typically much smaller than the HTTP request and doesn't contain the password. 71. What is distributed application? A. An application made up of distinct components running in separate runtime environments, usually on different platforms connected via a network. Typical distributed applications are two-tier (client-server), three-tier (client-middlewareserver), and multitier (client-multiple middleware-multiple servers). 72. What is document? A. In general, an XML structure in which one or more elements contains text intermixed with subelements. See also data.

44

73. What is Document Object Model? A. An API for accessing and manipulating XML documents as tree structures. DOM provides platform-neutral, language-neutral interfaces that enables programs and scripts to dynamically access and modify content and structure in XML documents. 74. What is document root? A. The top-level directory of a WAR. The document root is where JSP pages, client-side classes and archives, and static Web resources are stored. 75. What is DTD? A. Document type definition. An optional part of the XML document prolog, as specified by the XML standard. The DTD specifies constraints on the valid tags and tag sequences that can be in the document. The DTD has a number of shortcomings, however, and this has led to various schema proposals. For example, the DTD entry <! ELEMENT username (#PCDATA)> says that the XML element called username contains parsed character data-that is, text alone, with no other structural elements under it. The DTD includes both the local subset, defined in the current file, and the external subset, which consists of the definitions contained in external DTD files that are referenced in the local subset using a parameter entity. 76. What is durable subscription? A. In a JMS publish/subscribe messaging system, a subscription that continues to exist whether or not there is a current active subscriber object. If there is no active subscriber, the JMS provider retains the subscription's messages until they are received by the subscription or until they expire. 77. What is EAR file? A. Enterprise Archive file. A JAR archive that contains a J2EE application. 78. What is eb XML? A. Electronic Business XML. A group of specifications designed to enable enterprises to conduct business through the exchange of XML-based messages. It is sponsored by OASIS and the United Nations Centre for the Facilitation of Procedures and Practices in Administration, Commerce and Transport (U.N./CEFACT). 79. What is EJB? A. Enterprise JavaBeans. 80. What is EJB container? A. A container that implements the EJB component contract of the J2EE architecture. This contract specifies a runtime environment for enterprise beans that includes security, concurrency, life-cycle management, transactions, deployment, naming, and other services. An EJB container is provided by an EJB

45

or J2EE server. What is EJB container provider A vendor that supplies an EJB container. 81. What is EJB context? A. An object that allows an enterprise bean to invoke services provided by the container and to obtain the information about the caller of a client-invoked method. 82. What is EJB home object? A. An object that provides the life-cycle operations (create, remove, find) for an enterprise bean. The class for the EJB home object is generated by the container's deployment tools. The EJB home object implements the enterprise bean's home interface. The client references an EJB home object to perform life-cycle operations on an EJB object. The client uses JNDI to locate an EJB home object. 83. What is EJB JAR file? A. A JAR archive that contains an EJB module. 84. What is EJB module? A. A deployable unit that consists of one or more enterprise beans and an EJB deployment descriptor. 85. What is EJB object? A. An object whose class implements the enterprise bean's remote interface. A client never references an enterprise bean instance directly; a client always references an EJB object. The class of an EJB object is generated by a container's deployment tools. What is EJB server Software that provides services to an EJB container. For example, an EJB container typically relies on a transaction manager that is part of the EJB server to perform the two-phase commit across all the participating resource managers. The J2EE architecture assumes that an EJB container is hosted by an EJB server from the same vendor, so it does not specify the contract between these two entities. An EJB server can host one or more EJB containers. 86. What is EJB server provider? A. A vendor that supplies an EJB server. 87. What is element? A. A unit of XML data, delimited by tags. An XML element can enclose other elements. 88. What is empty tag? A. A tag that does not enclose any content.

46

89 What is enterprise bean? A. A J2EE component that implements a business task or business entity and is hosted by an EJB container; either an entity bean, a session bean, or a messagedriven bean. 90. What is enterprise bean provider? A. An application developer who produces enterprise bean classes, remote and home interfaces, and deployment descriptor files, and packages them in an EJB JAR file. What is enterprise information system. The applications that constitute an enterprise's existing system for handling companywide information. These applications provide an information infrastructure for an enterprise. An enterprise information system offers a well-defined set of services to its clients. These services are exposed to clients as local or remote interfaces or both. Examples of enterprise information systems include enterprise resource planning systems, mainframe transaction processing systems, and legacy database systems. 91. What is enterprise information system resource? A. An entity that provides enterprise information system-specific functionality to its clients. Examples are a record or set of records in a database system, a business object in an enterprise resource planning system, and a transaction program in a transaction processing system. 92. What is Enterprise JavaBeans (EJB)? A. A component architecture for the development and deployment of objectoriented, distributed, enterprise-level applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and secure. 93. What is Enterprise JavaBeans Query Language (EJB QL)? A. Defines the queries for the finder and select methods of an entity bean having container-managed persistence. A subset of SQL92, EJB QL has extensions that allow navigation over the relationships defined in an entity bean's abstract schema. 94. What is an entity? A. A distinct, individual item that can be included in an XML document by referencing it. Such an entity reference can name an entity as small as a character (for example, &lt;, which references the less-than symbol or left angle bracket, <). An entity reference can also reference an entire document, an external entity, or a collection of DTD definitions.

95. What is entity bean?

47

A. An enterprise bean that represents persistent data maintained in a database. An entity bean can manage its own persistence or can delegate this function to its container. An entity bean is identified by a primary key. If the container in which an entity bean is hosted crashes, the entity bean, its primary key, and any remote references survive the crash. 96. What is entity reference? A. A reference to an entity that is substituted for the reference when the XML document is parsed. It can reference a predefined entity such as &lt; or reference one that is defined in the DTD. In the XML data, the reference could be to an entity that is defined in the local subset of the DTD or to an external XML file (an external entity). The DTD can also carve out a segment of DTD specifications and give it a name so that it can be reused (included) at multiple points in the DTD by defining a parameter entity. 97. What is error? A. A SAX parsing error is generally a validation error; in other words, it occurs when an XML document is not valid, although it can also occur if the declaration specifies an XML version that the parser cannot handle. See also fatal error, warning. 98. What is Extensible Markup Language? A. XML. 99. What is external entity? A. An entity that exists as an external XML file, which is included in the XML document using an entity reference. 100. What is external subset? A. That part of a DTD that is defined by references to external DTD files. 101. What is fatal error? A. A fatal error occurs in the SAX parser when a document is not well formed or otherwise cannot be processed. See also error, warning. 102. What is filter? A. An object that can transform the header or content (or both) of a request or response. Filters differ from Web components in that they usually do not themselves create responses but rather modify or adapt the requests for a resource, and modify or adapt responses from a resource. A filter should not have any dependencies on a Web resource for which it is acting as a filter so that it can be composable with more than one type of Web resource.

48

103. What is filter chain? A. A concatenation of XSLT transformations in which the output of one transformation becomes the input of the next. 104. What is finder method? A. A method defined in the home interface and invoked by a client to locate an entity bean. 105. What is form-based authentication? A. An authentication mechanism in which a Web container provides an application-specific form for logging in. This form of authentication uses Base64 encoding and can expose user names and passwords unless all connections are over SSL. 106. What is general entity? A. An entity that is referenced as part of an XML document's content, as distinct from a parameter entity, which is referenced in the DTD. A general entity can be a parsed entity or an unparsed entity. 107. What is group? A. An authenticated set of users classified by common traits such as job title or customer profile. Groups are also associated with a set of roles, and every user that is a member of a group inherits all the roles assigned to that group. 108. What is handle? An object that identifies an enterprise bean. A client can serialize the handle and then later deserialize it to obtain a reference to the enterprise bean. 109. What is home handle? A. An object that can be used to obtain a reference to the home interface. A home handle can be serialized and written to stable storage and deserialized to obtain the reference. 110. What is home interface? A. One of two interfaces for an enterprise bean. The home interface defines zero or more methods for managing an enterprise bean. The home interface of a session bean defines create and remove methods, whereas the home interface of an entity bean defines create, finder, and remove methods. 111. What is HTML? A. Hypertext Markup Language. A markup language for hypertext documents on the Internet. HTML enables the embedding of images, sounds, video streams, form fields, references to other objects with URLs, and basic text formatting.

49

113. What is HTTP? A. Hypertext Transfer Protocol. The Internet protocol used to retrieve hypertext objects from remote hosts. HTTP messages consist of requests from client to server and responses from server to client. 114. What is HTTPS? A. HTTP layered over the SSL protocol. 115. What is IDL? A. Interface Definition Language. A language used to define interfaces to remote CORBA objects. The interfaces are independent of operating systems and programming languages. 116. What is IIOP? A. Internet Inter-ORB Protocol. A protocol used for communication between CORBA object request brokers. 117. What is impersonation? A. An act whereby one entity assumes the identity and privileges of another entity without restrictions and without any indication visible to the recipients of the impersonator's calls that delegation has taken place. Impersonation is a case of simple delegation. 118. What is initialization parameter? A. A parameter that initializes the context associated with a servlet. 119. What is ISO 3166? A. The international standard for country codes maintained by the International Organization for Standardization (ISO). 120. What is ISV? A. Independent software vendor. 121. What is J2EE? A. Java 2 Platform, Enterprise Edition. 122. What is J2EE application? A. Any deployable unit of J2EE functionality. This can be a single J2EE module or a group of modules packaged into an EAR file along with a J2EE application deployment descriptor. J2EE applications are typically engineered to be distributed across multiple computing tiers.

50

123. What is J2EE component? A. A self-contained functional software unit supported by a container and configurable at deployment time. The J2EE specification defines the following J2EE components: Application clients and applets are components that run on the client. Java servlet and JavaServer Pages (JSP) technology components are Web components that run on the server. Enterprise JavaBeans (EJB) components (enterprise beans) are business components that run on the server. J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and "standard" Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with the J2EE specification, and deployed to production, where they are run and managed by the J2EE server or client container. 124. What is J2EE module? A. A software unit that consists of one or more J2EE components of the same container type and one deployment descriptor of that type. There are four types of modules: EJB, Web, application client, and resource adapter. Modules can be deployed as stand-alone units or can be assembled into a J2EE application. 125. What is J2EE product? A. An implementation that conforms to the J2EE platform specification. 126. What is J2EE product provider? A. A vendor that supplies a J2EE product. 127. What is J2EE server? A. The runtime portion of a J2EE product. A J2EE server provides EJB or Web containers or both. 128. What is J2ME? A. Abbreviate of Java 2 Platform, Micro Edition. 129. What is J2SE? A. Abbreviate of Java 2 Platform, Standard Edition. 130. What is JAR? A. Java archive. A platform-independent file format that permits many files to be aggregated into one file. 131. What is Java 2 Platform, Enterprise Edition (J2EE)? A. An environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, Web-based applications.

51

132. What is Java 2 Platform, Micro Edition (J2ME)? A. A highly optimized Java runtime environment targeting a wide range of consumer products, including pagers, cellular phones, screen phones, digital settop boxes, and car navigation systems. 133. What is Java 2 Platform, Standard Edition (J2SE)? A. The core Java technology platform. 134. What is Java API for XML Processing (JAXP)? A. An API for processing XML documents. JAXP leverages the parser standards SAX and DOM so that you can choose to parse your data as a stream of events or to build a tree-structured representation of it. JAXP supports the XSLT standard, giving you control over the presentation of the data and enabling you to convert the data to other XML documents or to other formats, such as HTML. JAXP provides namespace support, allowing you to work with schema that might otherwise have naming conflicts. 135. What is Java API for XML Registries (JAXR)? A. An API for accessing various kinds of XML registries. 136. What is Java API for XML-based RPC (JAX-RPC)? A. An API for building Web services and clients that use remote procedure calls and XML. 137. What is Java IDL? A. A technology that provides CORBA interoperability and connectivity capabilities for the J2EE platform. These capabilities enable J2EE applications to invoke operations on remote network services using the Object Management Group IDL and IIOP. 138. What is Java Message Service (JMS)? A. An API for invoking operations on enterprise messaging systems. 139. What is Java Naming and Directory Interface (JNDI)? A. An API that provides naming and directory functionality. 140. What is Java Secure Socket Extension (JSSE)? A. A set of packages that enable secure Internet communications. 141. What is Java Transaction API (JTA)? A. An API that allows applications and J2EE servers to access transactions. 142. What is Java Transaction Service (JTS)? A. Specifies the implementation of a transaction manager that supports JTA and implements the Java mapping of the Object Management Group Object Transaction Service 1.1 specification at the level below the API.

52

143. What is JavaBeans component? A. A Java class that can be manipulated by tools and composed into applications. A JavaBeans component must adhere to certain property and event interface conventions. 144. What is JavaMail? A. An API for sending and receiving email. 145. What is JavaServer Faces Technology? A. A framework for building server-side user interfaces for Web applications written in the Java programming language. 146. What is JavaServer Faces conversion model? A. A mechanism for converting between string-based markup generated by JavaServer Faces UI components and server-side Java objects. 147. What is JavaServer Faces event and listener model? A mechanism for determining how events emitted by JavaServer Faces UI components are handled. This model is based on the JavaBeans component event and listener model. 148. What is JavaServer Faces expression language? A simple expression language used by a JavaServer Faces UI component tag attributes to bind the associated component to a bean property or to bind the associated component's value to a method or an external data source, such as a bean property. Unlike JSP EL expressions, JavaServer Faces EL expressions are evaluated by the JavaServer Faces implementation rather than by the Web container. 149. What is JavaServer Faces navigation model? A. A mechanism for defining the sequence in which pages in a JavaServer Faces application are displayed. 150. What is JavaServer Faces UI component? A. A user interface control that outputs data to a client or allows a user to input data to a JavaServer Faces application. 151. What is JavaServer Faces UI component class? A. A JavaServer Faces class that defines the behavior and properties of a JavaServer Faces UI component. 152. What is JavaServer Faces validation model? A. A mechanism for validating the data a user inputs to a JavaServer Faces UI component.

53

153. What is JavaServer Pages (JSP)? A. An extensible Web technology that uses static data, JSP elements, and serverside Java objects to generate dynamic content for a client. Typically the static data is HTML or XML elements, and in many cases the client is a Web browser. 154. What is JavaServer Pages Standard Tag Library (JSTL)? A. A tag library that encapsulates core functionality common to many JSP applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization and locale-specific formatting tags, SQL tags, and functions. 155. What is JAXR client? A. A client program that uses the JAXR API to access a business registry via a JAXR provider. 156. What is JAXR provider? A. An implementation of the JAXR API that provides access to a specific registry provider or to a class of registry providers that are based on a common specification. 157. What is JDBC? A. An API for database-independent connectivity between the J2EE platform and a wide range of data sources. 158. What is JMS? A. Java Message Service. 159. What is JMS administered object? A. A preconfigured JMS object (a resource manager connection factory or a destination) created by an administrator for the use of JMS clients and placed in a JNDI namespace. 160. What is JMS application? A. One or more JMS clients that exchange messages. 161. What is JMS client? A. A Java language program that sends or receives messages. 162. What is JMS provider? A. A messaging system that implements the Java Message Service as well as other administrative and control functionality needed in a full-featured messaging product.

54

163. What is JMS session? A. A single-threaded context for sending and receiving JMS messages. A JMS session can be nontransacted, locally transacted, or participating in a distributed transaction. 164. What is JNDI? A. Abbreviate of Java Naming and Directory Interface. 165. What is JSP? A. Abbreviate of JavaServer Pages. 166. What is JSP action? A. A JSP element that can act on implicit objects and other server-side objects or can define new scripting variables. Actions follow the XML syntax for elements, with a start tag, a body, and an end tag; if the body is empty it can also use the empty tag syntax. The tag must use a prefix. There are standard and custom actions. 167. What is JSP container? A. A container that provides the same services as a servlet container and an engine that interprets and processes JSP pages into a servlet. 168. What is JSP container, distributed? A. A JSP container that can run a Web application that is tagged as distributable and is spread across multiple Java virtual machines that might be running on different hosts. 169. What is JSP custom action? A. A user-defined action described in a portable manner by a tag library descriptor and imported into a JSP page by a taglib directive. Custom actions are used to encapsulate recurring tasks in writing JSP pages. 170. What is JSP custom tag? A. A tag that references a JSP custom action. 171. What is JSP declaration? A. A JSP scripting element that declares methods, variables, or both in a JSP page. 172. What is JSP directive? A. A JSP element that gives an instruction to the JSP container and is interpreted at translation time. 173. What is JSP document? A. A JSP page written in XML syntax and subject to the constraints of XML documents.

55

174. What is JSP element? A. A portion of a JSP page that is recognized by a JSP translator. An element can be a directive, an action, or a scripting element. 175. What is JSP expression? A. A scripting element that contains a valid scripting language expression that is evaluated, converted to a String, and placed into the implicit out object. 176. What is JSP expression language? A. A language used to write expressions that access the properties of JavaBeans components. EL expressions can be used in static text and in any standard or custom tag attribute that can accept an expression. 177. What is JSP page? A. A text-based document containing static text and JSP elements that describes how to process a request to create a response. A JSP page is translated into and handles requests as a servlet. 178. What is JSP scripting element? A. A JSP declaration, scriptlet, or expression whose syntax is defined by the JSP specification and whose content is written according to the scripting language used in the JSP page. The JSP specification describes the syntax and semantics for the case where the language page attribute is "java". 179. What is JSP scriptlet? A. A JSP scripting element containing any code fragment that is valid in the scripting language used in the JSP page. The JSP specification describes what is a valid scriptlet for the case where the language page attribute is "java". 180. What is JSP standard action? A. An action that is defined in the JSP specification and is always available to a JSP page. 181. What is JSP tag file? A. A source file containing a reusable fragment of JSP code that is translated into a tag handler when a JSP page is translated into a servlet. 182. What is JSP tag handler? A. A Java programming language object that implements the behavior of a custom tag. 183. What is JSP tag library? A. A collection of custom tags described via a tag library descriptor and Java classes. 184. What is JSTL? A. Abbreviate of JavaServer Pages Standard Tag Library.

56

185. What is JTA? A. Abbreviate of Java Transaction API. 186. What is JTS? A. Abbreviate of Java Transaction Service. 187. What is keystore? A. A file containing the keys and certificates used for authentication. 188. What is life cycle (J2EE component)? A. The framework events of a J2EE component's existence. Each type of component has defining events that mark its transition into states in which it has varying availability for use. For example, a servlet is created and has its init method called by its container before invocation of its service method by clients or other servlets that require its functionality. After the call of its init method, it has the data and readiness for its intended use. The servlet's destroy method is called by its container before the ending of its existence so that processing associated with winding up can be done and resources can be released. The init and destroy methods in this example are callback methods. Similar considerations apply to the life cycle of all J2EE component types: enterprise beans, Web components (servlets or JSP pages), applets, and application clients. 189. What is life cycle (JavaServer Faces)? A. A set of phases during which a request for a page is received, a UI component tree representing the page is processed, and a response is produced. During the phases of the life cycle: The local data of the components is updated with the values contained in the request parameters. Events generated by the components are processed. Validators and converters registered on the components are processed. The components' local data is updated to back-end objects. The response is rendered to the client while the component state of the response is saved on the server for future requests. 190. What is local subset? A. That part of the DTD that is defined within the current XML file. 191. What is managed bean creation facility? A. A mechanism for defining the characteristics of JavaBeans components used in a JavaServer Faces application.

57

192. What is message? A. In the Java Message Service, an asynchronous request, report, or event that is created, sent, and consumed by an enterprise application and not by a human. It contains vital information needed to coordinate enterprise applications, in the form of precisely formatted data that describes specific business actions. 193. What is message consumer? A. An object created by a JMS session that is used for receiving messages sent to a destination. 194. What is message-driven bean? A. An enterprise bean that is an asynchronous message consumer. A messagedriven bean has no state for a specific client, but its instance variables can contain state across the handling of client messages, including an open database connection and an object reference to an EJB object. A client accesses a messagedriven bean by sending messages to the destination for which the bean is a message listener. 195. What is message producer? A. An object created by a JMS session that is used for sending messages to a destination. 196. What is mixed-content model? A. A DTD specification that defines an element as containing a mixture of text and one more other elements. The specification must start with #PCDATA, followed by diverse elements, and must end with the "zero-or-more" asterisk symbol (*). 197. What is method-binding expression? A. A JavaServer Faces EL expression that refers to a method of a backing bean. This method performs either event handling, validation, or navigation processing for the UI component whose tag uses the method-binding expression. 198. What is method permission? A. An authorization rule that determines who is permitted to execute one or more enterprise bean methods. 199. What is mutual authentication? A. An authentication mechanism employed by two parties for the purpose of proving each other's identity to one another. 200. What is namespace? A. A standard that lets you specify a unique label for the set of element names defined by a DTD. A document using that DTD can be included in any other document without having a conflict between element names. The elements defined in your DTD are then uniquely identified so that, for example, the parser

58

can tell when an element <name> should be interpreted according to your DTD rather than using the definition for an element <name> in a different DTD. 201. What is naming context? A. A set of associations between unique, atomic, people-friendly identifiers and objects. 202. What is naming environment? A. A mechanism that allows a component to be customized without the need to access or change the component's source code. A container implements the component's naming environment and provides it to the component as a JNDI naming context. Each component names and accesses its environment entries using the java:comp/env JNDI context. The environment entries are declaratively specified in the component's deployment descriptor. 203. What is normalization? A. The process of removing redundancy by modularizing, as with subroutines, and of removing superfluous differences by reducing them to a common denominator. For example, line endings from different systems are normalized by reducing them to a single new line, and multiple whitespace characters are normalized to one space. 204. What is North American Industry Classification System (NAICS)? A. A system for classifying business establishments based on the processes they use to produce goods or services. 205. What is notation? A. A mechanism for defining a data format for a non-XML document referenced as an unparsed entity. This is a holdover from SGML. A newer standard is to use MIME data types and namespaces to prevent naming conflicts. 206. What is OASIS? A. Organization for the Advancement of Structured Information Standards. A consortium that drives the development, convergence, and adoption of e-business standards. Its Web site is http://www.oasis-open.org/. The DTD repository it sponsors is at http://www.XML.org. 207. What is OMG? A. Object Management Group. A consortium that produces and maintains computer industry specifications for interoperable enterprise applications. Its Web site is http://www.omg.org/. 208. What is one-way messaging? A. A method of transmitting messages without having to block until a response is received.

59

209. What is ORB? A. Object request broker. A library that enables CORBA objects to locate and communicate with one another. 210. What is OS principal? A. A principal native to the operating system on which the J2EE platform is executing. 211. What is OTS? A. Object Transaction Service. A definition of the interfaces that permit CORBA objects to participate in transactions. 212. What is parameter entity? A. An entity that consists of DTD specifications, as distinct from a general entity. A parameter entity defined in the DTD can then be referenced at other points, thereby eliminating the need to recode the definition at each location it is used. 213. What is parsed entity? A. A general entity that contains XML and therefore is parsed when inserted into the XML document, as opposed to an unparsed entity. 214. What is parser? A. A module that reads in XML data from an input source and breaks it into chunks so that your program knows when it is working with a tag, an attribute, or element data. A nonvalidating parser ensures that the XML data is well formed but does not verify that it is valid. See also validating parser. 215. What is passivation? A. The process of transferring an enterprise bean from memory to secondary storage. See activation. 216. What is persistence? A. The protocol for transferring the state of an entity bean between its instance variables and an underlying database. 217. What is persistent field? A. A virtual field of an entity bean that has container-managed persistence; it is stored in a database. 218. What is POA? A. Portable Object Adapter. A CORBA standard for building server-side applications that are portable across heterogeneous ORBs.

60

219. What is point-to-point messaging system? A messaging system built on the concept of message queues. Each message is addressed to a specific queue; clients extract messages from the queues established to hold their messages. 220. What is primary key? A. An object that uniquely identifies an entity bean within a home. 221. What is principal? A. The identity assigned to a user as a result of authentication. 222. What is privilege? A. A security attribute that does not have the property of uniqueness and that can be shared by many principals. 223. What is processing instruction? A. Information contained in an XML structure that is intended to be interpreted by a specific application. 224.What is programmatic security? A. Security decisions that are made by security-aware applications. Programmatic security is useful when declarative security alone is not sufficient to express the security model of an application. 225. What is prolog? A. The part of an XML document that precedes the XML data. The prolog includes the declaration and an optional DTD. 226. What is public key certificate? A. Used in client-certificate authentication to enable the server, and optionally the client, to authenticate each other. The public key certificate is the digital equivalent of a passport. It is issued by a trusted organization, called a certificate authority, and provides identification for the bearer. 227. What is publish/subscribe messaging system? A. A messaging system in which clients address messages to a specific node in a content hierarchy, called a topic. Publishers and subscribers are generally anonymous and can dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a node's multiple publishers to its multiple subscribers. 228. What is query string? A. A component of an HTTP request URL that contains a set of parameters and values that affect the handling of the request.

61

229. What is queue? A. See point-to-point messaging system. 230. What is RAR? A. Resource Adapter Archive. A JAR archive that contains a resource adapter module. 231. What is RDF? A. Resource Description Framework. A standard for defining the kind of data that an XML file contains. Such information can help ensure semantic integrity-for example-by helping to make sure that a date is treated as a date rather than simply as text. 232. What is RDF schema? A. A standard for specifying consistency rules that apply to the specifications contained in an RDF. 233. What is realm? A. See security policy domain. Also, a string, passed as part of an HTTP request during basic authentication, that defines a protection space. The protected resources on a server can be partitioned into a set of protection spaces, each with its own authentication scheme or authorization database or both. In the J2EE server authentication service, a realm is a complete database of roles, users, and groups that identify valid users of a Web application or a set of Web applications. 234. What is reentrant entity bean? A. An entity bean that can handle multiple simultaneous, interleaved, or nested invocations that will not interfere with each other. 235. What is reference? A. See entity reference. 236. What is registry? A. An infrastructure that enables the building, deployment, and discovery of Web services. It is a neutral third party that facilitates dynamic and loosely coupled business-to-business (B2B) interactions. 237. What is registry provider? A. An implementation of a business registry that conforms to a specification for XML registries (for example, ebXML or UDDI). 238. What is relationship field? A. A virtual field of an entity bean having container-managed persistence; it identifies a related entity bean.

62

239. What is remote interface? A. One of two interfaces for an enterprise bean. The remote interface defines the business methods callable by a client. 240. What is remove method? A. Method defined in the home interface and invoked by a client to destroy an enterprise bean. 241. What is render kit? A. A set of renderers that render output to a particular client. The JavaServer Faces implementation provides a standard HTML render kit, which is composed of renderers that can render HMTL markup. 242. What is renderer? A. A Java class that can render the output for a set of JavaServer Faces UI components. 243. What is request-response messaging? A. A method of messaging that includes blocking until a response is received. 244. What is resource adapter? A. A system-level software driver that is used by an EJB container or an application client to connect to an enterprise information system. A resource adapter typically is specific to an enterprise information system. It is available as a library and is used within the address space of the server or client using it. A resource adapter plugs in to a container. The application components deployed on the container then use the client API (exposed by the adapter) or tool-generated high-level abstractions to access the underlying enterprise information system. The resource adapter and EJB container collaborate to provide the underlying mechanisms-transactions, security, and connection pooling-for connectivity to the enterprise information system. 255. What is resource adapter module? A. A deployable unit that contains all Java interfaces, classes, and native libraries, implementing a resource adapter along with the resource adapter deployment descriptor. 256. What is resource manager? A. Provides access to a set of shared resources. A resource manager participates in transactions that are externally controlled and coordinated by a transaction manager. A resource manager typically is in a different address space or on a different machine from the clients that access it. Note: An enterprise information system is referred to as a resource manager when it is mentioned in the context of resource and transaction management.

63

257. What is resource manager connection? A. An object that represents a session with a resource manager. 258. What is resource manager connection factory? A. An object used for creating a resource manager connection. 259. What is RMI? A. Remote Method Invocation. A technology that allows an object running in one Java virtual machine to invoke methods on an object running in a different Java virtual machine. 260. What is RMI-IIOP? A. A version of RMI implemented to use the CORBA IIOP protocol. RMI over IIOP provides interoperability with CORBA objects implemented in any language if all the remote interfaces are originally defined as RMI interfaces. 261. What is role (development)? A. The function performed by a party in the development and deployment phases of an application developed using J2EE technology. The roles are application component provider, application assembler, deployer, J2EE product provider, EJB container provider, EJB server provider, Web container provider, Web server provider, tool provider, and system administrator. 262. What is role mapping? A. The process of associating the groups or principals (or both), recognized by the container with security roles specified in the deployment descriptor. Security roles must be mapped by the deployer before a component is installed in the server. 263. What is role (security)? A. An abstract logical grouping of users that is defined by the application assembler. When an application is deployed, the roles are mapped to security identities, such as principals or groups, in the operational environment. In the J2EE server authentication service, a role is an abstract name for permission to access a particular set of resources. A role can be compared to a key that can open a lock. Many people might have a copy of the key; the lock doesn't care who you are, only that you have the right key. 264. What is rollback? A. The point in a transaction when all updates to any resources involved in the transaction are reversed. 265. What is root? A. The outermost element in an XML document. The element that contains all other elements.

64

266. What is SAX? A. Abbreviation of Simple API for XML. 267. What is Simple API for XML? A. An event-driven interface in which the parser invokes one of several methods supplied by the caller when a parsing event occurs. Events include recognizing an XML tag, finding an error, encountering a reference to an external entity, or processing a DTD specification. 268. What is schema? A. A database-inspired method for specifying constraints on XML documents using an XML-based language. Schemas address deficiencies in DTDs, such as the inability to put constraints on the kinds of data that can occur in a particular field. Because schemas are founded on XML, they are hierarchical. Thus it is easier to create an unambiguous specification, and it is possible to determine the scope over which a comment is meant to apply. 269. What is Secure Socket Layer (SSL)? A. A technology that allows Web browsers and Web servers to communicate over a secured connection. 270. What is security attributes? A. A set of properties associated with a principal. Security attributes can be associated with a principal by an authentication protocol or by a J2EE product provider or both. 271. What is security constraint? A. A declarative way to annotate the intended protection of Web content. A security constraint consists of a Web resource collection, an authorization constraint, and a user data constraint. 272. What is security context? A. An object that encapsulates the shared state information regarding security between two entities. 273. What is security permission? A. A mechanism defined by J2SE, and used by the J2EE platform to express the programming restrictions imposed on application component developers. 274. What is security permission set? A. The minimum set of security permissions that a J2EE product provider must provide for the execution of each component type. 275. What is security policy domain? A. A scope over which security policies are defined and enforced by a security administrator. A security policy domain has a collection of users (or principals),

65

uses a well-defined authentication protocol or protocols for authenticating users (or principals), and may have groups to simplify setting of security policies. 276. What is security role? A. See role (security). 277. What is security technology domain? A. A scope over which the same security mechanism is used to enforce a security policy. Multiple security policy domains can exist within a single technology domain. 278. What is security view? A. The set of security roles defined by the application assembler. 279. What is server certificate? A. Used with the HTTPS protocol to authenticate Web applications. The certificate can be self-signed or approved by a certificate authority (CA). The HTTPS service of the Sun Java System Application Server Platform Edition 8 will not run unless a server certificate has been installed. 280. What is server principal? A. The OS principal that the server is executing as. 281. What is service element? A. A representation of the combination of one or more Connector components that share a single engine component for processing incoming requests. 282. What is service endpoint interface? A. A Java interface that declares the methods that a client can invoke on a Web service. 283. What is servlet? A. A Java program that extends the functionality of a Web server, generating dynamic content and interacting with Web applications using a request-response paradigm. 284. What is servlet container? A. A container that provides the network services over which requests and responses are sent, decodes requests, and formats responses. All servlet containers must support HTTP as a protocol for requests and responses but can also support additional request-response protocols, such as HTTPS. 285. What is servlet container, distributed? A. A servlet container that can run a Web application that is tagged as distributable and that executes across multiple Java virtual machines running on the same host or on different hosts.

66

286. What is servlet context? A. An object that contains a servlet's view of the Web application within which the servlet is running. Using the context, a servlet can log events, obtain URL references to resources, and set and store attributes that other servlets in the context can use. 287. What is servlet mapping? A. Defines an association between a URL pattern and a servlet. The mapping is used to map requests to servlets. 288. What is session? A. An object used by a servlet to track a user's interaction with a Web application across multiple HTTP requests. 289. What is session bean? A. An enterprise bean that is created by a client and that usually exists only for the duration of a single client-server session. A session bean performs operations, such as calculations or database access, for the client. Although a session bean can be transactional, it is not recoverable should a system crash occur. Session bean objects either can be stateless or can maintain conversational state across methods and transactions. If a session bean maintains state, then the EJB container manages this state if the object must be removed from memory. However, the session bean object itself must manage its own persistent data. 290. What is SGML? A. Standard Generalized Markup Language. The parent of both HTML and XML. Although HTML shares SGML's propensity for embedding presentation information in the markup, XML is a standard that allows information content to be totally separated from the mechanisms for rendering that content. 291. What is SOAP? A. Simple Object Access Protocol. A lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. It defines, using XML technologies, an extensible messaging framework containing a message construct that can be exchanged over a variety of underlying protocols. 292. What is SOAP with Attachments API for Java (SAAJ)? A. The basic package for SOAP messaging, SAAJ contains the API for creating and populating a SOAP message. 293. What is SQL? A. Structured Query Language. The standardized relational database language for defining database objects and manipulating data.

67

294. What is SQL/J? A. A set of standards that includes specifications for embedding SQL statements in methods in the Java programming language and specifications for calling Java static methods as SQL stored procedures and user-defined functions. An SQL checker can detect errors in static SQL statements at program development time, rather than at execution time as with a JDBC driver. 295. What is SSL? A. Secure Socket Layer. A security protocol that provides privacy over the Internet. The protocol allows client-server applications to communicate in a way that cannot be eavesdropped upon or tampered with. Servers are always authenticated, and clients are optionally authenticated. 296. What is stateful session bean? A. A session bean with a conversational state. 297. What is stateless session bean? A. A session bean with no conversational state. All instances of a stateless session bean are identical. 298. What is system administrator? A. The person responsible for configuring and administering the enterprise's computers, networks, and software systems. 299. What is tag? A. In XML documents, a piece of text that describes a unit of data or an element. The tag is distinguishable as markup, as opposed to data, because it is surrounded by angle brackets (< and >). To treat such markup syntax as data, you use an entity reference or a CDATA section. 300. What is template? A. A set of formatting instructions that apply to the nodes selected by an XPath expression. 301. What is tool provider? A. An organization or software vendor that provides tools used for the development, packaging, and deployment of J2EE applications. 302. What is topic? A. See publish-subscribe messaging system. 303. What is transaction? A. An atomic unit of work that modifies data. A transaction encloses one or more program statements, all of which either complete or roll back. Transactions enable multiple users to access the same data concurrently.

68

304. What is transaction attribute? A. A value specified in an enterprise bean's deployment descriptor that is used by the EJB container to control the transaction scope when the enterprise bean's methods are invoked. A transaction attribute can have the following values: Required, RequiresNew, Supports, NotSupported, Mandatory, or Never. 305. What is transaction isolation level? A. The degree to which the intermediate state of the data being modified by a transaction is visible to other concurrent transactions and data being modified by other transactions is visible to it. 306. What is transaction manager? A. Provides the services and management functions required to support transaction demarcation, transactional resource management, synchronization, and transaction context propagation. 307. What is Unicode? A. A standard defined by the Unicode Consortium that uses a 16-bit code page that maps digits to characters in languages around the world. Because 16 bits covers 32,768 codes, Unicode is large enough to include all the world's languages, with the exception of ideographic languages that have a different character for every concept, such as Chinese. For more information, see http://www.unicode.org/. 308. What is Universal Description, Discovery and Integration (UDDI) project? A. An industry initiative to create a platform-independent, open framework for describing services, discovering businesses, and integrating business services using the Internet, as well as a registry. It is being developed by a vendor consortium. 309. What is Universal Standard Products and Services Classification (UNSPSC)? A. A schema that classifies and identifies commodities. It is used in sell-side and buy-side catalogs and as a standardized account code in analyzing expenditure. 310. What is unparsed entity? A. A general entity that contains something other than XML. By its nature, an unparsed entity contains binary data. 311. What is URI? A. Uniform resource identifier. A globally unique identifier for an abstract or physical resource. A URL is a kind of URI that specifies the retrieval protocol (http or https for Web applications) and physical location of a resource (host name and host-relative path). A URN is another type of URI.

69

312. What is URL? A. Uniform resource locator. A standard for writing a textual reference to an arbitrary piece of data in the World Wide Web. A URL looks like this: protocol://host/localinfo where protocol specifies a protocol for fetching the object (such as http or ftp), host specifies the Internet name of the targeted host, and localinfo is a string (often a file name) passed to the protocol handler on the remote host. 313. What is URL path? A. The part of a URL passed by an HTTP request to invoke a servlet. A URL path consists of the context path + servlet path + path info, where Context path is the path prefix associated with a servlet context of which the servlet is a part. If this context is the default context rooted at the base of the Web server's URL namespace, the path prefix will be an empty string. Otherwise, the path prefix starts with a / character but does not end with a / character. Servlet path is the path section that directly corresponds to the mapping that activated this request. This path starts with a / character. Path info is the part of the request path that is not part of the context path or the servlet path. 314. What is URN? A. Uniform resource name. A unique identifier that identifies an entity but doesn't tell where it is located. A system can use a URN to look up an entity locally before trying to find it on the Web. It also allows the Web location to change, while still allowing the entity to be found. 315. What is user data constraint? A. Indicates how data between a client and a Web container should be protected. The protection can be the prevention of tampering with the data or prevention of eavesdropping on the data. 316. What is user (security)? A. An individual (or application program) identity that has been authenticated. A user can have a set of roles associated with that identity, which entitles the user to access all resources protected by those roles. 317. What is valid? A. A valid XML document, in addition to being well formed, conforms to all the constraints imposed by a DTD. It does not contain any tags that are not permitted by the DTD, and the order of the tags conforms to the DTD's specifications. 318. What is validating parser? A. A parser that ensures that an XML document is valid in addition to being well formed. See also parser.

70

319. What is value-binding expression? A. A JavaServer Faces EL expression that refers to a property of a backing bean. A component tag uses this expression to bind the associated component's value or the component instance to the bean property. If the component tag refers to the property via its value attribute, then the component's value is bound to the property. If the component tag refers to the property via its binding attribute then the component itself is bound to the property. 320. What is virtual host? A. Multiple hosts plus domain names mapped to a single IP address. 321. What is W3C? World Wide Web Consortium. The international body that governs Internet standards. Its Web site is http://www.w3.org/. 322. What is WAR file? A. Web application archive file. A JAR archive that contains a Web module. 323. What is warning? A. A SAX parser warning is generated when the document's DTD contains duplicate definitions and in similar situations that are not necessarily an error but which the document author might like to know about, because they could be. See also fatal error, error. 324. What is Web application? A. An application written for the Internet, including those built with Java technologies such as JavaServer Pages and servlets, as well as those built with non-Java technologies such as CGI and Perl. 325. What is Web application, distributable? A. A Web application that uses J2EE technology written so that it can be deployed in a Web container distributed across multiple Java virtual machines running on the same host or different hosts. The deployment descriptor for such an application uses the distributable element. 326. What is Web component? A. A component that provides services in response to requests; either a servlet or a JSP page. 327. What is Web container? A. A container that implements the Web component contract of the J2EE architecture. This contract specifies a runtime environment for Web components that includes security, concurrency, life-cycle management, transaction, deployment, and other services. A Web container provides the same services as a JSP container as well as a federated view of the J2EE platform APIs. A Web container is provided by a Web or J2EE server.

71

328. What is Web container, distributed? A. A Web container that can run a Web application that is tagged as distributable and that executes across multiple Java virtual machines running on the same host or on different hosts. 329. What is Web container provider? A. A vendor that supplies a Web container. 330. What is Web module? A. A deployable unit that consists of one or more Web components, other resources, and a Web application deployment descriptor contained in a hierarchy of directories and files in a standard Web application format. 331. What is Web resource? A. A static or dynamic object contained in a Web application that can be referenced by a URL. 332. What is Web resource collection? A. A list of URL patterns and HTTP methods that describe a set of Web resources to be protected. 333. What is Web server? A. Software that provides services to access the Internet, an intranet, or an extranet. A Web server hosts Web sites, provides support for HTTP and other protocols, and executes server-side programs (such as CGI scripts or servlets) that perform certain functions. In the J2EE architecture, a Web server provides services to a Web container. For example, a Web container typically relies on a Web server to provide HTTP message handling. The J2EE architecture assumes that a Web container is hosted by a Web server from the same vendor, so it does not specify the contract between these two entities. A Web server can host one or more Web containers. 334. What is Web server provider? A. A vendor that supplies a Web server. 335. What is Web service? A. An application that exists in a distributed environment, such as the Internet. A Web service accepts a request, performs its function based on the request, and returns a response. The request and the response can be part of the same operation, or they can occur separately, in which case the consumer does not need to wait for a response. Both the request and the response usually take the form of XML, a portable data-interchange format, and are delivered over a wire protocol, such as HTTP.

72

336. What is well-formed? A. An XML document that is syntactically correct. It does not have any angle brackets that are not part of tags, all tags have an ending tag or are themselves self-ending, and all tags are fully nested. Knowing that a document is well formed makes it possible to process it. However, a well-formed document may not be valid. To determine that, you need a validating parser and a DTD. 337. What is Xalan? A. An interpreting version of XSLT. 338. What is XHTML? A. An XML look-alike for HTML defined by one of several XHTML DTDs. To use XHTML for everything would of course defeat the purpose of XML, because the idea of XML is to identify information content, and not just to tell how to display it. You can reference it in a DTD, which allows you to say, for example, that the text in an element can contain <em> and <b> tags rather than being limited to plain text. 339. What is XLink? A. The part of the XLL specification that is concerned with specifying links between documents. 340. What is XLL? A. The XML Link Language specification, consisting of XLink and XPointer.

73

INTERVIEW QUESTIONS IN XML


1. What is XML? A. Extensible Markup Language. A markup language that allows you to define the tags (markup) needed to identify the content, data, and text in XML documents. It differs from HTML, the markup language most often used to present information on the Internet. HTML has fixed tags that deal mainly with style or presentation. An XML document must undergo a transformation into a language with style tags under the control of a style sheet before it can be presented by a browser or other presentation mechanism. Two types of style sheets used with XML are CSS and XSL. Typically, XML is transformed into HTML for presentation. Although tags can be defined as needed in the generation of an XML document, a document type definition (DTD) can be used to define the elements allowed in a particular type of document. A document can be compared by using the rules in the DTD to determine its validity and to locate particular elements in the document. A Web services application's J2EE deployment descriptors are expressed in XML with schemas defining allowed elements. Programs for processing XML documents use SAX or DOM APIs. 2. What is XML registry? A. See registry. 3. What is XML Schema? A. The W3C specification for defining the structure, content, and semantics of XML documents. 4. What is XPath? A. An addressing mechanism for identifying the parts of an XML document. 5. What is XPointer? A. The part of the XLL specification that is concerned with identifying sections of documents so that they can be referenced in links or included in other documents. 6. What is XSL? A. Extensible Stylesheet Language. A standard that lets you do the following: Specify an addressing mechanism, so that you can identify the parts of an XML document that a transformation applies to (XPath). Specify tag conversions, so that you can convert XML data into different formats (XSLT). Specify display characteristics, such page sizes, margins, and font heights and widths, as well as the flow objects on each page. Information fills in one area of a page and then automatically flows to the next object when that area fills up. That allows you to wrap text around pictures, for example, or to continue a newsletter article on a different page (XSL-FO).

74

7. What is XSL-FO? A. A subcomponent of XSL used for describing font sizes, page layouts, and how information flows from one page to another. 8. What is XSLT? A. XSL Transformations. An XML document that controls the transformation of an XML document into another XML document or HTML. The target document often has presentation-related tags dictating how it will be rendered by a browser or other presentation mechanism. XSLT was formerly a part of XSL, which also included a tag language of style flow objects. 9. What is XSLTC? A. A compiling version of XSLT

75

INTERVIEW QUESTIONS IN J2ME


1. What is 3G? A. Third generation (3G) wireless networks will offer faster data transfer rates than current networks. The first generation of wireless (1G) was analog cellular. The second generation (2G) is digital cellular, featuring integrated voice and data communications. So-called 2.5G networks offer incremental speed increases. 3G networks will offer dramatically improved data transfer rates, enabling new wireless applications such as streaming media. 2. What is 3GPP? A. The 3rd Generation Partnership Project (3GPP) is a global collaboration between 6 partners: ARIB, CWTS, ETSI, T1, TTA, and TTC. The group aims to develop a globally accepted 3rd-generation mobile system based on GSM. 3. What is 802.1? A. 802.11 is a group of specifications for wireless networks developed by the Institute of Electrical and Electronics Engineers (IEEE). 802.11 uses the Ethernet protocol and CSMA/CA (carrier sense multiple access with collision avoidance) for path sharing. 4. What is API? A. An Application Programming Interface (API) is a set of classes that you can use in your own application. Sometimes called libraries or modules, APIs enable you to write an application without reinventing common pieces of code. For example, a networking API is something your application can use to make network connections, without your ever having to understand the underlying code. 5. What is AMPS? A. Advanced Mobile Phone Service (AMPS) is a first-generation analog, circuitswitched cellular phone network. Originally operating in the 800 MHz band, service was later expanded to include transmissions in the 1900 MHz band, the VHF range in which most wireless carriers operate. Because AMPS uses analog signals, it cannot transmit digital signals and cannot transport data packets without assistance from newer technologies such as TDMA and CDMA. 6. What is CDC? A. The Connected Device Configuration (CDC) is a specification for a J2ME configuration. Conceptually, CDC deals with devices with more memory and processing power than CLDC; it is for devices with an always-on network connection and a minimum of 2 MB of memory available for the Java system. 7. What is CDMA? A. Code-Division Multiple Access (CDMA) is a cellular technology widely used in North America. There are currently three CDMA standards: CDMA One, CDMA2000 and W-CDMA. CDMA technology uses UHF 800Mhz-1.9Ghz frequencies and bandwidth ranges from 115Kbs to 2Mbps.

76

8. What is CDMA One? A. Also know as IS-95, CDMAOne is a 2nd generation wireless technology. Supports speeds from 14.4Kbps to 115K bps. 9. What is CDMA2000? A. Also known as IS-136, CDMA2000 is a 3rd generation wireless technology. Supports speeds ranging from 144Kbps to 2Mbps. 10. What is CDPD? A. Developed by Nortel Networks, Cellular Digital Packet Data (CDPD) is an open standard for supporting wireless Internet access from cellular devices. CDPD also supports Multicast, which allows content providers to efficiently broadcast information to many devices at the same time. 11. What is Chtml? A. Compact HTML (cHTML) is a subset of HTML which is designed for small devices. The major features of HTML that are excluded from cHTML are: JPEG image, Table, Image map, Multiple character fonts and styles, Background color and image, Frame and Style sheet. 12. What is CLDC? A. The Connected, Limited Device Configuration (CLDC) is a specification for a J2ME configuration. The CLDC is for devices with less than 512 KB or RAM available for the Java system and an intermittent (limited) network connection. It specifies a stripped-down Java virtual machine1 called the KVM as well as several APIs for fundamental application services. Three packages are minimalist versions of the J2SE java.lang, java.io, and java.util packages. A fourth package, javax.microedition.io, implements the Generic Connection Framework, a generalized API for making network connections. 13. What is configuration? A. In J2ME, a configuration defines the minimum Java runtime environment for a family of devices: the combination of a Java virtual machine (either the standard J2SE virtual machine or a much more limited version called the CLDC VM) and a core set of APIs. CDC and CLDC are configurations. See also profile, optional package. 14. What is CVM? A. The Compact Virtual Machine (CVM) is an optimized Java virtual machine1 (JVM) that is used by the CDC. 15. What is Deck? A. A deck is a collection of one or more WML cards that can be downloaded, to a mobile phone, as a single entity. 16. What is EDGE?

77

A. Enhanced Data GSM Environment (EDGE) is a new, faster version of GSM. EDGE is designed to support transfer rates up to 384Kbps and enable the delivery of video and other high-bandwidth applications. EDGE is the result of a joint effort between TDMA operators, vendors and carriers and the GSM Alliance. 17. What is ETSI? A. The European Telecommunications Standards Institute (ETSI) is a non-profit organization that establishes telecommunications standards for Europe. 18. What is FDMA? A. Frequency-division multiple-access (FDMA) is a mechanism for sharing a radio frequency band among multiple users by dividing it into a number of smaller bands. 19. What is Foundation Profile? A. The Foundation Profile is a J2ME profile specification that builds on CDC. It adds additional classes and interfaces to the CDC APIs but does not go so far as to specify user interface APIs, persistent storage, or application life cycle. Other J2ME profiles build on the CDC/Foundation combination: for example, the Personal Profile and the RMI Profile both build on the Foundation Profile. 20. What is Generic Connection Framework? A. The Generic Connection Framework (GCF) makes it easy for wireless devices to make network connections. It is part of CLDC and CDC and resides in the javax.microedition.io package. 21 What is GPRS? A. The General Packet Radio System (GPRS) is the next generation of GSM. It will be the basis of 3G networks in Europe and elsewhere. 22. What is GSM? A. The Global System for Mobile Communications (GSM) is a wireless network system that is widely used in Europe, Asia, and Australia. GSM is used at three different frequencies: GSM900 and GSM1800 are used in Europe, Asia, and Australia, while GSM1900 is deployed in North America and other parts of the world. 23. What is HLR? A. The Home Location Register (HLR) is a database for permanent storage of subscriber data and service profiles. 24. What is HTTPS? A. Hyper Text Transfer Protocol Secure sockets (HTTPS) is a protocol for transmission of encrypted hypertext over Secure Sockets Layer. 25. What is i-appli?

78

A. Sometimes called "Java for i-mode", i-appli is a Java environment based on CLDC. It is used on handsets in NTT DoCoMo's i-mode service. While i-appli is similar to MIDP, it was developed before the MIDP specification was finished and the two APIs are incompatible. 26. What is IDE? A. An Integrated Development Environment (IDE) provides a programming environment as a single application. IDEs typically bundle a compiler, debugger, and GUI builder tog ether. Forte for Java is Sun's Java IDE. 27. What is Iden? a. The Integrated Dispatch Enhanced Network (iDEN) is a wireless network system developed by Motorola. Various carriers support iDEN networks around the world: Nextel is one of the largest carriers, with networks covering North and South America. 28. What is i-mode? A. A standard used by Japanese wireless devices to access cHTML (compact HTML) Web sites and display animated GIFs and other multimedia content. 29. What is J2ME? A. Java 2, Micro Edition is a group of specifications and technologies that pertain to Java on small devices. The J2ME moniker covers a wide range of devices, from pagers and mobile telephones through set-top boxes and car navigation systems. The J2ME world is divided into configurations and profiles, specifications that describe a Java environment for a specific class of device. 30. What is J2ME WTK? A. The J2ME Wireless Toolkit is a set of tools that provides developers with an emulation environment, documentation and examples for developing Java applications for small devices. The J2ME WTK is based on the Connected Limited Device Configuration (CLDC) and Mobile Information Device Profile (MIDP) reference implementations, and can be tightly integrated with Forte for Java 31. What is Java Card? A. The Java Card specification allows Java technology to run on smart cards and other small devices. The Java Card API is compatible with formal international standards, such as, ISO7816, and industry-specific standards, such as, Europay/Master Card/Visa (EMV). 32. What is JavaHQ? A. JavaHQ is the Java platform control center on your Palm OS device.

79

33. What is JCP? A. The Java Community Process (JCP) an open organization of international Java developers and licensees who develop and revise Java technology specifications, reference implementations, and technology compatibility kits through a formal process. 34. What is JDBC for CDC/FP? A. The JDBC Optional Package for CDC/Foundation Profile (JDBCOP for CDC/FP) is an API that enables mobile Java applications to communicate with relational database servers using a subset of J2SE's Java Database Connectivity. This optional package is a strict subset of JDBC 3.0 that excludes some of JDBC's advanced and server-oriented features, such as pooled connections and array types. It's meant for use with the Foundation Profile or its supersets. 35. What is JSR? A. Java Specification Request (JSR) is the actual description of proposed and final specifications for the Java platform. JSRs are reviewed by the JCP and the public before a final release of a specification is made. 36. What is KittyHawk? A. KittyHawk is a set of APIs used by LG Telecom on its IBook and p520 devices. KittyHawk is based on CLDC. It is conceptually similar to MIDP but the two APIs are incompatible. 37. What is KJava? A. KJava is an outdated term for J2ME. It comes from an early package of Java software for PalmOS, released at the 2000 JavaOne show. The classes for that release were packaged in the com.sun.kjava package. 38. What is Ksoap? A. kSOAP is a SOAP API suitable for the J2ME, based on kXML. 39. What is Kxml? A. The kXML project provides a small footprint XML parser that can be used with J2ME. 40. What is KVM? A. The KVM is a compact Java virtual machine (JVM) that is designed for small devices. It supports a subset of the features of the JVM. For example, the KVM does not support floating-point operations and object finalization. The CLDC specifies use of the KVM. According to folklore, the 'K' in KVM stands for kilobyte, signifying that the KVM runs in kilobytes of memory as opposed to megabytes.

80

41. What is LAN? A Local Area Network (LAN) is a group of devices connected with various communications technologies in a small geographic area. Ethernet is the most widely-used LAN technology. Communication on a LAN can either be with Peerto-Peer devices or Client-Server devices. 42. What is LCDUI? A. LCDUI is a shorthand way of referring to the MIDP user interface APIs, contained in the javax.microedition.lcdui package. Strictly speaking, LCDUI stands for Liquid Crystal Display User Interface. It's a user interface toolkit for small device screens which are commonly LCD screens. 43. What is MExE? A. The Mobile Execution Environment (MExE) is a specification created by the 3GPP which details an applicatio n environment for next generation mobile devices. MExE consists of a variety of technologies including WAP, J2ME, CLDC and MIDP. 44. What is MIDlet? A. A MIDlet is an application written for MIDP. MIDlet applications are subclasses of the javax.microedition.midlet.MIDlet class that is defined by MIDP. What is MIDlet suite MIDlets are packaged and distributed as MIDlet suites. A MIDlet suite can contain one or more MIDlets. The MIDlet suite consists of two files, an application descriptor file with a .jad extension and an archive file with a .jar file. The descriptor lists the archive file name, the names and class names for each MIDlet in the suite, and other information. The archive file contains the MIDlet classes and resource files. 45. What is MIDP? A. The Mobile Information Device Profile (MIDP) is a specification for a J2ME profile. It is layered on top of CLDC and adds APIs for application life cycle, user interface, networking, and persistent storage. 46. What is MIDP-NG? A. The Next Generation MIDP specification is currently under development by the Java Community Process. Planned improvements include XML parsing and cryptographic support. 47. What is Mobitex? A. Mobitex is a packet-switched, narrowband PCS network, designed for widearea wireless data communications. It was developed in 1984 by Eritel, an Ericsson subsidiary, a nd there are now over 30 Mobitex networks in operation worldwide.

81

48. What is Modulation? A. Modulation is the method by which a high-frequency digital signal is grafted onto a lower-frequency analog wave, so that digital packets are able to ride piggyback on the analog airwave. 49. What is MSC? A. A Mobile Switching Center (MSC) is a unit within a cellular phone network that automatically coordinates and switches calls in a given cell. It monitors each caller's signal strength, and when a signal begins to fade, it hands off the call to another MSC that's better positioned to manage the call. 50. What is Obfuscation? A. Obfuscation is a technique used to complicate code. Obfuscation makes code harder to understand when it is de-compiled, but it typically has no affect on the functionality of the code. Obfuscation programs can be used to protect Java programs by making them harder to reverse-engineer. 51. What is optional package? A. An optional package is a set of J2ME APIs providing services in a specific area, such as database access or multimedia. Unlike a profile, it does not define a complete application environment, but rather is used in conjunction with a configuration or a profile. It extends the runtime environment to support device capabilities that are not universal enough to be defined as part of a profile or that need to be shared by different profiles. J2ME RMI and the Mobile Media RMI are examples of optional packages. 52. What is OTA? A. Over The Air (OTA) refers to any wireless networking technology. 53. What is PCS? A. Personal Communications Service (PCS) is a suite of second-generation, digitally modulated mobile-communications interfaces that includes TDMA, CDMA, and GSM. PCS serves as an umbrella term for second-generation wireless technologies operating in the 1900MHz range 54. What is PDAP? A. The Personal Digital Assistant Profile (PDAP) is a J2ME profile specification designed for small platforms such as PalmOS devices. You can think of PDAs as being larger than mobile phones but smaller than set-top boxes. PDAP is built on top of CLDC and will specify user interface and persistent storage APIs. PDAP is currently being developed using the Java Community Process (JCP). 55. What is PDC? A. Personal Digital Cellular (PDC) is a Japanese standard for wireless

82

communications. 56. What is PDCP? A. Parallel and Distributed Computing Practices (PDCP) are often used to describe computer systems that are spread over many devices on a network (wired or wireless) where many nodes process data simultaneously. 57. What is Personal Profile? A. The Personal Profile is a J2ME profile specification. Layered on the foundation Profile and CDC, the Personal Profile will be the next generation of PersonalJava technology. The specification is currently in development under the Java Community Process (JCP). 58. What is Personal Java? A. Personal Java is a Java environment based on the Java virtual machine1 (JVM) and a set of APIs similar to a JDK 1.1 environment. It includes the Touchable Look and Feel (also called Truffle), a graphic toolkit that is optimized for consumer devices with a touch sensitive screen. PersonalJava will be included in J2ME in the upcoming Personal Profile, which is built on CDC. 59. What is PNG? A. Portable Network Graphics (PNG) is an image format offering lossless compression and storage flexibility. The MIDP specification requires implementations to recognize certain types of PNG images. 60. What is POSE? A. Palm OS Emulator (POSE). 61. What is PRC? A. Palm Resource Code (PRC) is the file format for Palm OS applications. 62. What is preverification? A. Due to memory and processing power available on a device, the verification process of classes are split into two processes. The first process is the preverification which is off-device and done using the preverify tool. The second process is verification which is done on-device. 63. What is profile? A. A profile is a set of APIs added to a configuration to support specific uses of a mobile device. Along with its underlying configuration, a profile defines a complete, and usually self-contained, general-purpose application environment. Profiles often, but not always, define APIs for user interface and persistence; the MIDP profile, based on the CLDC configuration, fits this pattern. Profiles may be supersets or subsets of other profiles; the Personal Basis Profile is a subset of the Personal Profile and a superset of the Foundation Profile. See also configuration, optional package.

83

64. What is Provisioning? A. In telecommunications terms, provisioning means to provide telecommunications services to a user. This includes providing all necessary hardware, software, and wiring or transmission devices. 65. What is PSTN? A. The public service telephone network (PSTN) is the traditional, land-line based system for exchanging phone calls. 66. What is RMI? A. Remote method invocation (RMI) is a feature of J2SE that enables Java objects running in one virtual machine to invoke methods of Java objects running in another virtual machine, seamlessly. 67. What is RMI OP? A. The RMI Optional Package (RMI OP) is a subset of J2SE 1.3's RMI functionality used in CDC-based profiles that incorporate the Foundation Profile, such as the Personal Basis Profile and the Personal Profile. The RMIOP cannot be used with CLDC-based profiles because they lack object serialization and other important features found only in CDC-based profiles. RMIOP supports most of the J2SE RMI functionality, including the Java Remote Method Protocol, marshalled objects, distributed garbage collection, registry-based object lookup, and network class loading, but not HTTP tunneling or the Java 1.1 stub protocol. 68. What is RMI Profile? A. The RMI Profile is a J2ME profile specification designed to support Java's Remote Method Invocation (RMI) distributed object system. Devices implementing the RMI Profile will be able to interoperate via RMI with other Java devices, including Java 2, Standard Edition. The RMI Profile is based on the Foundation Profile, which in turn is based on CDC. 69. What is RMS? A. The Record Management System (RMS) is a simple record-oriented database that allows a MIDlet to persistently store information and retrieve it later. Different MIDlets can also use the RMS to share data. 70. What is SDK? A. A Software Development Kit (SDK) is a set of tools used to develop applications for a particular platform. An SDK typically contains a compiler, linker, and debugger. It may also contain libraries and documentation for APIs.

84

71. What is SIM? A. A Subscriber Identity Module (SIM) is a stripped-down smart card containing information about the identity of a cell-phone subscriber, and subscriber authentication and service information. Because the SIM uniquely identifies the subscriber and is portable among handsets, the user can move it from one kind of phone to another, facilitating international roaming. 72. What is SMS? A. Short Message Service (SMS) is a point-to-point service similar to paging for sending text messages of up to 160 characters to mobile phones. 73. What is SOAP? A. The Simple Object Access Protocol (SOAP) is an XML- based protocol that allows objects of any type to communicated in a distributed environment. SOAP is used in developing Web Services. 74. What is SSL? A. Secure Sockets Layer (SSL) is a socket protocol that encrypts data sent over the network and provides authentication for the socket endpoints. 75. What is T9? A. T9 is a text input method for mobile phones and other small devices. It Replaces the "multi-tap" input method by guessing the word that you are trying to enter. T9 may be embedded in a device by the manufacturer. Note that even if the device supports T9, the Java implementation may or may not use it. Check your documentation for details. 76. What is TDMA? A. Time Division Multiple Access (TDMA) is a second-generation modulation standard using bandwidth allocated in the 800 MHz, 900 MHz, and 1900MHz ranges. 77. What is Telematics? A. Telematics is a location-based service that routes event notification and control data over wireless networks to and from mobile devices installed in automobiles. Telematics makes use of GPS technology to track vehicle latitude and longitude, and displays maps in LED consoles mounted in dashboards. It connects to remote processing centers that turn provide server-side Internet and voice services, as well as access to database resources. 78. What is Tomcat? A. Tomcat is a reference implementation of the Java servlet and JavaServer Pages (JSP) specifications. It is intended as a platform for developing and testing

85

servlets. 79. What is UDDI? A. Universal Description, Discovery, and Integration (UDDI) is an XML-based standard for describing, publishing, and finding Web services. UDDI is a specification for a distributed registry of Web services. 80. What is UMTS? A. Developed by Nortel Networks, Universal Mobile Telecommunications Service (UMTS) is a standard that will provide cellular users a consistent set of technologies no matter where they are located worldwide. UMTS utilizes WCDMA technology. 81. What is VLR? A. The Visitor Location Register (VLR) is a database that contains temporary information about subscribers. 82. What is WAE? A. The Wireless Application Environment (WAE) provides a application framework for small devices. WAE leverages other technologies such as WAP, WTP, and WSP. 83. What is WAP? A. Wireless Application Protocol (WAP) is a protocol for transmitting data between servers and clients (usually small wireless devices like mobile phones). WAP is analogous to HTTP in the World Wide Web. Many mobile phones include WAP browser software to allow users access to Internet WAP sites. 84. What is WAP Gateway? A WAP Gateway acts as a bridge allowing WAP devices to communicate with other networks (namely the Internet). 85. What is W-CDMA? A. Wideband Code-Division Multiple Access (W-CDMA), also known as IMT2000, is a 3rd generation wireless technology. Supports speeds up to 384Kbps on a wide-area network, or 2Mbps locally. 86. What is WDP? A. Wireless Datagram Protocol (WDP) works as the transport layer of WAP. WDP processes datagrams from upper layers to formats required by different physical datapaths, bearers, that may be for example GSM SMS or CDMA Packet Data. WDP is adapted to the bearers available in the device so upper layers don't need to care about the physical level. 87. What is WMA? A. The Wireless Messaging API (WMA) is a set of classes for sending and

86

receiving Short Message Service messages. See also SMS. 88. What is WML? A. The Wireless Markup Language (WML) is a simple language used to create applications for small wireless devices like mobile phones. WML is analogous to HTML in the World Wide Web. 89. What is WMLScript? A. WMLScript is a subset of the JavaScript scripting language designed as part of the WAP standard to provide a convenient mechanism to access mobile phone's peripheral functions. 90. What is WSP? A. Wireless Session Protocol (WSP) implements session services of WAP. Sessions can be connection-oriented and connectionless and they may be suspended and resumed at will. 91. What is WTLS? A. Wireless Transport Layer Security protocal (WTLS) does all cryptography oriented features of WAP. WTLS handles encryption/decryption, user authentication and data integrity. WTLS is based on the fixed network Transport Layer Security protocal (TLS), formerly known as Secure Sockets Layer (SSL). 92.What is WTP? A. Wireless Transaction Protocol (WTP) is WAP's transaction protocol that works between the session protocol WSP and security protocol WTLS. WTP chops data packets into lower level datagrams and concatenates received datagrams into useful data. WTP also keeps track of received and sent packets and does retransmissions and acknowledgment sending when needed.

87

You might also like