title: Getting NullpointeException
body: <p>Guys can you check it why i am getting a null pointer exception in this line,</p>
  
  <pre><code>cl = Class.forName(myClass);
  </code></pre>
  
  <p>Here's the code:</p>
  
  <pre><code>private void addBookmark(String[] values_array) {       
      LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View v = vi.inflate(R.layout.single_bookmark, null);
  
      TextView text = (TextView) v.findViewById(R.id.bookmark_text);
      Button button = (Button) v.findViewById(R.id.bookmark_button);
  
      text.setText(values_array[1]);
  
      final String myClass = values_array[0];
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Class&lt;?&gt; cl = null;
              try {
              cl = Class.forName(myClass); // &lt;--- this is where i am getting a null pointer exception
              } catch (ClassNotFoundException e) {
                  e.printStackTrace();
          }
              Intent myIntent = new Intent(mContext, cl);
              startActivity(myIntent);
          }
      });
  </code></pre>
  
  <p>how should I fix that?
  Or is there something I need to replace? </p>