Get the string representation of the Package
String toString()
- Returns the string representation of this Package.
public class Main {
public static void main(String[] args) {
Package p = Package.getPackage("javax.swing");
System.out.println(p.toString());
}
}
The output:
package javax.swing, Java Platform API Specification, version 1.6