• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

new SCJP in town :)

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chandra...
You're right pal...the bug is fixed now

Thanks
Shyam
 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
Frankly speaking,i draw diagrams to take decisions whether
an object ref. conversion or casting is valid or not.I am
finding it difficult to put it in words
(I can explain it within no time to a person sitting next to
me).I have put my best efforts but still am not satisfied
whether it will be easy to understand.Please give me feedback,
which part i have not written clearly,i will quickly try to
better it.Also this is not a topic which you should try to
grasp in 15 minutes.Take breaks in between otherwise it will
be very boring.
regards,
leena
(next message is about obj. ref. conversion)
(after that is obj. ref. casting)
all the best
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(please do not read completely in 1 day)

(i guess i am a very bad writer )

[This message has been edited by leena rane (edited November 10, 2001).]
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now we come to object reference casting
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Leena you should save this for a Book !
Seriously I like youre approach and find this easier to follow than most books on the subject
thanks for helping all those studying Jim
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We come to the end of torture
summary:
1.object reference conversions:
done completely at compile time
none of the 9 rules should be violated,then it compiles.
(while applying rules just look at LHS and RHS types not the
actual object type-which could be totally different than the LHS
and RHS type)
If it compiles then it is definitely going to run//u know why-
done entirely at compile time
2.object reference casting:
a.compile time check->10 rules satisfied then compilation
successful else compile time error
(while applying rules just look at LHS and RHS types not the
object type-which could be totally of different than the LHS and
RHS type)
if it compiles->
b.run-time check:
do what i have said between ****
i.e we actually have to bother what type is the object of
irresective of what type is on RHS.Replace(imagine) RHS type
with some reference of the type,of which the object is actually
of.
Do not change LHS type.
Now ask this question to yourself->can the LHS type point to the
imaginary RHS type
to get the answer to this apply conversions rule
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jim Petersen:
Leena you should save this for a Book !
Seriously


Jim,
I had a good laugh reading your comment
Thanx a lot.
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ChandraShekhar,
I am extremely sorry,i could not reply your mails.
Let me answer one of your question:
You said you had difficulty remembering operator
precedence,right!!
Let's look at this story from my latest novel
There was a boy named Annar
There was a girl named Arithma shift
both developed a relationship
Finally they got married and bought a house.
One day,there was fire in the house.
The reason of the fire was unclear.
Was that due to bit of short circuit in the house?
Alas,all became = to ash.
Everything was over

The story(the biggest flop) in short:
(now remember only this - forget the bigger story)

Now let's see the casting for the roles:

I hope this will help you,
regards,
leena.

[This message has been edited by leena rane (edited November 08, 2001).]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ha ha! I like that...
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Leena,
thanks for the explaination. I liked your sense of humor . Now it is easy to remember. Good going.
In your notes on Object reference and casting above, you mixed up primitive conversion & casting with Object conversion and casting. I guess you can give example of Object conversions and casting as given in RHE. And a note on primitive ones aswell. That would be great.

Best Wishes,
Chandra!
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by chandrashekar munukutla:
Now it is easy to remember.


Happy to know it helped you


In your notes on Object reference and casting above, you mixed
up primitive conversion & casting with Object conversion and
casting.


No i don't think i have mixed up primitive and object conversion
and casting.Every use of an example is intentional,to
simplify some point.I don't know whether you would agree with
this.(off course if anybody feels,it is breaking the link in
reading,please tell me,i shall delete them)


I guess you can give example of Object conversions and casting
as given in RHE. And a note on primitive ones aswell. That
would be great.


RHE is more than sufficient for primitive conversions and
casting.If you are finding any trouble ,do let me know.
regards,
leena.
 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats, Leena. You deserve it.

------------------
Donald Nunn
Sun Certified Programmer for the Java� 2 Platform
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations. You have learned a lot.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi leena,
See below. you have described Object Conversion using primitives. I agree that you have used it to make things easier but( you have used it).
I appreciate your help in putting up this wonderful notes and the Operator assignment one with easy explaination. thank you.
(In your first post, Under) object reference conversions

I guess any person who read this post might be intelligent enough to note this. But for those who haven't, I just wanted to highlight this.
This is just my personal opinion. You need not delete your post. It is good.
I know that RHE is good enough. I am fine with Conversion and Casting.
regds,
Chandra!

------------------
Where there is a Will, there is a Way.
 
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
congratulations , Leena. Great score. All the very best for the future.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Leena,
After reading your notes on Collections and Reference conversion & Casting, I find myself very clear on those topics. If you find time could you post your notes on I/O? Thank you very much.
Congrats on passing with an excellent score! Best wishes for your future.
Regards,
Malar.
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Malar,
I am happy to know that my notes helped you.
As i am giving another exam soon,i have a little problem with
time.But i would like to put some notes on thread and i/o as
soon as it is possible and i would be very happy if i can help
anybody preparing for SCJP.In the mean time i hope you have gone
through some tips on i/o preparation that i have given on page 1.
All the best for your preparation
Chandrashekhar,
I will hopefully improve my writing skills soon
1 thing for sure,i like writing a lot.
All the best for SCJP
Shailesh,
thanx a lot for the wishes,
nice to hear from you after so long
all the best for your future
Donald,
thanx for the wishes,
you deserve a pat on your back (AS400 to java)
regards,
leena.

[This message has been edited by leena rane (edited November 15, 2001).]
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marilyn deQueiroz:
Congratulations. You have learned a lot.


Thanx a lot Marilyn.
getting this comment from a sheriff - biggest gift for me from
javaranch.Your comment has indeed encouraged me a lot.
Thanx again,
regards,
leena

 
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always had a dream on dating with a SCJP girl from Mumbai :P ....Leena lets have some coffee we can discuss more on advance java topics

Congratulations on your awesome score
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic