bindhu solomon


{ City }
< Country > india
* Profession *
User No # 5760
Total Questions Posted # 0
Total Answers Posted # 24

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 774
Users Marked my Answers as Wrong # 119
Questions / { bindhu solomon }
Questions Answers Category Views Company eMail




Answers / { bindhu solomon }

Question { Wipro, 17435 }

Is there is any error if you have multiple main methods in
the same class?


Answer

The compilation error " main(lava.lang.String[]) is
already defined " will occur when we use have multiple main
methods in the same class?

Is This Answer Correct ?    12 Yes 2 No

Question { Oracle, 32403 }

Difference between this(), super()?


Answer

'this' is a pointer points to the object of the methods
invokes. super() is used to invoke the super class member
function.

Is This Answer Correct ?    17 Yes 12 No


Question { 49502 }

What is adapter class?


Answer

Java Language rule are such that we must implement all the
methods of an interface even if we put them into empty
braces.i.e. we must override all the methods declared in
the interface.

But we can create our classes as subclasses of one of
the adapter classes, then we need to override only some of
the methods we need. i.e, An adapter classes provide empty
implementation of all methods declared in an EventListener
interface.

Is This Answer Correct ?    191 Yes 27 No

Question { 13609 }

What is meant by constructor?


Answer

Constructor is special type of member function that will
automatically invoke when an object creates. The purpose of
constructor is for the initialization of instance
variables. A constructor having the same name as that of
class name. It may have arguments but doesn't return
anything.
If we want to initialize all objects of the same class
with same values, use default constructor.Otherwise, we can
use parameterized constructor if we want to initialize
objects of the same class with different values. If we
don't specify any constructor , compiler will use default
constructor with garbage value.

Is This Answer Correct ?    35 Yes 4 No

Question { 28649 }

How two threads will communicate with each other?


Answer

Two threads can communicate with each other using
the wait() and notify() , notifyAl() methods. wait()
method tells the thread to wait until another threads
calls notify() method.

The wait() method causes the current thread to wait
(possibly forever) until another thread notifies it of a
condition change. We use wait() in conjunction with notify
() or notifyAll() to coordinate the activities of multiple
threads using the same resources.

The notifyAll() method notifies all the threads waiting on
the monitor held by the current thread and wakes them up.
Typically, one of the waiting threads will grab the monitor
and proceed.

Is This Answer Correct ?    57 Yes 8 No

Question { 4350 }

What is J2EE?


Answer

J2EE stands for Java 2 Platform, Enterprise Edition. The
Java 2 Platform, Enterprise Edition defines a simple
standard that applies to all aspects of architecting and
developing multi-tier server based applications.


Is This Answer Correct ?    0 Yes 1 No

Question { 4429 }

What is a thread?


Answer

Thread is the smallest unit of executable code. Different
states of a thread is new, ready,running, waiting,
suspending, terminating.

Is This Answer Correct ?    2 Yes 0 No

Question { 8099 }

When a thread terminates its processing, it enters into
what state?


Answer

Thread enters into a dead state.

Is This Answer Correct ?    22 Yes 1 No

Question { DELL, 26573 }

What is the use of anonymous inner classes ?


Answer

We can declare an inner class within the body of a method
without naming it. These classes are known as anonymous
inner classes
Very useful for controlled access to the innards
of another class. and useful when we need one instance of a
special class.

Is This Answer Correct ?    11 Yes 6 No

Question { VI eTrans, 12193 }

What are Struts properties?


Answer

Properties files prepare the resource bundles with all
String messages used in your web application. Because
properties files are text files, they provide a
straightforward way of internationalizing our application.

For Struts web applications, you can use the
PropertyResourceBundle class, which is one of the standard
Struts implementations of the java.util.ResourceBundle
class. This implementation allows web applications based on
Struts to define resources using the "name=value" syntax.

Is This Answer Correct ?    3 Yes 0 No

Question { Honeywell, 40137 }

What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().


Answer

When we use forward, then servlet container forwards all
request to the target page. but in the case sendRedirect,
container makes a new request to the target Page.
So in forward , url link doesn't change but in sendRedirect
url line change . Because container makes a new request,
sendRedirect is much slower than forward.

If a target page has no relation with current
page , then we can use sendRedirect(I think so....)

Is This Answer Correct ?    35 Yes 9 No

Question { Patni, 45479 }

what is the diff's between swing and applet?


Answer

Swing is a set of classes under JFC that provide
lightweight visual component , enable creation of
attractive GUI. But Applet is heavyweight component and
needs web browser or tool known as AppletViewer.

Applet have no main method, but swing have.

Is This Answer Correct ?    90 Yes 5 No

Question { 8077 }

how can u create the object with out new operator


Answer

As my opinion, we can create object of String using 2 ways:
String s=new String("java");
String s="java";

in Other way ,we can clone an object,that will create a
new copy of an object.

or using Class.forName();( Not Sure....)

Is This Answer Correct ?    6 Yes 1 No

Question { 6178 }

why the constructor should be used in class,if there is no
constructor what will happen?


Answer

In Java, initialization of every object possible
by providing a constructor. If a class has a constructor,
Java automatically calls that constructor when an object is
created. So initialization is guaranteed.

If we don't define a constructor for a class, a default
parameterless constructor is automatically created by the
compiler.

Is This Answer Correct ?    6 Yes 0 No

Question { 6770 }

explain the clone method and clonable interface


Answer

Clonnable interface is used to create excact copy of an
object or method or variable.

When we want a replica of one object and want to use
it in some other scenario then we make use of cloneable
interface.

Is This Answer Correct ?    6 Yes 4 No

 [1]   2    Next