This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!


+ Follow
since Sep 14, 2000
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 ramani2020

Hi Sheri..
I think C and D are right..
see this post for option E.

Hi Bergling,
I agree ,C and D are right.
see this code regarding option B:

when line //a is uncommented, the compiler gives an error saying line not reached.
it means you can't have a return inside finally?
The quote is from JLS 5.1.7,
I didnt understand this really well.

Except for the String conversions, there is no permitted conversion from any primitive type to any reference type.

this might sound stupid,but I dont understand how a primitive type is converted to a reference type in String conversion.
could somebody explain,please?

I think Sampath is right.
JLS experts, do come up...
I have this doubt on interfaces...
interface abcd
void method() throws Exception ;
class ABCD implements abcd
public void method(){}
the above code,compiles.I thought method() in class ABCD should also throw Exception .
could somebody tell why this is legal?
I thot it would be null,but I was wrong.
what is the default value of o when o is of type Object?
as in :
Read the code below. Will be the result of attempting to compile and run the code below.

1.The code does not compile.
2.The code compiles cleanly and shows "Object Version".
3.The code compiles cleanly and shows "String Version"
4.The code throws an Exception at Runtime.

the answer given is 3.
I tried this small code:

this prints out java.lang.Object@f5ac7215
when I run it again,it gives a different thing after the '@'
I guess this is the address of o.but why is it different each time?
could somebody help?

yup! I couldnt be more dumb
I guess I shd start from scrap 'gain...
thanks Surya..
I didnt understand option E of Qn 17
Primitive type wrapper classes

Are provided for all primitive types, including void

void, primitive type? what is being said here?
could somebody explain ,please?
thanks in advance..

excellent analogy, Jane...

pl look at this code:

the code gives NullPointerException on lines 8 and 17
whether line 7 is commented or not
when the line is commented, what is the class of nI? Object,I guess. then why is it not displaying the class in line 8 and throwing an exception instead?
when line 7 is not commented, the test in line 9 fails ,and "no" should be printed..
could somebody explain please?
thanks in advance
anil,you are implementing interface a, not interface b.
the inner interface just happens to be a member interface of the outer one.
so the compiler results are right..
am I correct? more inputs from somebody are welcome.

Satish,The gridwidth and gridhieght parameters indicate the number of cells allotted to the component horizontally and vertically .I dont think they decide the number of rows and columns.
could somebody come up with the correct answer,please?
from Bill Brogden's Java2 Exam Cram,

Container was an abstract class in Java 1.0 and 1.1,but for the Java JDK1.2 it is no longer declared abstract.

please send me links to the mocks you took at
thanks a lot..
hi geetha,
But anonymous classes, by definition, dont have a constructor or a name.
If the class extends another class which has a constructor, the inner class is not anonymous I right? or am I missing something?
could you give an example ?
or,could you tell me what modifications are to be made to convert the foll into an anonymous class like you said, extending from class father, and without a name..

thanks in advance,

i think 1 and 4 are right..
correct me if I am wrong..