package util;

import java.lang.reflect.Array;

public class FirstName {

    public static boolean ClearName(String name){
String[] surName = {
"赵","钱","孙","李","周","吴","郑","王","冯","陈",
"楮","卫","蒋","沈","韩","杨","朱","秦","尤","许",
"何","吕","施","张","孔","曹","严","华","金","魏",
"陶","姜","戚","谢","邹","喻","柏","水","窦","章",
"云","苏","潘","葛","奚","范","彭","郎","鲁","韦",
"昌","马","苗","凤","花","方","俞","任","袁","柳",
"酆","鲍","史","唐","费","廉","岑","薛","雷","贺",
"倪","汤","滕","殷","罗","毕","郝","邬","安","常",
"乐","于","时","傅","皮","卞","齐","康","伍","余",
"元","卜","顾","孟","平","黄","和","穆","萧","尹",
"姚","邵","湛","汪","祁","毛","禹","狄","米","贝",
"明","臧","计","伏","成","戴","谈","宋","茅","庞",
"熊","纪","舒","屈","项","祝","董","梁","杜","阮",
"蓝","闽","席","季","麻","强","贾","路","娄","危",
"江","童","颜","郭","梅","盛","林","刁","锺","徐",
"丘","骆","高","夏","蔡","田","樊","胡","凌","霍",
"虞","万","支","柯","昝","管","卢","莫","经","房",
"裘","缪","干","解","应","宗","丁","宣","贲","邓",
"郁","单","杭","洪","包","诸","左","石","崔","吉",
"钮","龚","程","嵇","邢","滑","裴","陆","荣","翁",
"荀","羊","於","惠","甄","麹","家","封","芮","羿",
"储","靳","汲","邴","糜","松","井","段","富","巫",
"乌","焦","巴","弓","牧","隗","山","谷","车","侯",
"宓","蓬","全","郗","班","仰","秋","仲","伊","宫",
"宁","仇","栾","暴","甘","斜","厉","戎","祖","武",
"符","刘","景","詹","束","龙","叶","幸","司","韶",
"郜","黎","蓟","薄","印","宿","白","怀","蒲","邰",
"从","鄂","索","咸","籍","赖","卓","蔺","屠","蒙",
"池","乔","阴","郁","胥","能","苍","双","闻","莘",
"党","翟","谭","贡","劳","逄","姬","申","扶","堵",
"冉","宰","郦","雍","郤","璩","桑","桂","濮","牛",
"寿","通","边","扈","燕","冀","郏","浦","尚","农",
"温","别","庄","晏","柴","瞿","阎","充","慕","连",
"茹","习","宦","艾","鱼","容","向","古","易","慎",
"戈","廖","庾","终","暨","居","衡","步","都","耿",
"满","弘","匡","国","文","寇","广","禄","阙","东",
"欧","殳","沃","利","蔚","越","夔","隆","师","巩",
"厍","聂","晁","勾","敖","融","冷","訾","辛","阚",
"那","简","饶","空","曾","毋","沙","乜","养","鞠",
"须","丰","巢","关","蒯","相","查","后","荆","红",
"游","竺","权","逑","盖","益","桓","公","仉","督",
"晋","楚","阎","法","汝","鄢","涂","钦","归","海",
"岳","帅","缑","亢","况","后","有","琴","商","牟",
"佘","佴","伯","赏","墨","哈","谯","笪","年","爱",
"阳","佟",
"万俟","司马","上官","欧阳","夏侯",
"诸葛","闻人","东方","赫连","皇甫",
"尉迟","公羊","澹台","公冶","宗政",
"濮阳","淳于","单于","太叔","申屠",
"公孙","仲孙","轩辕","令狐","锺离",
"宇文","长孙","慕容","鲜于","闾丘",
"司徒","司空","丌官","司寇","南宫",
"子车","颛孙","端木","巫马","公西",
"漆雕","乐正","壤驷","公良","拓拔",
"夹谷","宰父","谷梁","段干","百里",
"东郭","南门","呼延","羊舌","微生",
"梁丘","左丘","东门","西门"
}; String firstName = name.substring(,);
for(String s : surName){
String s1 = s.substring(,);
if(s.contains(firstName)){
return true;
}
}
return false; }
public static void main(String[] args) {
String name = "张三";
System.out.println(ClearName(name));
}
}

