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 LunarView.java 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. }
  6.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


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...
ahottev
Freshman
Freshman
 
Posts: 2
Joined: Mon Jan 31, 2011 4:42 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 28 guests