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 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India