Is it possible in Java to create a private access modifier?

Please tell me whether you can create your own namespace and use it to specify the access modifier. For example, in ActionScript you can create a mySpace namepsace = "EN-us.domain.space";
and then use it as an access modifier to methods or fields of a class:
class A
{
 use namespace mySpace;
 mySpace var a:int
 mySpace function f():int {return a;} 
{

Is there something similar in Java?
Thank you.
July 9th 19 at 13:19
1 answer
July 9th 19 at 13:21
The role of namespaces in Java run packages. The role of SW - import.
be Java 9, the so-called Project Jigsaw - charity84 commented on July 9th 19 at 13:36
: Very sad if it's true. - Elna.Volkman92 commented on July 9th 19 at 13:39
why? - charity84 commented on July 9th 19 at 13:42
In ActionScript, too, there are packages and import that. AS you can do to set a public class but some of its methods/fields to make hidden with your namespace. For example I'm writing a library in which I want to access methods/fields of a class from another package (within one library), but to methods/fields are not visible to clients of this library(outside the library). - Kassandra.Williamson commented on July 9th 19 at 13:24
: this is contrary to the PLO and in the Java world is considered heresy.
In C++ there is an approximate analogue of the destroyer encapsulation - friend. But it is also not particularly favor. - Elna.Volkman92 commented on July 9th 19 at 13:27
: and no method is available for the current package and all sub packages? - Kassandra.Williamson commented on July 9th 19 at 13:30
No, but you can make access only for the level type (the same) package. - Elna.Volkman92 commented on July 9th 19 at 13:33
: Because without this mechanism, life is beautiful and to "the reader" such communication is not particularly obvious. - Elna.Volkman92 commented on July 9th 19 at 13:45

Find more questions by tags Java