What is Checked & Unchecked exception?
Both types of exceptions are drived from the class Exception. But Unchecked exception are RunTimeException, which do not to be handled or declared. Whereas Checked Exceptions must be handled by try/catch block or must be declared in the method signature.Reply
Can we declare variables inside a method as Final Variables?
Yes! we can declare variables inside a method as final variables.Reply
What is Default modifier in Interface?
Default modifier in Interface is public access modifier.Reply
What is Wrapper class. Is String a Wrapper Class?
Wrapper classes are used to "wrap" the primitives
data types into objects so that they can be
included in the activities which are reseved for
Yes! String class is a wrapper class, it wraps
the string literals to an object.
What is difference between String & StringBuffer?
String class provides the immutable character
sequence whereas StringBuffer class objects are
mutable characters sequence. The StringBuffer is
faster than String when performing simple
String s=new String("Hello");
The String object s is still pointing to "Hello"
instead of "HELLO". Here a new string "HELLO" is
created but did not assinged to any reference
StringBuffer sb=new StringBuffer("Hello");
The StringBuffer object sb is now pointing to the
This is the main difference that string object
are immutable and string buffer objects are
What is latest versions in JAVA related areas ?
As of December 2008, the latest version of Java is 1.6.0_11Reply
What is the exact difference in between Unicast and Multicast object ? Where we will use ?
Unicast object means there is one receiver. Use
multicast to allow one-to-many connections. The
example for multicast is the java eventhandling
What it the root class for all Java classes ?
The Object class is the root class of all the Java classes.Reply
Why Java is not fully objective oriented ?
Java is not fully object oriented language,
because not all values in Java are Objects. The
basic numeric types such as int, long, double,
etc., are not objects and need to be "boxed" into
objects in order to pass them as Object
parameters or call methods on them. Java does not
support Multiple inheritance and operator
overloading. Java uses static keyword. We can
perform a function declared as static without an
object this violates real world reflection and
What is the use of Interface ?
Java acheive inheritance using two notions : By
extending the class and implementing the
interace. When you "implement" an interface, you
are stipulating that your class adheres to the
"contract" of the interface that you specified.
Use interfaces to say "What objects can do" or
"What can be done to an object. "Interfaces are
intended to define the what without defining the
how. Interfaces provide a form of multiple
inheritance. A class can extend only one other
class. Interfaces are limited to public methods
and constants with no implementation.