title: unable to get fragment context? showing unreachable code
body: <p>Unable to get fragment context while running application,showing unreachable code. I have created the <code>DatabaseHelper</code> parameterized constructor with context.</p>
  
  <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      View view = inflater.inflate(R.layout.fragment_direct_search,container,false);
  
      try {
          myDbHelper.createDataBase(getActivity());
      } catch (IOException e) {
          e.printStackTrace();
      }catch(SQLException sqle){
          throw sqle;
      }
  
  
      try {
  
          myDbHelper.openDataBase();
  
      }catch(SQLException sqle){
  
          throw sqle;
  
      }
      Toast.makeText(getActivity(), "Successfully copied...", Toast.LENGTH_SHORT).show();
  
      listview=(ListView)view.findViewById(R.id.listView);
      populateListView();
                   return view;
  }
  </code></pre>
  
  <p>this is my <code>DatabaseHelper()</code> constructor in <code>DatabaseHelper</code> Class :</p>
  
  <pre><code>     public DatabaseHelper(Context context) {
  
      super(context, DB_NAME, null, 1);
      this.myContext = context;
      DB_PATH = "/data/data/" + context.getPackageName() + "/" + "databases/";
  }
  </code></pre>
  
  <p>getting following error while running the application that is unreachable code. error is occuring at the following line : </p>
  
  <pre><code> myDbHelper.createDataBase(getActivity());
  
   error : unreachable code
  </code></pre>