code: public static void main(String[] args) throws TwitterException {
          TwitterStream twitterStream = new TwitterStreamFactory().getInstance().addListener(new RawStreamListener() {
              @Override
              public void onMessage(String rawJSON) {
                  System.out.println(rawJSON);
              }
  
              @Override
              public void onException(Exception ex) {
                  ex.printStackTrace();
              }
          }).sample();
      }
docs: Main entry of this application.
  
  @param args arguments doesn't take effect with this example
  @throws TwitterException when Twitter service or network is unavailable