Anoop Kavalloor

Greenhorn
+ Follow
since Sep 06, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anoop Kavalloor

Exactly at what moment does the Database driver/engine compile the Prepared Statement (since it is known as pre compiled stmt).
As every array objects take the default value of the declared type, how will i traverse thru the following code

Object obj = new int[10];

now, the 10 objects should have the default value as 0. The question is, how do i traverse the array ??
Once u make a reference variable equal to

null

, that means that variable is not refering to anything. And the object that was been refered to, by the reference variable will now be lost [unless it has been referenced by another reference variable]. This lost object now becomes eligible for GC
Serialization is the process by which you write the state of an object into a flat file [or hard disk]. Externalization is the process of serializing an object over the network. Externalization interface has just two methods. Hence choice 5 is right.
The class will compile fine and when u run the class u ll get an infinite loop. The line while(a=true) make the variable a as true. It is equivalent of writing

boolean a = true;
while(a){
}
Hi,
The prefix increment operator increments the value of the variable first and then uses the variable in the operation[or expression]. Now consider your case when u say ++i<args.length and the command line exp is java c abcd. here args.length will return 1. value of i before the if() loop is zero. when it encounters the line ++i < args.length, it first increments the value of i to 1 and then i takes part in the expression. Now 1 cannot be less than 1 and hence no output is shown.

I am trying to retrieve the selected value(of the select box in jsp) using request.getParameter("")



u have to use the name of the select box. say if the name of the select box in the jsp page is "name", then ur request will be like this...request.getParameter("name") -- in the servlet.
18 years ago
Dear all,
just a simple solution. Java uses pass by value for both primitive and Objects. in case of primitive, it is a straight as an arrow. But for Object types,java passes the value of the reference. So what actually the calling method recieves is the copy of the reference of the object. hope it is clear.
18 years ago
I agree with LEE. you can't have more than one <HTML><BODY></BODY></HTML> tag in a single page. just keep a single set of the above mentioned tag. In your check() , just add the <H2> tag.
18 years ago
hi Nico Yukiko ,
What is the reference type of ur array. btw an array is a collection of same objects. how can u put an double and string in the same array. try rectifying this problem and see how it works.

Unqualified Genius
18 years ago
To create two instance of the servlet, in the Deployment Descriptor, make two tags of the servlet. That should do the trick.
18 years ago
Hi mate,
The Servlet API has given two classes namely javax.servlet.GenericServlet and javax.servlet.http.HttpServlet. You are supposed to extend to HttpServlet if you want the underlying protocol to be HTTP. If u extend to GenericServlet, then you have to write the tedious work of managing the network protocol.

18 years ago
Firstly u need to put your questions in the right format.
Alright try this out. Instead of keeping all the fields hidden (which wont help your cause anyways), you should keep just one field hidden. On the click of the respective button, say add button, use javascipt to populate the hidden field. Also use javascript to submit your form. This way your servlet will get the parameter and can take further course of action according to the action.
Hope this helps you.
18 years ago
hi,
Is your left hand better or your right hand ? Comparing JSP and Servlets is similar to the above question. JSP is more of an HTML type page which means that JSP pages are viewed by the users. Servlet is/can also viewed by users but developers prefer servlet to write processing logic rather than content logic.
A JSP page, before it is served to the end user, is compiled into a servlet and then processed. But u can't term JSP as slow cos a JSP page can be precomplied and kept on the server before the first users asks for it.
18 years ago
1.int i = 1;
2.int j = i++;

at line 1, i is assigned the value 1. at line 2, j is first assigned the value of i i.e. 1, so j becomes 1 and then the value of i is incremented by 1 (as it is a post increment).

Remember in post increment, the value of the variable is first assigned and then the value is incremented by one.

3. if ((i>++j) && (i++ ==j))

here now the value of i is 2 and ++j makes value of j=2. now 2 > 2 is false and hence the value of i is not incr in the block.

hope i am able to solve ur query