Monday, 26 May 2014

PART 2.7

71. What restrictions are placed on method overloading?
Two methods may not have the same name and argument list but different return types.

72. 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.

73. What is casting?

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.

74. Name Container classes.

Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane

75. What class allows you to read objects directly from a stream?

The ObjectInputStream class supports the reading of objects from input streams.

76. How are this() and super() used with constructors?

this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.

77. How is it possible for two String objects with identical values not to be equal under the == operator?

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.

78. What an I/O filter?

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.

79. What is the Set interface?

The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.

80. What is the List interface?

The List interface provides support for ordered collections of objects.

0 comments: