MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

/*
 * Output:
     
 */

public class MainClass {
    public static void main(String[] args) {
        Package p = Package.getPackage("javax.swing");
        System.out.print("Swing Version: ");
        System.out.println(p.getSpecificationVersion());

        p = Package.getPackage("java.awt");
        System.out.print("AWT Version: ");
        System.out.println(p.getSpecificationVersion());

    }
}