Swati Kadam

Ranch Hand
+ Follow
since Mar 05, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Swati Kadam

I need to appear for the IKM J2EE test before technical interview?Has anybody heard about it?can anybody tell me how to prepare for the test?
how many objects are created when same or different client send 100 requests to a servlet?
My HTML file is as follows...here i am displaying two questions and providing multiple choces for answers..
So i have use two radio button groups...Q1 and Q2..
Now..in my servlet i can use request.getParameter("Q1") to read the selected answer of the group Q1..
What if i want to read values of all radio button group values at same time...is there any method which returns valus of Q1,Q2 as an group?
Hop I have explined my doubt clearly...

<META NAME="Description" CONTENT="">

<form name="Form1"
1) Which of the following lines will compile without warning or error.

<INPUT type="radio" name="Q1" value="1"> float f=1.3;<BR>
<INPUT type="radio" name="Q1" value="2"> char c="a"; <BR>
<INPUT type="radio" name="Q1"value= "3"> byte b=257; <BR>
<INPUT type="radio" name="Q1" value="4"> boolean b=null; <BR>
<INPUT type="radio" name="Q1" value="5"> int i=10; <BR><BR>
2) A byte can be of what size

<INPUT type="radio" name="Q2" value="1" > -128 to 127 <BR>
<INPUT type="radio" name="Q2" value="2"> (-2 power 8 )-1 to 2 power 8 <BR>
<INPUT type="radio" name="Q2" value="3"> -255 to 256 <BR>
<INPUT type="radio" name="Q2" value="4"> depends on the particular implementation of the Java Virtual machine <BR>
<input type=submit value="submit">

14 years ago
where can I find servlet API?
14 years ago
Hii..Yesterday I cleared SCJP 1.4..
SO I know core java..Now I want to learn Servlet..
Can you tell where can I find the servlet basics and any book which explains it in deatil and in a easy manner..
I searched on the internate..but i dont know which is the best..
14 years ago
I have sent you the message..so check your inbox
Today I appeared for SCJP 1.4 and passed it with 72%(I know this is a average score)...
First I would like to thank Thanks to Khalid-Mughal book..and thanks to all ranchers for solving my queries and for giving 24/7 support...
I would like to tell all of you that solve as many mock exams as you can...
Some of the mock exams I found tougher than the actual SCJP exam and most of the question are similar to mock exam questions.. Tricks used were same..
SO mock exams really really helps a lot...
I am not advertising any exam but the one I found useful is:

1) Mock exam created by Valentin Crettaz:
This exam has lot of questions about overloading,overriding and nested

classes..tough and good exam...I look at this exam as a learning tool

2)Mock exam provided by Vodoo Exam:
If you do a lot of practice with mock exams you will find actual exam easy..
14 years ago
double x=4.5;
System.out.println(x+ ++x);

It prints 10.0
why not 5.5 + 5.5 = 11.0???
Got the answer..
The code does not compile. It is not allowed to surround the type with parenthesis. You can only surround the object
Integer ii = new Integer(10);
System.out.println(ii instanceof (Object));

The code does not compile....

System.out.println((ii) instanceof Object);
Now it compiles....
why is it so???
You have to make the following change in the code:
class T1{}

class T2 extends T1{}
class T3 extends T1{}
public class Test{
public static void main(String []arg)
T1 t1=new T1();
T2 t2=new T2();
T3 t3=new T3();
t2=(T2)t1; //line 2
See at line 2 t1 is typecasted to T2...
Type of the actual objet denoted by reference at runtime, is checked...
In your program the reference t1 was denoting objet of class T1..
Now in the above program at runtime, reference t1 is denoting objet of type T1...so no runtime exception..
Hope this clears....
what is the output?

Float f1 = new Float("4.4e99f");
Float f2 = new Float("-4.4e99f");
Double d1 = new Double("4.4e99");

How come it prints Infinity,-Infinity,and 4.4.E99
Congrats Deepak..

I am also appearing for the test on wed...
14 years ago
Hii Dinesh..
Exception and Error are subclasses of Throwable...
and AssertionError is subclass of Error...
In your code, test method throws AssertionError(subclass of Error)..but not handeling that using catch....so, that exception is propagated to the main method...(as main is calling test)
now in main method you call test in try block...but you are catching Exception...so it cant't find the matching catch block...
so main threads default exception handler prints the message that you see as the output....