Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static boolean isMSIEOld(String userAgent) {
        if (userAgent.contains("MSIE ") && !userAgent.contains("Opera")) {
            int index = userAgent.indexOf("MSIE ");
            int start = index + "MSIE ".length();
            int end = userAgent.indexOf('.', start);
            int version = Integer.parseInt(userAgent.substring(start, end));
            return version < 9;
        }
        return false;
    }
}