Search:

Type: Posts; User: pinotje

Search: Search took 0.07 seconds.

  1. Re: The java-output doesn't give the right result?

    I've asked my teacher, he said that if I remove the "synchronized" then I'll get a random result.
    So if I remove "synchronized" then I'll get that random output, if I add "synchronized" then the...
  2. Re: The java-output doesn't give the right result?

    Okay, I'll complain my teacher.... =P
  3. Re: The java-output doesn't give the right result?

    Yup, That's exactly what I'm thinking....
    so maybe it's a little mistake in the school assignment...?

    or maybe I should remove "synchronized" ?
    or maybe adjust the "for-lus" ?
    just an idea....
  4. Re: The java-output doesn't give the right result?

    Hi,

    I'm really sorry, but according to my school assignment, I must do it this way.

    Luckily it is not a lot codes, so I think Java-experts can helping me out without compiling it....

    Thanks!
  5. The java-output doesn't give the right result?

    Hi all,

    This is my code, which I've made for my school assignment:


    public class Main {
    public static void main (String[] args) throws InterruptedException {
    Stand st = new Stand(0);...
Results 1 to 5 of 5