jagan kay

+ Follow
since Jun 08, 2008
Merit badge: grant badges
For More
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 jagan kay

All the best for good score
[ August 18, 2008: Message edited by: jagan kay ]
Hi Venkatesh,

As of my experience with multiple choice questions in real exam,

>for more than one correct answers, the question mentions how many options you should select & Check box is given for each option.
>for one correct answer, radio button is given for options.

[ August 16, 2008: Message edited by: jagan kay ]
Hi Abin Joy,

When control comes to method 'getName(String s[]){}', there is still only one array object containing the values(Sam Smith, John Smith) pointing by two reference variables 'Sa' & 's'. Hence any modyfication done through either of the reference variables alters the content of that one and only array object. So, the program should print Coors.
[ August 18, 2008: Message edited by: jagan kay ]
Hi Anand,

This is what what i clearly told in my first post by definition & by code as well.

in my second post as you told further,

what i thought of pointing out is once the portected variable 'x2' of class 'pack' is available in class 'test'(in different package
only through inheritence not through the object reference of class 'pack') it can be accessed directly from any non-static
method of class 'test' and only by the object reference of class 'test' from inside a static method of class 'test'(as how we do
it[accessing non-static member from inside a static context] in general regardless of 'protected, inheritence in to different package')
since 'x2' is a non-static variable.

here, by "...only with an object reference", i meant the reference varaible of class 'test' not by the one of class 'pack'(i should
have explicitly mentioned it in my second post once again) from inside a static method(like 'main()' as you told in your second post) to access x2(non-static field).

[ August 17, 2008: Message edited by: jagan kay ]
Hi anand,

Ofcourse, it is possible as any non-static member can be used in a satic context only with an object reference. I simply forgot to point it.
Hi venkatesh,

The problem with your prgm., is protected members of a class are visible to its sub class in different package only through inheritence(and not with object reference)

In your program, 'protected x2' of 'pack' is visible into 'test' only through inheritence. So System.out.println(x2); is valid. but x2 is not a static member. so you may need a non-static method for class test to display x2 as the following

x4 is visible only in class 'pack' as it is private and x3 is not visible into 'test' as it is neither public nor protected.

[ August 15, 2008: Message edited by: jagan kay ]
Hi friends, thank you very much for your appreciation & valuable suggestions.

I�m really happy to hear there is a book by K&B for SCWCD. But i�m still with a bit of confusion if i need to learn the fundamentals of J2EE first. Please let me know if the content of SCWCD(from J2EE) in Head first servlets and JSP starts from the scratch so that some one who knows nothing about J2EE(like me) can directly go with it. (pl., bare up my query. i�m with no knowledge of J2EE) I want to start the preparation early as I�m clarified. I�ve already lost a day.

Awaiting for your valuable suggestions. Thanks again for finding time to respond me.

[ August 01, 2008: Message edited by: jagan kay ]
Hi all,

This afternoon i took SCJP 5 exam and got 76%. Thanks to all.

With only a little bit knowledge of core Java, i started preparing with the text book by K&B four months back. It is an excellent work by them. Once completed the whole content, i revised for four times. I got just 51% & 54% in the mocks given with the book. I did lot of coding(more than 500 programs) but didn't do any other mocks. That may be the mistake for my less mark in real exam. The real exam was some what easier than i expected.

Thanks to KathySierra & BertBates and ofcourse all the members of this forum for your wonder full help. Good luck to the ones preparing for SCJP.

Now i'm planning for SCWCD. But nothing i know about J2EE. Can some one tell should i first learn basics of J2EE before jumping on the preparation for SCWCD? If so, which book i can go for J2EE & with which depth i can start for SCWCD? Is any book available for SCWCD by K&B? None of my friends is in the IT industry. So please guide me where i should start from and with which materials for SCWCD.

Thanks to all once again.

[ August 01, 2008: Message edited by: jagan kay ]
hi Paul Prusko & Ireneusz Kordal,
my doubt is cleared. i could realize how silly my question was. i exprimented and found the foll.,

FINAL(methodLocal-final (or) instance-Final (or) static final)vriables,
once assigned a value cannot be reassigned.

-final(method local) var:
(i)declared inside a method.
(ii)should be initialized upon its declaration(as local var don't get
default value).

-final(instance) var:
(i)declared inside a class outside any method/block.
(ii)gets default value,if not assigned a value upon its dclaration.
(iii)even if it gets default value first, only once we can assign a
value only inside an instance init block.

-static(class) final var:
(i)declared insdie a class outside any method/block
(ii)gets default value, if not assigned a value upon its dclaration as
instance final var.
(iii)even if it gets default value first, only once we can assign a
value only inside a static block.

Thanks to all.
hi Frank Zito, sorry i forgot to mention it. mine is jdk 1.5 & Eclipse-SDK-3.3.2
Thanks to all.
Thanks Jesper Young. I didn't notice it first.
hi there,
if i once uncomment the statement labeled with LINE NO:1, i get the foll., compilation error.

When static variable, 's' & instance final variable, 'f' can be
initialized inside 'instance init block', Why my 'static final'
variable, 'sF' can't be assigned a value inside 'instance init block' ???

Can some one explain it why?

[ August 16, 2008: Message edited by: jagan kay ]
sorry. this is the compiler error

the program works with java 1.6?
hi Bhushan Chhajed,
i'm using jdk 1.5 but get the ambiguity on compiling the prg.,

[Jesper Young: Deleted because it messes up the display of the whole topic]

what about java 1.6? it compiles it fine?
[ July 06, 2008: Message edited by: Jesper Young ]
last week i took the same exam & was stuck with the 2nd page first. all my effort to get further pages was vain. again i started the exam right from the begining & this time i couldn't reach the final page. but, after i tried with brower's 'back' and 'next' option for 2 to 3 times and submiting the current page i got the final page of the exam. got only 69% but expected more. i don't thik the answers are on net. we ourselves have to work and find.