Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!

Madhu SK

Greenhorn
+ Follow
since May 07, 2001
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 Madhu SK

Thanks..it is working now
19 years ago
Hi,
I am able to run the example now. Earlier the problem was, I put the .war file in the webapps directory AFTER starting the Tomcat.
Thanks
19 years ago
Hi,
I am using Tomcat standalone. I created a servlet called HelloClientServlet. In the Tomcat\WebApps directory, I created the following directory structure and put the class file in it.
\MyServlets\Web-inf\classes\HelloWorldServlet.class.
How should I run this servlet? Are there any other files that I need to create?
I am able to run all the examples that come with Tomcat & Sun's tutorial without any problem. But I am not able to run my servlets.
Thank You,
Madhu SK
19 years ago
Hi,
I have Tomcat installed on my machine. When I try to run the BookStore application given in Sun's tutorial, it gives No Found (404) error. The command I used to invoke the servlet is: http://localhost:8080/bookstore/enter
I am able to see the Tomcat's home page when I type http://localhost:8080. But when I try to run any other application, I get the 404 error. What should I do?
Thanks,
Madhu
19 years ago
1. The output is false, because according to JLS:
"The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this String object."
However, in your program s2 is not a String object. Hence the result is false.
2. == test gives an error, beacuse accroding to Khalid Mughal's book:
To apply ==, the operands must be type compatible:it must be possible to cast one into the other's type. Otherwise it is a complile time error.
hope this helps

Originally posted by James Du:
[B]
Why this(a) be rejected by compiler?
I think "a" has been initialized here and has a default value 0 and is legal for use.
Could anyone tell where in the JLS can i find the related rules against such reference.
Thanks in advance
James[/B]


----------------------------------------------------
I am a little confused here. "a" will be initialized and has a default value of zero ONLY after the class's constructor call has been completed. Right? Please explain
Hi,
This is my understanding...Correct me if I am wrong.
When you pass an object to a method, a copy of the reference to that object will be passed. However, the copy of the reference is still pointing to the original object.
1.a = "one" //reference a is pointing to the string "one"
2.when you pass a to a method, a "copy of reference a" is made and it is given to the method. Remember, it is also pointing to "one"
So, when we say, a.append in a method, we are actually appending the object that "copy of reference a" is currently referring to..in this case it is the same as "original reference a i.e "one".
3.But, when you say b=a, you are actually making the "copy of reference b" point to value in a. However your "original reference b" is still pointing to "two" . Now your "copy of reference b" and your "original reference b" are pointing to two different things.
So, when you print the value whatever the "original reference b" is pointing to will be printed..that is "two" in this case.
Drawing a diagram to visualize this helps.
Hi Nandini,
Thanks for the info. I have Beginning Java2 (Ivor Horton) for learning the language.
Madhu SK
20 years ago
hi Nandini,
Could you please tell me which books you have followed? I bought "Exam Prep" and "RHE"-99. Do you think they are enough?
Thanks.
20 years ago
processorA().processorB()
If you take the first part of the above code processorA(), it returns an object of type Q. So, when you say
processorA().processorB(), it means that you are calling processorB() of an object returned by processorA().
I am not very good at explaining..hope this helps!
Madhu
Hi,
Does anyone know if there is any difference between July1999 RHE and Sept2000 RHE? I am planning to buy that for my SCJP prep.
Thanks,
Madhu SK