
December 9th, 2007, 10:42 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 1
Time spent in forums: 18 m 49 sec
Reputation Power: 0
|
|
|
Array help
ok so i have a class that i want to put into an array that holds 2 pieces of information. It holds the persons username and password. i can make the class so you can tell me how to make the array
Code:
public class user
{
private String username;
private String password;
public user(String usern, String pass)
{
username = usern;
password = pass;
}
public boolean tryLogin(String usern, String pass)
{
boolean r = false;
if ((usern != username) || (pass != password))
r = false;
else
r = true;
return r;
}
}
|