Java Interview Questions and Answers
Question - 161 : - What is the Collections API?
Answer - 161 : - The Collections API is a set of classes and interfaces that support operations on collections of objects.
Question - 162 : - Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
Answer - 162 : - The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.
Question - 163 : - What is the List interface?
Answer - 163 : - The List interface provides support for ordered collections of objects.
Question - 164 : - How does Java handle integer overflows and underflows?
Answer - 164 : - It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.
Question - 165 : - What is theĀ Vector class?
Answer - 165 : - The Vector class provides the capability to implement a growable array of objects
Question - 166 : - What is the difference between the >> and >>> operators?
Answer - 166 : - The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.
Question - 167 : - Which method of the Component class is used to set the position and size of a component?
Answer - 167 : - setBounds()
Question - 168 : - Which java.util classes and interfaces support event handling?
Answer - 168 : - The EventObject class and the EventListener interface support event processing.
Question - 169 : - Is sizeof a keyword?
Answer - 169 : - The sizeof operator is not a keyword.
Question - 170 : - What are wrapper classes?
Answer - 170 : - Wrapper classes are classes that allow primitive types to be accessed as objects.