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 21

     

Question: How are the elements of a GridLayout organized?

Answer: The elements of a GridBad layout are of equal size and are laid out using the squares of a grid.

Question: What an I/O filter?

Answer: An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.

Question: If an object is garbage collected, can it become reachable again?

Answer: Once an object is garbage collected, it ceases to exist.It can no longer become reachable again.

Question: What is the Set interface?

Answer: The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.

Question: What classes of exceptions may be thrown by a throw statement?

Answer: A throw statement may throw any expression that may be assigned to the Throwable type.

Question: What are E and PI?

Answer: E is the base of the natural logarithm and PI is mathematical value pi.

Question: Are true and false keywords?

Answer: The values true and false are not keywords.

Question: What is a void return type?

Answer: A void return type indicates that a method does not return a value.

Question: What is the purpose of the enableEvents() method?

Answer: The enableEvents() method is used to enable an event for a particular object. Normally, an event is enabled when a listener is added to an object for a particular event. The enableEvents() method is used by objects that handle events by overriding their event-dispatch methods.

Question: What is the difference between the File and RandomAccessFile classes?

Answer: The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.

Question: What happens when you add a double value to a String?

Answer: The result is a String object.

Question: What is your platform's default character encoding?

Answer: If you are running Java on English Windows platforms, it is probably Cp1252. If you are running Java on English Solaris platforms, it is most likely 8859_1..

Question: Which package is always imported by default?

Answer: The java.lang package is always imported by default.

Question: What interface must an object implement before it can be written to a stream as an object?

Answer: An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.

Question: How are this and super used? 0

Answer: this is used to refer to the current object instance. super is used to refer to the variables and methods of the superclass of the current object instance.

Question: What is the purpose of garbage collection?

Answer: The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources may be reclaimed and reused. 1

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