java判断姓是否合格 百家姓的更多相关文章

  1. java判断姓是否合格 千家姓

    package com.sycx.domain; import java.lang.reflect.Array; public class FirstName { public static bool ...

  2. 使用Java判断字符串中的中文字符数量

    Java判断一个字符串str中中文的个数,经过总结,有以下几种方法(全部经过验证),可根据其原理判断在何种情况下使用哪个方法: 1. char[] c = str.toCharArray(); for ...

  3. Java判断回文数算法简单实现

    好久没写java的代码了, 今天闲来无事写段java的代码,算是为新的一年磨磨刀,开个头,算法是Java判断回文数算法简单实现,基本思想是利用字符串对应位置比较,如果所有可能位置都满足要求,则输入的是 ...

  4. Java 判断操作系统类型(适用于各种操作系统)

    Java 判断操作系统类型(适用于各种操作系统) 最近一段时间写一个授权的程序,需要获取很多信息来保证程序不能随意复制使用,必须经过授权才可以. 为了限制用户使用的操作系统,必须有统一的方法来获取才可 ...

  5. java判断字符串是否为空的方法总结

    http://blog.csdn.net/qq799499343/article/details/8492672 以下是java 判断字符串是否为空的四种方法: 方法一: 最多人使用的一个方法, 直观 ...

  6. Java判断字符串是中文还是英文

    在做开发的时候我们经常需要用到根据某个字符或者字符串来判断其是中文还是英文,从而做相应的处理,其实不难,大多数人们都是用到正则来判断的,下面小贝就给大家分享一下Java判断字符串是中文还是英文 推荐文 ...

  7. (转)java判断string变量是否是数字的六种方法小结

    java判断string变量是否是数字的六种方法小结 (2012-10-17 17:00:17) 转载▼ 标签: it 分类: 转发 1.用JAVA自带的函数 public static boolea ...

  8. JAVA判断32位还是64位,调用不同的DLL(转)

    源:JAVA判断32位还是64位,调用不同的DLL 通过获取sun.arch.data.model可判断是32还是64的JAVA 将32或者64位的DLL放不同的目录,实现自适应调用DLL Prope ...

  9. java判断是否为汉字

    java判断是否为汉字   public static boolean isChinese(String str) { String regEx = "[\u4e00-\u9fa5]&quo ...

随机推荐

  1. [转载]JDBC读写Oracle的CLOB、BLOB

    JDBC读写Oracle10g的CLOB.BLOB http://lavasoft.blog.51cto.com/62575/321882/ 在Oracle中存取BLOB对象实现文件的上传和下载 ht ...

  2. unity调用C++ dll文件

    首先建立Plugins文件夹,把dll文件放在里面 一一对应,我踩的坑是文件名加了后缀.dll,虽然不知道网上为什么都加了我这加了就报找不到dll文件错误,反正解决啦

  3. jquery——简单的下拉列表制作及bind()方法的示例

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  4. 解决:easygui.msgbox("Hello there!")报错:Tcl_Init error: Can't find a usable init.tcl in the following directories问题的解决

    今天学习<父与子的编程之旅>,当看到运行第一个gui时(代码如下): import easygui easygui.msgbox("Hello there!") 发现报 ...

  5. json与NSString转换

    json to string NSData *jsonData = [NSJSONSerialization dataWithJSONObject:json options:NSJSONWriting ...

  6. 关于使用java开发Mis系统的相关内容。

    怎样使用java编程语言开发一个小型的信息管理系统,首先我们要知道用什么样的方法来开发这一系统. 1.java简单基础知识: (1)Java的三种技术架构: 1)JAVAEE:Java Platfor ...

  7. vue cli关闭eslint严格语法检查

    eslint是一个JavaScript的校验插件,通常用来校验语法或代码的书写风格. 官方文档:https://eslint.org 这篇文章总结了eslint的规则:Eslint规则说明 1.关闭e ...

  8. Redis中redis.conf配置总结

    redis.conf 配置项说明如下:1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程  daemonize no2. 当Redis以守护进程方式运行时,Re ...

  9. Java_数据交换_JAXB_用法入门

    一.前言 最近有个需求,需要进行xml 与 bean 的相互转化. 使用 JAXB 可完成这个需求. 二.概述 JAXB(Java Architecture for XML Binding) 是一个业 ...

  10. ACM提交,C++,G++,C,GCC的区别

    今天做了一道水题,POJ-1004,水题一个,12个double类型的数求平均数 但是, #include <iostream> #include <cstdio> using ...