-
What is the relationship between a method's throws clause and the exceptionsthat can be thrown during the method's execution
A method's throws clause must declare any checked exceptions that are not caught withinthe body of the method.
-
What is the difference between the JDK 1.02 event model and the event-delegationmodel introduced with JDK 1.1
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 particularevent, the event is inherited by (or bubbled up to) the component's container. Thecontainer then either handles the event or it is bubbled up to its container and so on, untilthe highest-level container has been tried..In the event-delegation...
-
What is your platform's default character encoding
If you are running Java on English Windows platforms, it is probably Cp1252. If you arerunning Java on English Solaris platforms, it is most likely 8859_1..
-
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 thrownby the overridden method.
-
What is numeric promotion
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 convertedto long values, if necessary. The long and float values are converted to double values, asrequired.
-
What is a Java package and how is it used
A Java package is a naming context for classes and interfaces. A package is used tocreate a separate name space for groups of classes and interfaces. Packages are also usedto organize related classes and interfaces into a single API unit and to controlaccessibility to these classes and interfaces.
-
What are synchronized methods and synchronized statements
Synchronized methods are methods that are used to control access to an object. A threadonly executes a synchronized method after it has acquired the lock for the method'sobject or class. Synchronized statements are similar to synchronized methods. Asynchronized statement can only be executed after a thread has acquired the lock for theobject or class referenced in the synchronized statement.
-
What are the two basic ways in which classes that can be run as threads may bedefined
A thread class may be declared as a subclass of Thread, or it may implement theRunnable interface.
-
What are the problems faced by Java programmers who don't use layout managers
Without layout managers, Java programmers are faced with determining how their GUIwill be displayed across multiple windowing systems and finding a common sizing andpositioning that will work within the constraints imposed by each windowing system.
-
-
-
-
-
-
-
-
-
-
-
Java Interview Questions
Ans