title: Android, couldn't make static getter setter property work?
body: <p>I was trying this ...</p>
  
  <pre><code>public class Info {
      private static Info ourInstance = new Info();
      public static Info getInstance() { return ourInstance; }
  
      private static int currentIndex;
  
      public static void setCurrentIndex(int i) {
          Log.d("DEV", "setter!");
          currentIndex = i;
          // do other work here
      }
  
      public static int getCurrentIndex() {
          Log.d("DEV", "getter!");
          return currentIndex;
      }
  
      private Info() {
          Log.d("DEV", "class initialized no problem...");
          currentIndex = 42; // just doesn't work, only sets the field
      }
  
  }
  </code></pre>
  
  <p>in any other class...</p>
  
  <pre><code>Info.currentIndex = 666; // just doesn't work
  </code></pre>
  
  <p>It just doesn't work - what could the problem be?  Tried everything.</p>