Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

friendly modifier

 
weiliu lili
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the scope of access modifier "friendly" in comparision with protected and default?
"friendly" can be used only as method access modifier, right?
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has no "friendly" keyword/modifier. Default access is package access and is sometimes called friendly access. However, this is not to be confused with the keyword "friendly" in C/C++ as it is a totally different concept.
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"friendly" is not a keyword in Java, as it is in C++.
[ June 07, 2002: Message edited by: Rob Ross ]
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Ross:
"friendly" is not a keyword in Java, as it is in C++.
[ June 07, 2002: Message edited by: Rob Ross ]

And, actually, I believe the keyword in C++ is "friend," not "friendly."
Corey
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I'm no C++ expert
I just no there ain't no such werd as "friendly" in the list of Java
keywords!
[ June 08, 2002: Message edited by: Rob Ross ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic