Marc Cracco wrote:Might sound like a beginner question but why shouldn't you access a static variable from a local synchronized method?
This is a problem of DB transactional concurrency control. It could be solved efficiently using optimistic concurrency control (by maintaining a version_id column in the DB table for Seats).
Thread.State[] ts = e.values();
System.out.println(t.getName() + " consumed: " + prod.i);
Ankur Jain Kothari wrote:ok...but what if i want to enter 1 first...then computer asking me to type the second number and then i type 2 and then Enter.? Can this be possible? how can we do this with getchar? here with getchar, it reads the first charachter and then 2nd charachter upon being called again...?
i hope my question is clear