Jitendra Jha

Ranch Hand
+ Follow
since Jan 28, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jitendra Jha

When I declare an array, for example



'i' is the reference of which class?
9 years ago
Thanks Matthew for that reasoning.

We of course cannot be sure as to what exactly was their reason but the way you have put it is probably the right way to think about it.

Regards,

13 years ago
I think the poster here wants to know the rationale behind the requirement of main() with String array argument.

The question she should ask is,

Why did they(creators of java) made it compulsory for main to have an argument.....
Since it is not a requirement in c#.....
What advantage does it(making it compulsory) give us.


Even if she did not ask it,this question has perflexed me too, so kindly help me understand it.

Thanks and regards,
13 years ago
Thanks to all of you.
The link of code ranch posted by "Maneesh Godbole" explains the concept which i already knew but the last paragraph was the part, i was really interested in...
That cleared everything.

Thanks again and regards,
13 years ago


My understanding of static says that static methods cannot be overrriden but the compilation of the above code results in Overriding rule violation error
Why is this so?

Thanks,
Jitendra
13 years ago
The code on line five(5) works because, you are trying to print an argument variable which has scope and priority inside the method.
But the code on line 10 fails to compile because it is trying to use the variable on line 2 which is non static and hence cannot be referenced from the static context(main method).
13 years ago
The print statement's argument will finally be rendered as String.
Hence "+" should be used for concatination as already pointed out in the post above
13 years ago

So in this case inside the method the print statement gets "x" from the argument and the argument gets "x" from the member?



Not exactly.

'x' in the argument takes its value from the calling code as shown. It is an extended example of shadowing where the argument variable shadows the member variable.


13 years ago
This code is not working and i fail to understand why!!!


I presume that java will invoke autoboxing
when i change the display method to accept one argument,it works.
please help me out or point me in the correct direction.

Thanks in advance

14 years ago
I am trying to build a socket program. It seems that my code is compiling fine but am unable to run it. The problem is that i am not able to pinpoint the problematic part.
I am attaching the code for my program. Any help will be appreciated.












Thanks in advance

Vishal Srivastav wrote:
I do not want my SCWCD exam to also be like this. So please help me and give your valuable suggestions so that i can clear the exam with at least 80 to 85 %.

Thank you.

Regards,
Vishal Srivastava



First of all,Congratulations on your SCJP

Do not bother much about your SCJP score because your certificate does not show your score....

I would like to suggest though that you look into the areas where you lost marks. and work on them..


now comming to SCWCD
read my posts above...
also ensure that you work with deadlines.Mentally decide a day by which you would give the exam.
also set target for each day...and try to achieve it...
Do not study in gaps.ensure regularity.What i mean to say is that make sure you stick to a routine.
Do not proceed to any new chapter unless you are pretty sure that you know the current one.
Remember the API,Tags,Patterns,Implicit Objects,Listeners...These topics(you would not know them now),are easiest to remember and you could expect atleast 15-20 question(Direct/Application) from these.Also remember that the general idea is that SCWCD is easier than SCJP....
but i do not agree....These tests are so different from each other that you cannot compare them.
SCJP tests your understanding of the concepts where WCD tests your ability to apply the concepts...
Therefore prepare accordingly
If you want to know anything else,please feel free to ask...
This is the correct place to clear all your doubts(if you have any left after Head First )
Best of Luck
16 years ago

Bala Thiruppathy wrote:Can you please let me know which book you have prepared to clear this exam.



Bala i strongly recommend Head First Servlet and JSP by Kathy,Bert and Bryan
that according to me is THE best book that i have ever read and the only reason i passed.
Secondly i did not look at any other books(did not want to get deviated)

i would suggest you really give the book a look....
you would surely love it(Atleast i did)

Hope this helps
16 years ago

rajneesh saroj wrote:
Please give me some suggestions about reading the book and mock exams.
Rajneesh
[SCJP 5.0]



Thanks
For you i can only say that Consistency is the key with proper planning
one more thing,nothing in the book is useless,not even the comic strip.
They help you understand
I used to get up at 5am, revise what i learnt the previous day, make a target and then go for it
Do not look at the size of the book
around 200-250 pages are mocks,exercises(in other words fun stuff).Do not let Size matter to you.Achieve your target.Have proper sleep and voila!!! you got my recipe for a 15 days preparation......

Hope this helps....
As for mock exams,please take them very seriously,they are very near to the actual exams.....
I also took the mock from the 1st edition of the book....
That also cleared a couple of Doubts
16 years ago

Vishal Chugh wrote:Kool!!!

Congrates Dude!!! , just 15 days for prep and 81 , I would jst say WOW!!! ....

EnjoYYYY!!!



Consider though that each of those 15 days were like hell
i studied like a dog
10-15 hrs a day
it won't sound so cool then
16 years ago
Hello Ranchers
Today i cleared the SCWCD 1.5 exam with 81% marks
It may not sound great but considering that i prepared for 15 days only without any previous knowledge of Servlets and JSP, i think its a good effort
I must credit HFSJ(k&b&b) for this success.
I read the whole book once and solved each and every mock question,understanding why i got a particular answer wrong or why i got a particular answer right
What happens that sometimes we get some answers right but the logic which we apply is wrong,so it was a must do
on the last coffee cram exam i got 52%.
but i noticed that i was making mistakes in pattern,security
that was yesterday.I did both the topics in the night.

Now coming to the exam,the time was ample and i did not need to hurry
if you have understood the topic clearly,there is noway you can fail.
no cramming is required(apart from DD elements )

One more thing i would like to share is that,your success percentage is directly proportional to the time you spend on the Ranch....
It will certainly help you in clearing your concepts
Revision can be done by the notes of Fredrickshttp://esnault.frederic.free.fr/certification/scwcd_notes.pdf
you should certainly go through it
you can do patterns from http://faq.javaranch.com/java/PeabodyOnScwcdPatterns
infact these links were suggested by the ranchers here and were a great read....
Now i plan to take SCBCD as soon as possible
Best of luck to all those who are preparing


16 years ago