{ City } hyderabad
< Country > india
* Profession * software trainee
User No # 74081
Total Questions Posted # 0
Total Answers Posted # 13

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

Users Marked my Answers as Correct # 61
Users Marked my Answers as Wrong # 40
Questions / { giridhar }
Questions Answers Category Views Company eMail

Answers / { giridhar }

Question { Infosys, 29362 }

How to run a servlet program?


-- any html or jsp pages
--lib(which contains any jar files)
--(all Servlet .class files)

After compilation of Servlet .java files start the Tomcat
Server and in URL type like:
http://localhost:8080/Sampleapplication/.html(or).jsp <--(enter)

Is This Answer Correct ?    5 Yes 6 No

Question { 7667 }

What is the capacity that doGet method can send to the


doGet() method can send upto 256 characters to the server

Is This Answer Correct ?    1 Yes 0 No

Question { 8376 }

What is the default HttpRequest method?


doGet() method is the default HttpRequest method.

Is This Answer Correct ?    0 Yes 1 No

Question { HCL, 14850 }

Is JRE required to compile Java files ?


No, JRE is not required to compile java files. For the
compilation of java files only javac is enough. but JRE is
for execution of java files

Is This Answer Correct ?    1 Yes 0 No

Question { IBM, 11004 }

can i call init() method in destroy() method of servlset. ?


I think it is not possible to call init() method from
destroy() method of servlet.

Is This Answer Correct ?    1 Yes 1 No

Question { Photon, 9177 }

why ,we are using jsp and html.which one is better?


jsp is used for both static and dynamic contents in web
applications. But html is only for static contents.
So, as per my knowledge jsp is better than html

Is This Answer Correct ?    8 Yes 0 No

Question { TCS, 29477 }

Is java is a fully object object oriented language?


The following reasons put forward by many people to say java
is not a purely object oriented programming language.

1.purely object oriented(oo)means it should contain only
classes and objects.It should not contain primitive data
types like int,float,char etc.since they are neither classes
or nor objects.

2.In pure oo languages we should access every thing by
message passing(through objects). But,Java contains static
variables and methods which can be accessed directly without
using objects.

3.Java does not contain multiple inheritance. It means an
important feature of oo design is lacking.So, how can we say
it is purely oo programming language.

No doubt Java is purely oo programming language. The
preceding points represent lack of in depth understanding of

1.Even if java has primitive data types, these data types
are used inside the class and never outside of it.So, they
are part of a class. See the API specification of the class:
'Class'. Java specification says that all the arrays and
primitive data types (boolean,
byte,char,short,int,long,float,and double) and the keyword
void are also represented as objects of the class 'Class'.

2.Even static variables and static methods are written
inside a class. When accessing them from outside, we should
use classname. It means they are part and parcel of class
definition and should not be considered as individual
elements. For reducing memory utilization, only one copy of
them will be created in memory and shared by all objects.

3.Any purely oo language should follow all the 5 features of
oops. They are 1.Classes and objects. 2.Encapsulation
3.Abstraction. 4.Inheritance. 5.Polymorphism. Remember java
contains all these features and hence it is purely oo
language. Just because java does not contain multiple
inheritance, we should not say it is not purely oo language.
Multiple inheritance is not the main feature of oops, it is
only a sub feature of inheritance.

Is This Answer Correct ?    1 Yes 0 No

Question { 3492 }

How can i add a button in applet in java ???


Button b1=new Button("OK");

Is This Answer Correct ?    0 Yes 0 No

Question { 11605 }

Which is the Best institute to do academic Project in Java?
Need information about institutes at Ameerpet, Hyderabad.


I think every institute is same. Same concepts, same
strength of students. But one thing is very important
listening classes carefully is not only learning java and do
practice in lab and think logically when writing programs
and learn what exactly the flow of execution of programs.

Giridhar Gangapatnam

Is This Answer Correct ?    6 Yes 27 No

Question { Wipro, 6545 }

servlet life cycle?


Life Cycle of Servlet:

1.Servlet Loading.
2.Servlet instantiation:
After Servlet instantiation and before calling init() method
ServletConfig object is created by Container.
3.Servlet initialization: At that time init() method is called.
4.Request processing:In this stage service() method is called
and at that time Request and Response objects are created by
5.Servlet deinstantiation:At this stage destroy() method
will be called.

Is This Answer Correct ?    2 Yes 0 No

Question { Tech Mahindra, 9513 }

What is constructor


Constructor is the method which has the same name of class
and constructors are executed only once at the time of
object creation

Is This Answer Correct ?    7 Yes 0 No

Question { TCS, 7295 }

How can u create the Object of class Without using "New"


There are 4 ways to create object:

1.using new operator
Employee obj=new Employee();
Except this one

2.using factory methods
NumberFormat obj=NumberFormat.getNumberInstance();

3.using newInstance() method
Class c=Class.forName("Employee");
Employee obj=(Employee)c.newInstance();
or we can write these two lines as a single line
Employee obj=

4.By cloning
Employee obj1=new Employee();
Employee obj2=(Employee)obj1.clone();

Is This Answer Correct ?    20 Yes 4 No

Question { TCS, 13428 }

what is the difference between doGet() and doPost()?


doGet() doPost()
1)doGet() method can send 1)doPost() method can send
limited amount of data large amount of data.
i.e.upto 256 characters

2)In doGet() method when we 2)In doPost() methodrequest
send request then in Request is passed along withbody
Format there is no body part, part of theRequestFormat.
the request is passed along doPost() method Request
with only Request Format header Format has both body and
part only. header part.

3)doGet() method send limited 3)large amount data has
data because it has only header sent through body part
part,header part has limited of the RequestFormat.
memory to carry the data.

4)doGet() method support book 4)doPost() method doesn't
marks. support book marks.

5)when we send request parameters 5)The requested parameter
in doGet() it will display the in doPost() will not dis
information in URL as a query play the information as in doGet() data there a query string in
is no data security. data is secured.

Is This Answer Correct ?    9 Yes 1 No