JAVA檢索簡歷

2021-08-29 16:14:09 字數 1158 閱讀 7844

package findmess;

public class findmess

index= mess.indexof(":",index+1); //mess呼叫indexof(string s,int start)返回字串中第2次出現冒號的位置

string date=mess.substring(index+1,index+11);

system.out.println(date);

index=mess.indexof(":",index+1);

int heightposition= mess.indexof("身高"); //mess呼叫indexof(string s)返回字串中首次出現身高的位置

string personnet=mess.substring(index+1,heightposition-1);

system.out.println(personnet);

index=mess.indexof(":",index+1); //mess呼叫indexof(string s,int start)返回字串中身高後面的冒號位置

int cmposition=mess.indexof("cm");

string height=mess.substring(index+1,cmposition);

height=height.trim();

int h=integer.parseint(height);

if(h>=180)

else

index=mess.indexof(":",index+1);//mess呼叫lastindexof(string s)返回字串中最後乙個冒號的位置

int kgposition=mess.indexof("kg");

string weight=mess.substring(index+1,kgposition);

weight=weight.trim();

int w=integer.parseint(weight);

if(w>=75)

else

}}

輸出結果

簡歷中的姓名姓"張"

1989.10.16

簡歷中的身高185大於或等於180cm

簡歷中的體重72小於75kg

Java基礎簡歷8 Redis

redis資料庫裡面的每個鍵值對都是由物件組成的,其中 資料庫鍵總是乙個字串物件 而資料庫鍵的值可以是字串物件 列表物件 list 雜湊物件 hash 集合物件 set 有序集合物件 sorted set 這五種物件中的一種。比如說建立以下命令將在資料庫中建立乙個鍵為字串物件,值也為字串物件的鍵值對...

立即檢索 延遲檢索 關聯級別檢索 批量檢索

class 標籤中lazy false 立即檢索 class 標籤中lazy true 延遲檢索 詳細看get和load的區別 關聯級別的檢索 customer c customer session.load customer.class,1 set set c.getorders 檢索order物...

java實現二分檢索樹

二分檢索樹的左子樹比根小,右子樹比根大。這裡用二分檢索樹實現了乙個符號表,包括常用的api。package symbolform import structure.queue public class bst,v implements symbolform public node node n ov...