0

Im using the getURLEntities() (twitter 4 j)

    b.getURLEntities().toString();

instead of getting the url entities, i m getting console output which looks something like:

[Ltwitter4j.URLEntity;@ccd249 [Ltwitter4j.URLEntity;@101f287 [Ltwitter4j.URLEntity;@d9973a [Ltwitter4j.URLEntity;@1578426 [Ltwitter4j.URLEntity;@a4effe

robthewolf
  • 7,343
  • 3
  • 29
  • 29
adamantium
  • 25
  • 5

1 Answers1

4

check the documentation again.

The getURLEntities() method returns an array of URLEntity

URLEntity[] urls = b.getURLEntities();

If you want to output this properly the best thing to do it use a loop

for(URLEntity url : urls){
  System.out.println(url.getURL());
}
robthewolf
  • 7,343
  • 3
  • 29
  • 29