Can anyone please explain what is 'public' and 'private' in oop and specifically in java?
I am a bit confused.
kangkan_14 0 Newbie Poster
Recommended Answers
Jump to PostIf you are researching scope of variables etc. It would also suit you well to understand static methods and variables.
http://download.oracle.com/javase/tutorial/java/javaOO/classvars.html
Jump to PostIt would probably be a mistake to think of "public"and "private" as relating in some way to the distinction between global and local scope. The notion suggests a bit of confusion about object-oriented programming. Public and private fields of a class are all "global" in that they can be called …
All 6 Replies
ajst 18 Junior Poster
kangkan_14 0 Newbie Poster
ajst 18 Junior Poster
Akill10 96 Posting Pro
jon.kiparsky 326 Posting Virtuoso
kangkan_14 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.