+1  A: 

The code you posted is different than what I've seen in the past for connecting. I think (though I'm not sure) that oAuth is the preferred way of authenticating now.

Here's a blog that details using oAuth to connect.

Allain Lalonde
and another: http://marvinlee.net/blog/2010/03/free-java-twitter-api-twitter4j-and-oauth/
Allain Lalonde
+1  A: 

Yes, your authentication is not working because Twitter made some recent changes regarding how it lets 3rd party code authenticate.

In other words, Basic authentication has been turned off for the API.

As Allain mentions, oAuth is the way to go.

Jason Leveille
Instead of passing id It will work or not ?
Vaibhav Bhalke