Question: What is clipping?
Answer: Clipping is the process of confining paint operations to a limited area or shape.
Question: What is a native method?
Answer: A native method is a method that is implemented in a language other than Java.
Question: Can a for statement loop indefinitely?
Answer: Yes, a for statement can loop indefinitely. For example, consider the following: for(;;) ;
Question: What are order of precedence and associativity, and how are they used?
Answer: Order of precedence determines the order in which operators are evaluated in expressions. Associatity determines whether an expression is evaluated left-to-right or right-to-left
Question: When a thread blocks on I/O, what state does it enter?
Answer: A thread enters the waiting state when it blocks on I/O.
Question: To what value is a variable of the String type automatically initialized?
Answer: The default value of an String type is null.
Question: What is the catch or declare rule for method declarations?
Answer: 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.
Question: What is the difference between a MenuItem and a CheckboxMenuItem?
Answer: The CheckboxMenuItem class extends the MenuItem class to support a menu item that may be checked or unchecked.
Question: What is a task's priority and how is it used in scheduling?
Answer: 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.
Question: What class is the top of the AWT event hierarchy?
Answer: The java.awt.AWTEvent class is the highest-level class in the AWT event-class hierarchy.
Question: When a thread is created and started, what is its initial state?
Answer: A thread is in the ready state after it has been created and started.
Question: Can an anonymous class be declared as implementing an interface and extending a class?
Answer: An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
Question: What is the range of the short type?
Answer: The range of the short type is -(2^15) to 2^15 - 1.
Question: What is the range of the char type?
Answer: The range of the char type is 0 to 2^16 - 1.
Question: In which package are most of the AWT events that support the event-delegation model defined?
Answer: 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.
Question: What is the immediate superclass of Menu?
Question: What is the purpose of finalization?
Answer: The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
Question: Which class is the immediate superclass of the MenuComponent class.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Ask Questions? Discuss: Core Java Interview Question, Interview Question
Post your Comment