Java - Get Java Specification Version using System Class in Java.


IncludeHelp 19 July 2016

In this code snippet we will learn how to get Java Specification Version Name using System class in Java. Java provided System class, by using getProperty() method of System class with "java.specification.version" parameter we can access the Java Specification Version Name.

Java Code Snippet - Get Java Specification Version Name using System Class

//Java - Get Java Specification Version using System Class in Java.

public class GetJavaSpecificationVersionName{	

	public static void main(String args[]){
		  String javaSpecificationVersion="";
		  
		  javaSpecificationVersion=System.getProperty("java.specification.version");
		  System.out.println("Current Java Specification Version is: " + javaSpecificationVersion);		 
	  }
}
    

    Current Java Specification Version is: 1.8



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.