Print Java version using System.getProperty

Below is Java Program to print Java Version

public class SystemEg {

	public static void main(String args[])
	{
		String version = System.getProperty("java.version");

		System.out.println("Java Version:"+version);
	}
}

Leave a Reply