猿问

Java 等效于 c# this.GetType().Namespace

哪个是 c# 的 java 等价物

this.GetType().Namespace

获取包含该类的包名称?


芜湖不芜
浏览 189回答 1
1回答

千万里不及你

这是一个类的包:Package myPackage = getClass().getPackage(); // or from a static context:Package myPackage = MyClass.class.getPackage();作为字符串:String packageName = getClass().getPackage().getName();// or from a static context:String packageName = MyClass.class.getPackage().getName();
随时随地看视频慕课网APP

相关分类

Java
我要回答