title: List is not public; cannot be accessed from outside package
body: <p>This is my adapter named.... <code>CheckListAdapter</code> in here only I am getting the data from the database and show it in the listview... after that I here only getting checked items from the listview but i cannot understand it also.</p>
  
  <pre><code>public class CheckListAdapter extends BaseAdapter {
      private Context mContext;
      ViewHolder holder;
      ArrayList&lt;CheckList_Items&gt; arrEmps;
      public CheckListAdapter(Context c, ArrayList&lt;CheckList_Items&gt; map) {
          mContext = c;
          arrEmps = map;
      }
      @Override
      public int getViewTypeCount() {
          return getCount();
      }
      public int getItemViewType(int position) {
          return position;
      }
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return arrEmps.size();
      }
      @Override
      public Object getItem(int position) {
  
          return arrEmps.get(position);
      }
      @Override
      public long getItemId(int position) {
          // TODO Auto-generated method stub
          return 0;
      }
      @Override
      public View getView(final int position, View convertView, ViewGroup parent) {
          // TODO Auto-generated method stub
          LayoutInflater inflater = (LayoutInflater) mContext
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View grid = convertView;
          if (convertView == null) {
              holder = new ViewHolder();
              grid = inflater.inflate(R.layout.checklist, null);
              grid.setMinimumHeight(150);
              holder.name = (TextView) grid.findViewById(R.id.t1);
              holder.box = (CheckBox) grid.findViewById(R.id.checkBox);
              grid.setTag(holder);
          } else {
              holder = (ViewHolder) grid.getTag();
          }
          CheckList_Items p = getCheckList_Items(position);
          holder.name.setText(arrEmps.get(position).getName());
          holder.box.setOnCheckedChangeListener(myCheckChangeList);
          holder.box.setTag(position);
          holder.box.setChecked(p.getChecked());
          return grid;
      }
      CheckList_Items getCheckList_Items(int position) {
          return ((CheckList_Items) getItem(position));
      }
      ArrayList&lt;CheckListAdapter&gt; getBox() {
          ArrayList&lt;CheckListAdapter&gt; checked = new ArrayList&lt;CheckListAdapter&gt;();
          for (CheckList_Items p : arrEmps) {
              if (p.getChecked())
                  checked.add(p);
          }
          return checked;
      }
      CompoundButton.OnCheckedChangeListener myCheckChangeList = new CompoundButton.OnCheckedChangeListener() {
          public void onCheckedChanged(CompoundButton buttonView,
                                       boolean isChecked) {
              getCheckList_Items((Integer) buttonView.getTag()).checked = isChecked;
          }
      };
      class ViewHolder {
          TextView name;
          CheckBox box;
      }
  }
  </code></pre>
  
  <p>This is the class named <code>CheckList_Items</code></p>
  
  <pre><code>public class CheckList_Items {
      boolean checked;
      String name;
      public CheckList_Items(String name) {
        //  this.empID = empID;
          this.name = name;
      }
      public String getName() {
          return name;
      }
      public boolean getChecked() {
          return checked;
      }
      public void setSelected(boolean check) {
          checked = check;
      }
  }
  </code></pre>
  
  <p>i faced the errors in these lines...I changed many types but i cannot get the output only getting errors</p>
  
  <pre><code>   getCheckList_Items((Integer) buttonView.getTag()).checked = isChecked;
  </code></pre>
  
  <p>error: checked is not public in CheckList_Items; cannot be accessed from outside package</p>
  
  <pre><code>            checked.add(p);
  </code></pre>
  
  <p>error: no suitable method found for add(CheckList_Items)
                  checked.add(p);</p>
  
  <p>Anyone help me on this...
  thanks..</p>