is String Start With Number - Java java.lang

Java examples for java.lang:String Parse

Description

is String Start With Number

Demo Code


//package com.java2s;

public class Main {
    public static boolean isStartWithNumber(String result) {
        boolean isStartWithNumber = result.startsWith("0")
                || result.startsWith("1") || result.startsWith("2")
                || result.startsWith("3") || result.startsWith("4")
                || result.startsWith("5") || result.startsWith("6")
                || result.startsWith("7") || result.startsWith("8")
                || result.startsWith("9");
        return isStartWithNumber;
    }//from   w  w w .j  av a2  s  . co m
}

Related Tutorials