How to Access package private Class from a Class in some other package?

后端 未结 10 1276
情歌与酒
情歌与酒 2020-12-13 21:57

I have following classses

Hello.java

package speak.hello;

import java.util.Map;

import speak.hi.CustomMap;
import speak.hi.Hi;

public cla         


        
10条回答
  •  無奈伤痛
    2020-12-13 22:48

    Not possible. The security model is this : a model to provide security :) If you designed class Hi and delivered it to customers with private access, you wouldn't like them to be able to bypass your restrictions, would you?

提交回复
热议问题