Java Class getPackage() MethodThe getPackage() method of java Class class returns the package name of the class. SyntaxParameterNA ReturnsThe int representing the modifiers for this class. ThrowsThe package of this class. Example 1Test it NowOutput: Class ::: java.lang.Integer Package ::: package java.lang, Java Platform API Specification, version 1.8 Example 2Test it NowOutput: Class java.util
Next TopicJava Class
|