LunarLander example question.

Put your problem here if it does not fit any of the other categories.

LunarLander example question.

Postby ahottev » Wed Feb 09, 2011 6:16 pm

So, i was browsing it and came across some code i've never seen before in Java (admittedly, i'm relatively new to it)

It's inside the file, in the inner class LunarThread. A lot of methods start like this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public void doStart() {
  2.             synchronized (mSurfaceHolder) {
  3.             ...
  4.     }
  5. }
Parsed in 0.020 seconds, using GeSHi

What is exactly that piece ( synchronized (mSurfaceHolder) { } ) ?

It looks like a method inside a method, but without a name and return value. Sorry if it's a dumb question, but i can't seem to figure it out on my own...
Posts: 2
Joined: Mon Jan 31, 2011 4:42 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 10 guests