| Back to Questions Page |
| |
| Question |
Which method will get invoked first in a stand alone
application? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The first method that is invoked in a stand alone Java app
is the 'main' method which must have the following signature:
public static void main( String[] args )  |
| Ranganathkini |
| |
| |
| Question |
What is the life cycle of an Applet ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | init()
start()
paint()
stop()
destroy()  |
| Ravikiran |
| |
| |
| Question |
What is the immediate superclass of the Dialog class? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | java.awt.Window  |
| Ranganathkini |
| |
| |
|
|
| |
| Question |
What is the difference between the >> and >>> operators? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The >> operator carries the sign bit when shifting right.
The >>> zero-fills bits that have been shifted out.  |
| Shweta |
| |
| |
| Question |
What is the difference between static and non-static
variables? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Static variables:
There is only one copy of static variable and even
when the class is instatiated, the value remains the same.
Non-static variables:
Every time the class is instatiated, the objest has
their own copy of these variables.  |
| Sathya |
| |
| |
| Answer | static variables are class variables and the values remains
same fr the whole class
nonstatic variables are of two kinds
global variables:are the variables which defines variables
which can be accesible over the whole class
local variables:the scope of local variables is with tin
the method only  |
| Ravikiran |
| |
| |
| Question |
What is the frontend and backedn in Java? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | front end means which u going to have look and feel like
jsp,swings,awt pakage
back end menas which is going to implement the business
logic for you  |
| Narasimha |
| |
| |
| Answer | front end is html or UI elements
back end is the database or persistent storage  |
| Ravikiran |
| |
| |
| Question |
What is yielding and sleeping? how they different? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | When a thread yields, its execution is paused and loses
ownership of the monitor lock giving other waiting threads a
chance to run.
When a thread sleeps, its execution is paused for the
specified duration during such an idle period, the thread
continues to retain the ownership of the monitor lock.  |
| Ranganathkini |
| |
| |
| Answer | yield() method will suspend all the same priority thread
which is running and gives chance to next thread to run
which is of the same priority
sleep() method will make the thread to sleep for a
particular period of time which is specified in the
argument list  |
| Ravikiran |
| |
| |
| Question |
What is the difference between throw and throws? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The 'throw' statement initiates an exception to be thrown
where as the 'throws' clause declares that the method is
expected to throw 1 or more checked execptions.  |
| Ranganathkini |
| |
| |
| Answer | 'throw' exception is thrown manually and 'throws' exception
is thrown predefindly.  |
| Sushma |
| |
| |
| Answer | throw will declare an exception
throws will throw the exception to the calling method  |
| Ravikiran |
| |
| |
| Question |
Difference between prefix and postfix forms of the
++operator? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The prefix ++ operator first increments the value by one and
then returns the new value.
The postfix ++ operator first returns the value and then
increments it.  |
| Ranganathkini |
| |
| |
| Answer | prefix will increment first and assigns to the variable
postfix will assing the value to the variable and then
increments  |
| Ravikiran |
| |
| |
| Question |
Difference between the paint() and repaint() methods? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The paint method causes the component and and all its parts
to be painted on the Graphics context tat is passed in as
parameter.
If the component is a light-weight component, then a call to
the component's repaint method which invokes the paint
method as soon as possible. If the component is not a
light-weight component, then calling repaint is the same as
calling the update method.  |
| Ranganathkini |
| |
| |
| Question |
Difference between the String and StringBuffer classes? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | String class is immutable i.e oncle created the value
cannot chage.
Stringbuffer class is mutable.The value can change.  |
| Sathya |
| |
| |
| Answer | yes, String is a immutable that means once the string
object is created it cannot be changed.
String Buffer: it is a mutable,this object is changed if we
make any modifications.  |
| Anitha |
| |
| |
| Question |
In which JDK version event-delegation model is introduced? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | JDK 1.1  |
| Ranganathkini |
| |
| |
|
| |
|
Back to Questions Page |