Cet article concerne principalement la génération de codes Java pour les noms, les numéros de téléphone mobile et l'adresse. Si vous me demandez ce que c'est, je ne sais pas, pratiquez-vous.
Générez des données de test au hasard
Importer java.util.hashmap; import java.util.map; / ** * générer au hasard le nom chinois, le genre, le courriel, le numéro de téléphone mobile, l'adresse * @Author X-Rapido * / classe publique RandomValue {public static string base = "ABCDEFGHIJKLMNOPQRSUVWXYZ0123456789" Qiansun Li Zhou Wu Zheng Wang Feng Chen Chu Wei Jiang Shen Han Yang Zhu Qin You Xu He Lu Shi Zhang Cao Yan Hua Jin Wei Tao Jiang Qi Xie Zou Yu Bo Water Dou Zhang Yun su Pen Ge Xi fan peng Lang Lu wei Change Miao Fleend Flower Fang Tang fei lian cen xue lei cong ni tang teng yin luo bi hao wu an souvent heureuse Liang du Ruan Lan Min Xi Ji Maqiang Jia Lu Lou Jiang Face Guo Mei Shenglin Dioo Zhong Xu Qiu Luo Gao Xia Cai tian fan hu Ling Hu Wan Branch Ke Jiu Manager Lu Mo Jing Fang Qiu Mi Wang Jian Qing Zheng Xuan Ding Ben Deng No Gong Cheng Ji Xing Hua Pei Lu Rong Weng Xunyang Yu Zhen Wei Geng Wei Geng Yi Chu Jin Ji Jin Songjing Duan Fu Wu Wu Jiao Ba Bow Mu Wei Valley Car Hou Mi Peng Quan Xi Ban Yang Qiu Zhong Yi Palace Ning Qiu Lunfeng Gan Li Rong Zu Wu Fu Liu Jiang Zhan shu long ye xun si shao gao li ji mince sceal su bai huai putai de e suo xian zhi lai zhuo lin tu meng chi qiao yin yu xu peut être entendu des deux côtés du parti communiste de Chine, Zhai Tan Gong, et Ji Shen, et l'armée a été bloquée par les dirigeants du chef by Yan Ji, Ji Pu, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the country was held in Yan Ji, and the Gongyang Dantai Gongye Zongzheng Puyang Chunyu Zhongsun Taishu Shentu Gongsun Lezheng Xuanyuan Linghu Zhongli Luqiu Changsun Murong Xian Yu Yuwen Situ Sikong Qi Sui Kou Jin Supervisor Ziche Zhuansun Duanmu Wu ma Gong Western Lacqueer dia le zhengran Sigongliang TUOBA Jaufer Jin chu yan fa ru yan tuoqin duan gan baili dongguo nanmen hu yan gui hai yang tong wei xiaosheng yue shuai gate west shang moun mou she yi bo admires nangong moha qiao hu yan aiyang tong tong tong tong tong tong tong tong tong nomanes noms "; String statique privée Girl = "Xiujuan, sage, sage, doux, doux, doux, doux, doux, doux, élégant, jade, rouge, beau, véritable, neige beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful, beautiful boy="weigang, brave, brave, strong army, strong army, and strong army, and bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, bright, La Bright, Bright, Bright, Bright, Bright, Bright, Bright, Bright, Bright, Bright, brillant, vif, vif, vif, lumineux, vif, lumineux, vif, lumineux, vif, lumine Shimei'an Street, Zunyi Road, Xiangtan Street, Ruijin Square, Xianshan Street, Xianshan East Road, Xianshan West Build Xingyang Road, Wenyang Street, Xiucheng Road, Hecheng Building, Jincheng Square, Chongyang Street, Huacheng Road, Kangcheng Street, Zhengyang Road, Heyang Square, Zhongcheng Road Road, Yanyang Street, Qiuyang Road, Shuoyang Street, Qingwei Expressway, Ruiyang Street, Fenghai Road, Shuangyuan Build Fourth Road, Heze Second Street, Heze One Road, Heze trois bâtiments, Guanhai Second Square, Guangxi Branch Street, Guanhai One Road, Jining Branch Street, Juxian Road, Pingdu Square Huangdao Road, Beijing Street, Xinxian Road, Jinan Street, Ningyang Square, Rizhao Street, Dexian Road, Xintai Build Road, Dagu Street, Hongshanxia Branch Road, Xilingxia One Building, Taixi Weiyi Square, Taixi Weiyi Square, Taixi Weiyi Street, Taixi Weiyi Street, Taixi Weiyi Street, Street Taiyi, rue Taixi, Taixi Weiixi, rue Taiyi, rue Taixi. Taixi Weiyi Street, Tuandao Second Road, Tuandao 1st Street, Taixi 3rd Road, Taixi 1st Building, Yuncheng South Road, Tuandao 3rd Street, Liujiaxia Road, Tibet 2nd Street, Tibet 1st Square, Taixi 4th Street, Sanmenxia Road, Chengwu Branch Build Road, Xilingxia Street, Taixi 5th Road, Tuandao 4th Street, Shicun Square, Wuxia Building, Sichuan Road, Shouzhang Street, Jiaxiang Road, Nancun Square, Fanxian Road, Xikang Street, Yunnan Road Guancheng Road, Wenshang Building, Chaocheng Road, Ziyang Street, Zouxian Square, Pu County Street, Cishan Road, Wenshii Street, Tibet Road, Chengwu Build Branch Road, Yan'an First Street, Signal Mountain Road, Xing'an Branch Street, Fushan Branch Square, Hongdao Branch Building, Laiwu 2nd Road, Wuxian 1st Street, Jinkou 3rd Road, Jinkou 1st Square, Fulongshan Road, Yushan Branch Street, Guanxiang 2nd Road, Wuxian Building, LAIWU 1ST SKE Longkou Street, Hengshan Road, Yushan Square, Yexian Road, Fushan Building, Hongdao Road, Changzhou Street, University Square, Longhua Street, Qihe Road, Laiyang Street, Huangxian Road Bâtiment, Qidong Road, Jingshan Square, Longshan Road, Mouping Street, Yan'an Third Road, Yanji Street, Nanjing Square, Donghai East Building, Yinchuan West Road, Haikou Street, Shandong Road, Shaoxing West Build Taipingjiao 1st Street, Ningguo Second Branch Road, Taipingjiao 2nd Square, Tiantai East Road, Taipingjiao 3rd Building, Zhangzhou Road, Zhangzhou Street 2, Ningguo First Square Road, Jiangxi Branch Street, Macau Second Road, Ningguo Fourth Street, Dayao Yi Square, Xianyang Branch Street, Hongzehu Road, Wuxing Second Building, Chenghai Third Road, Tiantai One Square, Xinzhan Second Road, Sanming North Street, Xinzhan Branch Road, Zhanshan Fifth Street, Tazhou Square, Zhan Build Macao Fourth Street, Nanhai Branch Road, Wuxing Third Square, Sanming South Road, Zhanshan Second Street, Erqing XinCun Town, Jiangan Build Weishan Lake Street, Dongting Lake Square, Zhuhai Branch Street, Fuzhou South Road, Chenghai 2nd Street, Taizhou 4th Road, Hong Kong Central Build Île de Wangjiaai, Macau 7th Square, Taizhou 1st Road, Taizhou 6th Street, Dayao 2nd Road, Qingda 1st Street, Minjiang 2nd Square, Minjiang 1st Build Xiuzhan 2nd Road, Xiaoyao 3rd Building, Macau Ninth Plaza, Taizhou 5th Street, Chenghai 1st Road, Macau 8th Street, Fuzhou North Road, Zhuhai 1st Square, Ningguo 2nd Road, Linhuaiguan Build Street, Xiuzhan 4th Road, Juyongguan Street, Shanhaiguan Road, Poyang Lake Building, Xinzhan Road, Zhangzhou Street, Xianyou Road, Hualien Street, Yueqing Plaza, Chaohu Street Street, Shidao Plaza, Yixing Building, Sanming Road, Yangkou Street, Peixian Road, Zhangpu Square, Da Maidao, Taiwan Street, Tiantai Road, Jinhu Building, Kaohsiung Square Square Xianyang, Street Ningde, Longquan Road, Lishi Street, Haichuan Road, Changhua Building, Jintian Road, Taizhou Street, Taihu Road, Nantong Build Queshan Square, Liandao Building, Huayan Road, Chiayi Street, Gutian Road, Nanping Square, Xiuzhan Road, Street change, Road Zhanshan, Xuzhou Build Street Xianju, Pingtung Plaza, Street Xiaowang, Haimen Road, Zhuhai Street, Shanghang Road, Yongjia Building, Zhangping Road, Yancheng Street, Xinpu Road Chang'an South Road, Lingxian Branch Street, Guanxian Branch Plaza, Xiaogang 1 Building, Market 1 Road, Xiaogang 2 Street, Qingping Road, Guangdong Plaza, Xinjiang Road, Boping Street, Gangtong Road Bâtiment, Qiuxian Road, Bohai Street, Enxian Square, Lushun Street, Tangyi Road, Licun Street, Jimo Road, Ganghua Building, Ganghua Road, Gangxia Street, Ganglian Road, Lingxian Build Huimin Street, Wucheng Square, Liaocheng Building, Haibo Road, Cangkou Street, Ningbo Road, Jiaozhou Square, Laizhou Road, Zhaoyuan Street, Guanxian Road, Liumaidou, Jinxiang Warangyan, Linqing Road, Dong'a Street, Dag Road, Dagangyan, Liaoning Road, Diwei 2 Street de Shushuishanan Branch, Wudiwei 1 Plaza, Dagang Wei 3 Street, Dagang Wei 5 Road, Dagang Wei 4 Street, Dagang Wei 4 Street, Dagang Wei 2 Road, Wudi 2 Build Road, Dagang First Square, Wudi 4 Road, Dalian Branch Street, Dagang Second Road, Jinzhou Branch Street, Deping Square, Gaoyuan Building, Changshan Road, Leling Street, Linyi Road, Putai Build Square, Shanghe Road, Rehee Building, Jiyang Road, Chengde Street, Zichuan Square, Liaobei Street, Yangxin Road, Yidu Street, Songjiang Road, Liuting Build Zhangqiu Road, Dandong Street, Huayang Road, Qinghai Street, Taishan Square, Zhoucun Building, Siping Road, Taidong Seventh Street, Taidong East 2nd Road, Taidong East 7th Square Taitung 1st Street, Taitung 2nd Road, Hangzhou Branch Plaza, Inner Mongolia Road, Taitung 7th Building, Taitung 6th Road, Guangrao Branch Street, Taitung Eight Plaza, Taitung 3rd Street, Siping Branch Road Road, Ruiyun Street, Binxian Square, Qingxiang Street, Wanshou Road, Dacheng Building, Furong Road, Licheng Square, Daming Road, Changping Street, Pingding Road, Changxing Street, Pukou Square, Zhucheng Building, Songshan Road, Qinghe Street, Ninghai Road, Weihai Square, Dongshan Road, Qinghe Street, Jiangou Road, Luikoud Building, Songo Square, Changchun Street, Kunming Road, Shunxing Street, Lijin Road, Yangming Square, Renhe Road, Guokou Building, Yingkou Road, Changyi Street, Mengzhuang Square Zhenxing Street, Tonghua Road, Fusi Building, Yixian Road, Shouguang Square, Caoxian Road, Changle Street, Daokou Road, Nanjiushi Street, Taizhan Square, Dongguang Building, TUoFeng Road, Taiping Mountain, Biaoshan Road, Yunxi Square, Taiqing Road ". email_suffix = "@ gmail.com, @ yahoo.com, @ msn.com, @ hotmail.com, @ aol.com, @ ask.com, @ live.com, @ qq.com, @ 0355.net, @ 163.com, @ 163.net, @ 263.net, @ 3721.net, @ ouais.net, @ googlemail.com, @ 126.com, @ sina.com, @ sohu.com, @ yahoo.com.cn ".split (", "); public static int getNum(int start,int end) {return (int)(Math.random()*(end-start+1)+start);}/** * Return to Email * @param lMin Minimum length* @param lMax Maximum length* @return */public static String getEmail(int lMin,int lMax) {int length=getNum(lMin,lMax);StringBuffer sb = new StringBuffer (); pour (int i = 0; i <longueur; i ++) {int Numéro mobile * / chaîne statique privée [] telfirst = "134,135,136,137,138,139,150,151,152.157,158,159,130, 131,132,155,156,133,153" .split (","); private static getTel () {int index = getnum (0, telfirst.length-1); string first = telfirst [index]; string second = string.valueof (getNum (1,888) +10000) .substring (1); String thrid = string.valueof (getnum (1,9100) +10000). Static String name_sex = ""; chaîne statique privée getCheNeName () {int index = getNum (0, firstName.Length () - 1); String First = FirstName.SubString (index, index + 1); int sexe = getNum (0,1); String Str = boy; int length = boy.Length (); if (sex == 0) {Str = girl; Length = girl. "femelle";} else {name_sex = "mâle";} index = getnum (0, longueur-1); string second = str.substring (index, index + 1); int hasthird = getnum (0,1); string tiers = ""; if (hasthird == 1) {index = getnum (0, longueur-1); First + Second + Third;} / ** * Adresse de retour * @return * / private static String getRoad () {int index = getNum (0, road.length-1); String First = Road [index]; String second = string.valueof (getnum (11,150)) + "signe"; String Third = "-" + getnum (1,20) + "-" + getnum (1,10); First + Second + tiers;} / ** * Encapsulation de données * @return * / public static map getAddress () {map map = new hashmap (); map.put ("name", getCineSename ()); map.put ("sex", name_sex); map.put ("road", getroad (); map.put ("tel", gettel (); getEmail (6,9)); retour map;} public static void main (string [] args) {for (int i = 0; i <100; i ++) {System.out.println (getAddress ()); // system.out.println (getEmailName (6,9));}}}}}}}}}}résultat:
Résumer
Ce qui précède est tout le contenu de cet article sur les noms générés au hasard Java, les numéros de téléphone mobile et les exemples de code d'adresse. J'espère que ce sera utile à tout le monde. Les amis intéressés peuvent continuer à se référer à ce site:
Les bases de la programmation Java: imitation du partage de code de connexion utilisateur
Partagez les questions de test de programmation Java de base
Les bases de la programmation Java Network: communication à sens unique
S'il y a des lacunes, veuillez laisser un message pour le signaler.