Core Java Interview Question, Interview Question

This page discusses - Core Java Interview Question, Interview Question

Core Java Interview Question, Interview Question

Core Java Interview Question Page 14

     

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? 0

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?

Answer: MenuItem 1

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

Answer: Object

Tutorials

  1. Core Java Interview Question Page 1
  2. Core Java Interview Question Page 3
  3. Core Java Interview Question Page 8
  4. Core Java Interview Question, Interview Question
  5. Core Java Interview Question, Interview Question
  6. Core Java Interview Question, Interview Question
  7. Core Java Interview Question, Interview Question
  8. Core Java Interview Question, Interview Question
  9. Core Java Interview Question, Interview Question
  10. Core Java Interview questions and answers
  11. Core Java Interview Question, Interview Question
  12. Core Java Interview Question, Interview Question
  13. Core Java Interview Question, Interview Question
  14. Core Java Interview Question, Interview Question
  15. Core Java Interview Question, Interview Question
  16. Core Java Interview Question, Interview Question
  17. Core Java Interview Question, Interview Question
  18. Core Java Interview Question, Interview Question
  19. Core Java Interview Question, Interview Question
  20. Core Java Interview Question, Interview Question
  21. Core Java Interview Question, Interview Question
  22. Core Java Interview Question, Interview Question
  23. Core Java Interview Question, Interview Question
  24. Core Java Interview Question, Interview Question
  25. Core Java Interview Question, Interview Question
  26. Core Java Interview Question, Interview Question
  27. Core Java Interview Question, Interview Question
  28. Core Java Interview Question, Interview Question
  29. Core Java Interview Question, Interview Question
  30. Core Java Interview Question, Interview Question
  31. Core Java Interview Question, Interview Question
  32. Core Java Interview Question, Interview Question
  33. Core Java Interview Question, Interview Question
  34. Core Java Interview Question, Interview Question
  35. Core java Interview Questions