title: How to use a abstract method in a class in my android activity?
body: <p>I am always bad in java. Could please give me any idea about the following situation?</p>
  
  <p>I have a standalone java class which has an abstract method. Code as follows</p>
  
  <pre><code>public class MyLocation{
  
  public boolean getLocation(Context context, LocationResult result)
  {
  -----------------------------------
  Some code here
  -----------------------------------
  }
  
  public static abstract class LocationResult{
          public abstract void gotLocation(Location location);
      }
  }
  </code></pre>
  
  <p>Now I have to use the above class in my activity to get the location. I am not sure how to use this to get the current location by using the above class. Please help me. It will be better if you can provide some example code. I am not able to understand the abstract things in java.</p>