beginJsp2.0外文书籍源代码

源代码在线查看: userlist.java

软件大小: 228 K
上传用户: GUAIGUAICHENGTI
关键词: beginJsp 2.0 书籍 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.wrox.secure;
				
				import java.util.*;
				
				class UserList
				{
				    
				  private Vector list = new Vector();
				  
				  public UserList()
				  {
				    list.add(new User("Erick","tomcat"));
				    list.add(new User("SevenOfNine","regayov"));
				    list.add(new User("Kirk","esirpretne"));
				  }
				  
				  public boolean isValidUser(User user)
				  {
				    
				    for(int iCount = 0; iCount < list.size(); iCount++)
				    {
				      User temp = (User)list.get(iCount);
				      if(user.getUserName() == temp.getUserName() 
				         && user.getPassword() == temp.getPassword())
				        return true;
				      else
				        return false;
				    }
				    return true;
				  }
				  
				}
							

相关资源