This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Access Modifier Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Access Modifier

Viswas Kumar
Greenhorn

Joined: Sep 29, 2002
Posts: 4
what is the differnce between public and friendly access modifier?


viswas
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
There is no friendly access modifier in Java opposite to C++. You have private, protected, public and default (or package).
A default modifier is used like that:

which defines a package protection. All the classes in the package javaranch have access to the titi method.
W.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome back to JavaRanch.
You already asked this question here. Take a look at the responses your previous post generated and if you have further questions on the topic, please post them in that thread. We try not to have multiple threads concerning the exact same topic as it quickly becomes difficult to follow the conversation. So, I'm closing this thread.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Access Modifier
 
Similar Threads
Constructors
access specifier and access modifier
Access specifiers & Access Modifiers
Overriden Method Query
basic question on access modifiers and levels