• Post Reply Bookmark Topic Watch Topic
  • New Topic

java public access modifier  RSS feed

 
Jyo Dandamudi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
can some one tell me if a class say A and a particular member in the class are declared public , then can some other class access the public members of A without inheriting A
Thank you
 
Sachin Adat
Ranch Hand
Posts: 213
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi jyotsna dandamudi and Sri Chinna welcome to Javaranch,

can some one tell me if a class say A and a particular member in the class are declared public , then can some other class access the public members of A without inheriting A


Yes but why dont you try it yourself? Its the best way to learn.

And both of you please take some time to read the Ask Good Questions link below.


Hope this helps
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!