|
Core Java Interview questions with answers posted on August 11,
2008, 19:00 pm
by Amit Satpute
Answer: Java applications can call code written in C, C++, or
assembler. This is sometimes done.........
Answer: The class loader describes the behavior of converting a
named class into the bits responsible......
Answer: The Reflection API allows Java code to examine classes
and objects at run time.....
Answer: The static class loading is done through the new
operator......
Answer: Cloning of objects can be very useful if you use the
prototype pattern or if you want to store an internal copy......
Answer: Comparators can be used to control the order of certain
data structures and collection of objets too......
Answer: Private Constructors can't be access from any derived
classes neither from another class......
Answer: A static initializer block resembles a method with no
name, no arguments, and no return type......
Answer: To add any primitive to a collection, you need to
explicitly box (or cast) it into an appropriate wrapper class.....
Answer: Maps are used to store the key-Value pairs.....
Answer: The Externizable interface extends the serializable
interface......
Answer: When serializable interface is declared, the compiler
knows that the object has to be handled..........
Answer: Threads that work in the background to support the
runtime environment are called daemon threads.....
Answer: Javadoc utility enables you to keep the code and the
documentation in sync easily......
Answer: StringBuilder is unsynchronized whereas StringBuffer is
synchronized.....
Answer: A semaphore is a flag variable used to check whether a
resource is currently being used by another thread or process.....
Answer: The java.lang.Throwable class has two subclasses
Error and Exception. There are two types.....
Answer: Local classes - Local classes are like local variables,
specific to a block of code.........
Answer: Wrapper classes are used to be able to use the
primitive datatypes as objects........
Answer: Errors are abnormal conditions that should never occur.
Not to be confused with the compile time errors.....
Answer: Under time slicing, a task executes for a predefined
slice of time and then reenters the pool of......
Answer: If we want to transfer data over a network then it
needs to be serialized. Objects cannot be transferred........
Answer: A Monitor defines a lock and condition variables for
managing concurrent access to shared data.......
Answer: Classes in swing are not OS dependent. They don’t
create peer components,..........
Answer: The StreamTokenizer class takes an input stream and
parses it into "tokens", allowing..........
Answer: The getCodebase() method is also commonly used to
establish a path to other files............
|