If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Then I create a page where the username and the password are going through and the above class is just validate. If the state is true the user will be redirected to another page; however, I don't know how to call the state attribute and put it in an if statements. I create an object and call the validate method know I want to create and if statement .
ValidateLogin v = new ValidateLogin();
v.validate(username, password);
if(state = true) //HOW DO I CALL THIS ATTRIBUTE THAT IS IN ANOTHER CLASS?
redirect to page

I had the same problem. In order to modify variables from different classes, I made them extend the class they were to modify. I also made the super class's variables static so they can be changed by anything that inherits them. I also made them protected for more flexibility.