Seema Shrikant

Greenhorn
+ Follow
since May 17, 2013
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
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Seema Shrikant

Hi all,

Here, anyone who is new to these exams, I would like to advise you to take OCAJP SE 7 exam.
Oracle has made it compulsory now to take OCAJP(IZ0-803) before taking OCPJP(IZ0-804). Only then you are supposed to be called a Oracle Certified Java Professional.

Java 7 is the latest version of Java and the exam OCAJP covers syllabus upto exception handling only. Its quite an easy exam. I have gone through it and I found my Enthuware questions difficult than the real exam.

For starters, get any Java 7 book and start studying. After you are done get a set of mock exams. These prepare you well.

Hope this helps.
Hi everyone....
I just passed OCAJP exam with 91%.

I want to thank first of all to Enthuware Mock Tests. The test made me prepare well and made me confident enough to appear for the exam.
Though I had failed in the last test,I was enough prepare,I knew it. All questions were quiet similar from the test itself.

Thanks to Kathy and Bert. The book made up my base for the exam. Read it twice and reviewed again before I took the last test on Enthuware.

Thanks to coderanch for clearing my doubts.

Happy... Its party time.
10 years ago
We can use the Exception handling of course to handle RuntimeExceptions also.
But better way we could just make a refer to a B class object if class B extends class A.
Yes.
Because A refers ro its own A class object, so even after a cast, the subclass B will actually point to a A class object, which is its superclass.
The last code will run fine I guess...
Well I did understand what you explained. finally its the reference variable that decides the assignment type.

A subclass reference cannot refer to a superclass object. That would give a compiler error. But in line 1 a=b.... That means A class reference points to the B class.
So when b=a, at that time a is already pointing to the B object. So indirectly b points to its own object.
Maybe if line 1 was removed, then I could have understood that there would be a compiler error on line 2. If I m wrong then how and how does line 1 and 2 work?
I don't feel that a ClassCastException must be generated.
Because at Line 1 if a=b, then when line 2 runs, b=a literally means that b s pointing again to its own B object because a is already pointing to the same in Line 2.
I feel that the code must run fine. But the answer is not that.
I want to know the flow of the program.
Explanation would be appreciated.
As I mentioned before that the question is from enthuware.
And i am confused about the answer.
please explain.
I would like to get some help for the below question I found in Enthuware exam:



The answer is Line 2.
But I have a query here. Once a is assigned to b then its points to the b object. And in line 3 b=a,therfore b must simply point to the B object only. How can a ClassCastException be generated here?
Thank you Roel for moving this thread in OCAJP group.
I got answers to a lot of my questions.

I am in final year B.Tech now. And my semester begones after a week exactly. Plus we have campus interviews next month and I am zero prepared for that.

So i am trying to give this exam before that.
Was planning to give it in coming week.


And my scores are scaring me.

Standard test 4- 76% only.

:'(
Standard Test 2 - Passed with 82%
Standard Test 3 - Passed but with 81%
Hi Roel,
Sorry for not replying before. My internet connection dies in between!
I am preparing for OCAJP 7. I have have studying from last 1 month using Kathy and Bert's SCJP6 book.
Revised yesterday. Attempting a standard test now. Wish me luck!
Thank you Paul! I am revising again through all the exam topics. Will attempt the next standard test only after revising.