• java判断姓是否合格 千家姓


    package com.sycx.domain;
    
    import java.lang.reflect.Array;
    
    public class FirstName {
        
        public static boolean ClearName(String name){
            String[] surName = {
                    "","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","羿","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","宿","","怀","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","寿","","","","",
                    "","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","",
                    "","","","广","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","万俟",
                    "司马","上官","欧阳","夏侯","诸葛","闻人","东方","赫连","皇甫","尉迟","公羊","澹台","公冶","宗政","濮阳","淳于",
                    "单于","太叔","申屠","公孙","仲孙","轩辕","令狐","钟离","宇文","长孙","慕容","司徒","司空","","","",
                    "叶赫那拉","","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","章佳","那拉","","","","","依尔根觉罗","依尔觉罗",
                    "萨嘛喇","赫舍里","额尔德特","萨克达","钮祜禄","他塔喇","喜塔腊","讷殷富察","叶赫那兰","库雅喇","瓜尔佳",
                    "舒穆禄","爱新觉罗","索绰络","纳喇","乌雅","范姜","碧鲁","张廖","张简","图门","太史","公叔","乌孙",
                    "完颜","马佳","佟佳","富察","费莫","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","线","","","","","","","","","","",
                    "","","","","","","","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","鹿","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","","","","","","","","",
                    "","","","","第五","","","","","","","",
                    "南宫","","","","","","","西门","东门","左丘","梁丘","",
                    "","","","","","微生","羊舌","","","呼延","南门","东郭",
                    "百里","","","","","","","","谷梁","宰父","夹谷","拓跋",
                    "壤驷","乐正","漆雕","公西","巫马","端木","颛孙","子车","","","司寇","亓官",
                    "鲜于","锺离","","","","","","","","","","闾丘",
                    "公良","段干","","","","","","","","","","","","","","","","","","","","","","",""
                    }; 
            
            String firstName = name.substring(0,1);
            for(String s : surName){
                String s1 = s.substring(0,1);
                if(s.contains(firstName)){
                    return true;
                }
            }
            return false;
            
        }
        public static void main(String[] args) {
        }
    }
  • 相关阅读:
    Spring MVC国际化
    cvc-complex-type.2.3: Element 'beans' cannot have character [children]
    jstl fmt
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderL
    eclipse 使用tomcat7.0建立Dynamic Web Project 时 web.xml的问题
    JAVA学习(七)__Spring的@Autowired注入规则
    Java中的默认构造函数
    Spring的国际化(转载)
    java工程中不能存在多个数据库连接jar包
    HDU 3265 Posters
  • 原文地址:https://www.cnblogs.com/tnsay/p/5893319.html
Copyright © 2020-2023  润新知