• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i am a java tyro, and i need to know how Encapsulation and Abstraction are different from each other and if no , why?
with thanks,
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

I don't know what a "tyro" is, but this sounds like a homework question. Why don't you tell us what your best answer is, and we'll help you refine it.

I'm guessing you have some sort of Java book (with an index). If not, searching the internet for these words should get you started.
[ December 29, 2007: Message edited by: marc weber ]
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still yet, dont know which one is Hiding details and which one is providing details, Encapsulation and Abstraction, i read a book which says "Encapsulation is Information Hiding, yet another book Says its providing,and vise versa, if both exhibit the same actions then why not using only one?? for Instance Encapsulation only !!
please, Ranchers i need your help !!
thanks
 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
marc weber ammar dobaee is now TheOldMan Loves Java
waiting for reply,
thank you
 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And by the way a tyro means Beginner !!!
love,
 
Marshal
Posts: 79174
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by TheOldMan Loves Java:
marc weber ammar dobaee is now TheOldMan Loves Java
waiting for reply,
thank you

I trust you saw the naming policy when you signed up; you will have to change your display name to match.

And please wait for longer than two minutes before you say things like "waiting for reply."
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by TheOldMan Loves Java:
marc weber ammar dobaee is now TheOldMan Loves Java
waiting for reply,
thank you


"TheOldMan Loves Java,"

Welcome to JavaRanch!

Please revise your display name to meet the JavaRanch Naming Policy. To maintain the friendly atmosphere here at the ranch, we like folks to use real (or at least real-looking) names, with a first and a last name.

You can edit your display name here. Thank you for your prompt attention!

-Marc
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by TheOldMan Loves Java:
...i read a book which says "Encapsulation is Information Hiding, yet another book Says its providing,and vise versa...


I think "hiding" and "providing" can go hand in hand. Encapsulation primarily involves hiding and protecting data by making fields private. But if there's a need for that data to be accessible, then it's also about providing information through non-private "getter" methods. For example...

Here are some good starting points:
  • Wikipedia - Encapsulation
  • Wikipedia - Abstraction (especially the subtopic, Abstraction in object oriented programming, which relates back to encapsulation)

  • [ December 30, 2007: Message edited by: marc weber ]
     
    Ammar Salem
    Ranch Hand
    Posts: 60
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thank you everyone, for letting me know about the naming policy, i was not really aware, now my screen name involves my real name.
    thank you again,
    looking forward for your kind help in learning java.
    thank you
     
    Ranch Hand
    Posts: 3389
    Mac MySQL Database Tomcat Server
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Ammar Salem:
    Thank you everyone, for letting me know about the naming policy, i was not really aware, now my screen name involves my real name.
    thank you again,
    looking forward for your kind help in learning java.
    thank you



    That's great. That's what the people here are for!
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic