title: FindViewById giving Unreachable statement error in Fragment activity
body: <p>I'm pretty new to Fragment based activities. I'm working on a collapsible listview inside the CollapsingToolbarLayout.</p>
  
  <p>Here, I'm facing Unreachable statement error in java file. Not able to get rid of it.</p>
  
  <p>My code -</p>
  
  <pre><code>public class MenuActivity extends android.support.v4.app.Fragment {
  
      ExpandableListAdapter listAdapter;
      ExpandableListView expListView;
      List&lt;String&gt; listDataHeader;
      HashMap&lt;String, List&lt;String&gt;&gt; listDataChild;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          return inflater.inflate(R.layout.activity_booktable, container, false);
  
          // get the listview
          expListView = (ExpandableListView) container.findViewById(R.id.lvExp);
  
          // preparing list data
          prepareListData();
  
          listAdapter = new ExpandableListAdapter(this, listDataHeader, listDataChild);
  
          // setting list adapter
          expListView.setAdapter(listAdapter);
  
          // Listview Group click listener
          expListView.setOnGroupClickListener(new OnGroupClickListener() {
  
              @Override
              public boolean onGroupClick(ExpandableListView parent, View v,
                                          int groupPosition, long id) {
                  // Toast.makeText(getApplicationContext(),
                  // "Group Clicked " + listDataHeader.get(groupPosition),
                  // Toast.LENGTH_SHORT).show();
                  return false;
              }
          });
  
          // Listview Group expanded listener
          expListView.setOnGroupExpandListener(new OnGroupExpandListener() {
  
              @Override
              public void onGroupExpand(int groupPosition) {
                  Toast.makeText(getActivity().getApplicationContext(),
                          listDataHeader.get(groupPosition) + " Expanded",
                          Toast.LENGTH_SHORT).show();
              }
          });
  
          // Listview Group collasped listener
          expListView.setOnGroupCollapseListener(new OnGroupCollapseListener() {
  
              @Override
              public void onGroupCollapse(int groupPosition) {
                  Toast.makeText(getActivity().getApplicationContext(),
                          listDataHeader.get(groupPosition) + " Collapsed",
                          Toast.LENGTH_SHORT).show();
  
              }
          });
  
          // Listview on child click listener
          expListView.setOnChildClickListener(new OnChildClickListener() {
  
              @Override
              public boolean onChildClick(ExpandableListView parent, View v,
                                          int groupPosition, int childPosition, long id) {
                  // TODO Auto-generated method stub
                  Toast.makeText(
                          getActivity().getApplicationContext(),
                          listDataHeader.get(groupPosition)
                                  + " : "
                                  + listDataChild.get(
                                  listDataHeader.get(groupPosition)).get(
                                  childPosition), Toast.LENGTH_SHORT)
                          .show();
                  return false;
              }
          });
      }
  
      /*
       * Preparing the list data
       */
      private void prepareListData() {
          listDataHeader = new ArrayList&lt;String&gt;();
          listDataChild = new HashMap&lt;String, List&lt;String&gt;&gt;();
  
          // Adding child data
          listDataHeader.add("South Indian");
          listDataHeader.add("Quick Bites");
          listDataHeader.add("Soups");
  
          // Adding child data
          List&lt;String&gt; SouthIndian = new ArrayList&lt;String&gt;();
          SouthIndian.add("Kara Bath");
          SouthIndian.add("Chow Chow Bath");
          SouthIndian.add("2 Idli 1 Vada");
          SouthIndian.add("Rava Idli");
          SouthIndian.add("Curd Vada");
          SouthIndian.add("Masala Dosa");
  
          List&lt;String&gt; QuickBites = new ArrayList&lt;String&gt;();
          QuickBites.add("Veg Sandwich");
          QuickBites.add("Veg Toast Sandwich");
          QuickBites.add("Bread Butter Jam");
          QuickBites.add("Bread Jam");
          QuickBites.add("Pakoda");
          QuickBites.add("Masala Puri");
  
          List&lt;String&gt; Soups = new ArrayList&lt;String&gt;();
          Soups.add("Tomato Soup");
          Soups.add("Sweet corn Soup");
          Soups.add("Veg Soup");
          Soups.add("Veg Schezwan Soup");
          Soups.add("Veg Noodles Soup");
  
          listDataChild.put(listDataHeader.get(0), SouthIndian); // Header, Child data
          listDataChild.put(listDataHeader.get(1), QuickBites);
          listDataChild.put(listDataHeader.get(2), Soups);
      }
  }
  </code></pre>
  
  <p>How do I fix the error for the line <strong>expListView = (ExpandableListView) container.findViewById(R.id.lvExp);</strong> and make this code run?</p>