rahul lahiri

Greenhorn
+ Follow
since Mar 20, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by rahul lahiri

Thanks for your replies.Well, I want to prepare for SCJP 1.6.Can any of you recommend any books,mock tests etc. to prepare for the exam?
I've wrote the following code.



Now the output I'm getting is :-

Integer method result=7
Double method result=11.52
Double method result=7.6
Double method result=7.6

I am really confused about how java resolves the method calls.Why am I getting this output?.Please help.
Thanks in advance.



Yep.I didn't notice it.Yeah, it is clear now.I should have read that and then asked rest of the questions.I am very very sorry and thank you for clarifying things.
15 years ago
Thank you for your reply.I did exactly this and got this output after getting the reply from David.The change in reference of the object does not reflect in the caller method.Now,like I posted before, what is the rule in java in such situations?If I change the object reference inside a method and make it refer to another(of course a compatible one), it won't reflect outside the method in which I am doing it but if I change the value of its members,then it would reflect?What if a member is an object itself?And if this is the rule, then why?I thought objects were passed by reference in java. I am really confused.Please help.
15 years ago
@David
Yeah.It doesn't reflect in the main class then.But it is getting confusing.What is the rule then.If I pass an object and change the value of its member, then it would reflect outside, in the caller class and if I pass an object and change what it refers to,then it won't reflect?Is this the rule?Thank you very much for your reply.
15 years ago
Actually my question was why the value of no is not getting changed to 100 like the x variable of the mv object.
15 years ago
I am new to java.I was trying with the following code:-








The output that I am getting is
200
5
Now last day, I learned that Wrapper classes are objects.So no is an object but its not behaving like one.I am new to OOP and java and I don't have a clue whats happening.Please help.

Thanks in advance
15 years ago
Thank you for your information.Actually while I was learning forward and redirect topics,it came to my mind that any one who knew a bit about programming, could bypass a filter.That is why I was testing with the forward to see if I could go to an external url.But now I see that there is a lot of work to be done and its not easy for a novice to achieve this.Anyways,thanks again for your information.
15 years ago
Yeah.I was exactly trying to do that.Could you give me some information about some tools which are available for achieving this?And the one you have named,iPrism,could you give me some information about that?
thanks in advance
15 years ago
Yeah.I know it might seem a bit weired but I want hide the page url so that if the url is checked by a filter, I can by pass it.Is there any other way of doing this inside a servlet?Any ways, thanks to you for replying.
15 years ago
I was using the following code to redirect a request

response.sendRedirect("http://www.google.com");

Yet, when I forward the request like the follwing

rd=request.getRequestDispatcher()
rd.forward("http://www.google.com");

it is taking the relative url....that is my context root is getting appended with the url.Is there a way to fix this?Basically I dont want the url to change.hats why I was using a forward instead of a redirect.Is there any other way of achieving this?

thank you in advance
15 years ago
Hi,
I am new to Ejb.I was reading somewhere that every ejb must have a remote and a local interface and only those methods which are exposed in the remote interface can be accessed.Now,if a programmer wants to access the ejb from a different machine,he/she must have a copy of the remote interface(at least thats what seems to me).Is it correct?
I am new to using weblogic and servlets.I've been trying to run servlets on weblogic.Can any one tell me the steps to do so!please help!