Swati Singhal

Ranch Hand
+ Follow
since Dec 08, 2003
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 Swati Singhal

Hi,
I have a basic question on generics.
Say I am creating a List or a Map in which I want to store objects of different type, with no type hierarchy relationship between them.
e.g. in my List, the 1st element is a Long and the 2nd is a String, 3rd say an Integer.
How do I use Generics to implement this??

Thanks
Hi,

Does one need to be SCJP 5 certified to take this exam?
I am SCJP 1.4 certified and want to take this exam.

Thanks
Hi,

I'm planning to take the SCWCD exam in a few days.
I have gone through the HFSJ and the SCWCD Book by Hanumant Deshmukh.

I've been attempting mock exams(from HFSJ and Whizlabs), where I'm scoring in the range of 70-75%.
However, I'm a lil paranoid that if at this rate, I mark even a couple of questions wrong on the exam, my score will dip to 60s and the result....we all know...

Any tips about the REAL exam from those who are certified already would be highly appreciated.

Thanks
Hi,

I took the SCJP exam on 24th October and cleared it with a score of 86%.
I got my marksheet right after completing the exam but I haven't yet received the certificate from Sun.

Is there any way I can contact them? The test centre has been asking me to wait but there are people who took the exam after me and have received their certificate.
Hi!!

I am using HttpClient to post xml files from my servlet to a jsp.
My application is designed in such a way that have a big XML which I parse and get smaller XMLs and loop through them posting each smaller XML to a JSP.
This part works fine.

Now, after I post the XML to my JSP I want to do a to another URL where I do some processing and then return the control back to the servlet which does the posting.

But once I post the XML to the JSP using HttpClient response.sendRedirect doesn't seem to be redirecting me to the other JSP.

Any help??

Thanks,
Swati
Hi,

I have my application installed on Tomcat server.
I created a softlink from within my application context to a data folder which is outside the appliation context.

Say for e.g. my app name is abc and i create a folder named test within it
so /abc/test/ points to a data folder outside the application context.

Now when I run this web application, I want to fetch one of the files under the data folder (Which is outside the application context), I actually point to /abc/test/ and then the path to that file.

Say it's a text/image file, I am able to get the contents of this data folder by creating the softlink, but when I try to open this text/image file using my softlink, it says File not found, whereas the file is very much there...

Please help !!
19 years ago
Hi Barry,

It does work.
Thanks for the reply.
19 years ago
Hi Barry,

Even split() doesn't give me an empty string"" or a null if there are two tabs in succession. What I want is, that if there are 2 consecutive tabs, then it should be able to detect that and give me an empty String or null which occurs between the two consecutive tabs.
19 years ago
Hi,

I have a String in which there are 5 tokens taht are delimited by tabs ("\t"). I was using the StringTokenizer to parse this line and get individual tokens.
It worked fine, till I encountered a situation where there were 2 tabs (instead of 1).
Now, since StringTokenizer doesn't return me an empty string, how can I find out if there is a consecutive occurrence of that token. I know that the 3rd constructor of String Tokenizer has a boolean argument that can be set true, but it doesn't seem to be doing good to me!!

Please help ASAP!!
19 years ago
Hi,

I have a String in which there are 5 tokens taht are delimited by tabs ("\t"). I was using the StringTokenizer to parse this line and get individual tokens.
It worked fine, till I encountered a situation where there were 2 tabs (instead of 1).
Now, since StringTokenizer doesn't return me an empty string, how can I find out if there is a consecutive occurrence of that token. I know that the 3rd constructore of String Tokenizer has a boolean argument that can be set true, but it doesn't seem to be doing god to me!!

Please help ASAP!!
19 years ago
Hi,

What happens to the exception object once the exception is caught or thrown? Is it garbage collected??
Hi,
I am a lil confused with this question. Appreciate if somebody could clarify.
Which of the following constructors must exist in Parent class?

I thought the answer would be c, but it is both a & c.
For your second question:
When the loop starts, i=0 & then it enters the inner loop, where j=0.
Hence the i==j condition is satisfied.
The continue statement is executed which bypasses the rest of the iterations of the inner for loop.
The control is back to the outer loop, where i is incremented to 1 and then the loop proceeds to the if condition, it is not satisfied as i=1 & j=0, so the control now comes to the print statement, which prints i=1 & j=0.
Hope this helps
Hi Amit,
As fasr as i see it, there is no "inner loop".
I only see two loops: middle & outer.
Now for the explanation: Java provides labelled break & continue.
That is, you can label your loop & when you wish to break out of it, or continue, you say

and control will come out of the loop denoted by that label.
In your code, if you want to break out of the loop labelled by middle(which is the inner loop in the code provided by you), you have to say
To access the base class version of an overridden method, you need to create an object of the parents type. For example, consider the following code:

In the above code, at line 1, you are creating an object of the parent class, hence the overridden method of the parent gets called.
However, if you create an object of the child class, as in line 2, the method in child class will get called.
Hope this helps