Update Twitter.java

BUG FIX #1049 in java file