1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
/* Get Java Runtime Example This get java runtime examples shows how to get the runtime in which the java application is running. Runtime allows us to interface with the environment in which the current application is running. */ public class GetJavaRuntime { public static void main(String args[]) { /* * Current runtime can be obtained using getRuntime method * of Runtime class. * * getRuntime method is a static method. Application can not * create instance of this class. */ Runtime runtime = Runtime.getRuntime(); } } /* Output of this program would be, Current java runtime obtained! */ |
Add Comment