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 18

     

Question: Is &&= a valid Java operator?

Answer: No, it is not.

Question: Name the eight primitive Java types.

Answer: The eight primitive types are byte, char, short, int, long, float, double, and boolean.

Question: Which class should you use to obtain design information about an object?

Answer: The Class class is used to obtain information about an object's design.

Question: What is the relationship between clipping and repainting?

Answer: When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that requires repainting.

Question: Is "abc" a primitive value?

Answer: The String literal "abc" is not a primitive value. It is a String object.

Question: What is the relationship between an event-listener interface and an event-adapter class?

Answer: An event-listener interface defines the methods that must be implemented by an event handler for a particular kind of event. An event adapter provides a default implementation of an event-listener interface.

Question: What restrictions are placed on the values of each case of a switch statement?

Answer: During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.

Question: What modifiers may be used with an interface declaration?

Answer: An interface may be declared as public or abstract.

Question: Is a class a subclass of itself?

Answer: A class is a subclass of itself.

Question: What is the highest-level event class of the event-delegation model?

Answer: The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.

Question: What event results from the clicking of a button?

Answer: The ActionEvent event is generated as the result of the clicking of a button.

Question: How can a GUI component handle its own events?

Answer: A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

Question: What is the difference between a while statement and a dostatement?

Answer: A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once.

Question: How are the elements of a GridBagLayout organized?

Answer: The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.

Question: What advantage do Java's layout managers provide over traditional windowing systems? 0

Answer: Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accomodate platform-specific differences among windowing systems.

Question: What is the Collection interface?

Answer: The Collection interface provides support for the implementation of a mathematical bag - an unordered collection of objects that may contain duplicates. 1

Question: What modifiers can be used with a local inner class?

Answer: A local inner class may be final or abstract.

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