tags:

views:

26

answers:

2

Hallo,

Is there a reason why the Thread class in the SDK LunarLander and JetBoy examples are not each in a separate java file, rather than being inside the View file?

It would make things a bit clearer, IMHO. Am I missing something?

  • Frink
+1  A: 

Look at ReplicIsland source for a different example..

but the first step in thinking about is what is the DVM behavior concerning a class when GC operates between a class in a separate file and a class in another class file..

Fred Grott
DVM? GC? Sorry I'm not fully up to speed with the terminology yet.Also, I'll have a look at ReplicaIsland, but is there any real reason for choosing one style/method over another?
FrinkTheBrave
+1  A: 

They are bother inner classes so it allows them to share global variables

BeRecursive
Ah, so in LunarLander, mContext is declared in LunarView, but used in LunarThread. mContext doesn't appear to be used in LunarView, other than the declaration so it's probably a bad example, but I see the point.
FrinkTheBrave