254.
Question: What is the Dictionary class?
255. Question: How are the elements of a BorderLayout organized?
256. Question: What is the % operator?
257. Question: When can an object reference be cast to an interface reference?
258. Question: What is the difference between a Window and a Frame?
259. Question: Which class is extended by all other classes?
260. Question: Can an object be garbage collected while it is still reachable?
261. Question: Is the ternary operator written x : y ? z or x ? y : z ?
262. Question: What is the difference between the Font and FontMetrics classes?
263. Question: How is rounding performed under integer division?
264. Question: What happens when a thread cannot acquire a lock on an object?
265. Question: What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
266. Question: What classes of exceptions may be caught by a catch clause?
267. Question: If a class is declared without any access modifiers, where may the class be accessed?
268. Question: What is the SimpleTimeZone class?
269. Question: What is the Map interface?
270. Question: Does a class inherit the constructors of its superclass?
271. Question: For which statements does it make sense to use a label?
272. Question: What is the purpose of the System class?
273. Question: Which TextComponent method is used to set a TextComponent to the read-only state?
274. Question: How are the elements of a CardLayout organized?
275. Question: Is &&= a valid Java operator?
276. Question: Name the eight primitive Java types.
277. Question: Which class should you use to obtain design information about an object?
278. Question: What is the relationship between clipping and repainting?
279. Question: Is "abc" a primitive value?
280. Question: What is the relationship between an event-listener interface and an event-adapter class?
281. Question: What restrictions are placed on the values of each case of a switch statement?
282. Question: What modifiers may be used with an interface declaration?
Answer :
The Dictionary class provides the capability to store key-value pairs255. Question: How are the elements of a BorderLayout organized?
Answer :
The elements of a BorderLayout are organized at the borders (North, South, East, and West) and the center of a container256. Question: What is the % operator?
Answer :
It is referred to as the modulo or remainder operator. It returns the remainder of dividing the first operand by the second operand257. Question: When can an object reference be cast to an interface reference?
Answer :
An object reference be cast to an interface reference when the object implements the referenced interface258. Question: What is the difference between a Window and a Frame?
Answer :
The Frame class extends Window to define a main application window that can have a menu bar259. Question: Which class is extended by all other classes?
Answer :
The Object class is extended by all other classes260. Question: Can an object be garbage collected while it is still reachable?
Answer :
A reachable object cannot be garbage collected. Only unreachable objects may be garbage collected261. Question: Is the ternary operator written x : y ? z or x ? y : z ?
Answer :
It is written x ? y : z262. Question: What is the difference between the Font and FontMetrics classes?
Answer :
The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object263. Question: How is rounding performed under integer division?
Answer :
The fractional part of the result is truncated. This is known as rounding toward zero264. Question: What happens when a thread cannot acquire a lock on an object?
Answer :
If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available265. Question: What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
Answer :
The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented266. Question: What classes of exceptions may be caught by a catch clause?
Answer :
A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Error and Exception types267. Question: If a class is declared without any access modifiers, where may the class be accessed?
Answer :
A class that is declared without any access modifiers is said to have package access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package268. Question: What is the SimpleTimeZone class?
Answer :
The SimpleTimeZone class provides support for a Gregorian calendar269. Question: What is the Map interface?
Answer :
The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values270. Question: Does a class inherit the constructors of its superclass?
Answer :
A class does not inherit constructors from any of its superclasses271. Question: For which statements does it make sense to use a label?
Answer :
The only statements for which it makes sense to use a label are those statements that can enclose a break or continue statement272. Question: What is the purpose of the System class?
Answer :
The purpose of the System class is to provide access to system resources273. Question: Which TextComponent method is used to set a TextComponent to the read-only state?
Answer :
setEditable()274. Question: How are the elements of a CardLayout organized?
Answer :
The elements of a CardLayout are stacked, one on top of the other, like a deck of cards275. Question: Is &&= a valid Java operator?
Answer :
No, it is not276. Question: Name the eight primitive Java types.
Answer :
The eight primitive types are byte, char, short, int, long, float, double, and boolean277. 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 design278. 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 repainting279. Question: Is "abc" a primitive value?
Answer :
The String literal "abc" is not a primitive value. It is a String object280. 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 interface281. 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 value282. Question: What modifiers may be used with an interface declaration?
No Comment to " 29 Java Interview Questions and Answers "