It is currently Thu Oct 18, 2018 12:30 pm Advanced search

Java starter question

Topics about starter packages, visualizer or any other third party tools.
Please submit new language requests in the Language Request Forum.

Java starter question

Postby Tovi7 » Sat Nov 12, 2011 1:24 pm

Hi, I'm gonna ask a real dumb question, but for some reason I can't find the right answer to this.

I've downloaded the java starter kit, and I'm trying to wrap my head around to how it works.

Basically I need to know whether the server will execute a new instance of my application each time it gives me a new turn, or whether it somehow reuses a previous instance.

The thing is though, doing some debugging I would say that it reuses my code. However, I can't for the life of me figure out how this mechanism works.

I see that it uses System.in, but the only part of the code where System.in is read is in the AbstractSystemInputReader.readSystemInput() method, which is only called in the main() method, and nowhere else (unless my IDE is lying to me ofcourse ;) )

Could someone help me out here? I want to refactor the entire starter pack, but I need to know how it works first :p
Tovi7
Cadet
 
Posts: 2
Joined: Sat Nov 12, 2011 1:20 pm

Re: Java starter question

Postby Tovi7 » Sat Nov 12, 2011 2:30 pm

Ok never mind, please close this thread. :p

It's just a while loop in the readSystemInput method. I was not used to this way of programming :)
Tovi7
Cadet
 
Posts: 2
Joined: Sat Nov 12, 2011 1:20 pm


Return to Starter Packages & Tools

Who is online

Users browsing this forum: No registered users and 3 guests

cron