i have to create 3 static username and password with its get and set methods and store in arraylist in bean class.then in servlet i have to perform the following task.1.create bean object.2.call bean method that returns bean object.3.if user is valid then store bean data in request object and redirect user to valid.jsp else invalid.jsp.how to perform this task?
array list in java
Collapse
X
-
Good homework question. What do you have so far in your code?
How is your teacher defining "array list"? Is he/she talking about a two dimension array?
Basically, you should think of a class with data types String username String password. Then have the object methods bean get(),void set(),void store(). Set and store sound the same so I'm not sure why you want both. Then make a bean array for 3 objects.
Comment