Search your topic in Java2share
Home > FAQs
eXTReMe Tracker


CoreJava FAQs


Untitled Document

Q197. What happens if a try-catch-finally statement doesnot have a catch clause to handle an exception that is
thrown within the body of the try statement?

The exception propagates up to the next higher level try-catch statement (if any) or results in the program's termination.

Q198. 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 converted to long values, if necessary. The long and float values are converted to double values, as required.

Q199. What is the difference between a Scrollbar and a ScrollPane?
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.

Q200. What is the difference between a public and a nonpublic class?
A public class may be accessed outside of its package. A non-public class may not be accessed outside of its package.