Z
Z
Zaur Abdulgalimov2016-05-18 17:01:43
Java
Zaur Abdulgalimov, 2016-05-18 17:01:43

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

Please tell me if it is possible to create your own namespace and specify an access modifier using it. For example, in ActionScript, you could create namepsace mySpace = "ru.domain.space";
and then use it as an access modifier to methods or class fields:

class A
{
    use namespace mySpace;
    mySpace var a:int
    mySpace function f():int {return a;} 
{

Is there something similar in Java?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fat Lorrie, 2016-05-18
@Free_ze

The role of namespaces in Java is played by packages. The role of the user is import.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question