With Twitter4J, We can easily integrate our Java application with the Twitter service.
Click to Download Twitter API
example :Code to update Tweets
............
..........
public static void main(String[] args)throws TwitterException{
Twitter twitter = new TwitterFactory().getInstance(username,password);
Status status = null;
try {
status = twitter.updateStatus(statusInput);
} catch (TwitterException e) {
System.out.println("Exception while updating the status to [" + status.getText() + "].");
e.printStackTrace();
}
System.out.println("Successfully updated the status to [" + status.getText() + "].");