Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**
     * You can verify which runtime is in use by calling System.getProperty("java.vm.version").
     * If ART is in use, the property's value is "2.0.0" or higher.
     * @param java_vm_version "getProperty("java.vm.version")"
     */
    public static String getVMType(String java_vm_version) {
        if (java_vm_version.startsWith("2.")) {
            return "ART";
        }
        return "Dalvik";
    }
}