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 {
    private static final char[] UpperCases = "ABCDEFGHIJKLMNOPQRSTWVUXYZ".toCharArray();

    public static boolean isFirstUpperCase(String target) throws NullPointerException {
        if (target == null)
            throw new NullPointerException();
        final char c = target.charAt(0);
        for (int i = 0, size = UpperCases.length; i < size; i++) {
            if (UpperCases[i] == c) {
                return true;
            }
        }
        return false;
    }
}