Hi ankiwalia and welcome to Daniweb :)
Your SQL syntax is incorrect. Instead of this:
String query="select username and password from Registeredusers";
Try this:
String query="select username, password from Registeredusers";
darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200