Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can I print out the value of this list without havig to change evrything to static?

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code:



But up in the main method, print(); is underlined and the only way I can get rid of errors is by changing everything to static. How can I print the value of ids out without having to do this.?
 
Rob Spoor
Sheriff
Pie
Posts: 20381
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create an instance?
 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah so its that simple eh?

I just did



Now do I actually need the loadNodes() method in there like I have it (this method is the one that changes the value of ids) or do I just need the prin() method? I would think the former otherwise the values would never get changed, just the print method would be invoked which would return nothing at all right?

I would try myself but the web service that is the data source has been down all weekend so have been pretty restarined with what I can get done this weekend. Bad timing too, I have to have something to show by Wednesday...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I favor a method called "print" not be making a web service call - that would be confusing. I think what you have is good.

In terms of testing, it's a good practice to create a "mock" for the web service part so you can test without an actual web service.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic