Android Recycleview App crash(Please helpp!) : 
Hey i'm trying to make a recycle view and i'm also using tab layout in my app.i followed a tutorial step by step but i don't know why it crashes.Here's the code
i guess there's a problem with this part:

    @Override
        public int getItemCount() {
            return herosList.size();
        }

whenever i chane return to 0 the app will run but nothing will appear in the recycleview




    public class Heros {
        public String name;
        public int img;
    
    }



    RecycleAdapter.java
    
    import android.support.v7.widget.RecyclerView;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.ImageView;
    import android.widget.TextView;
    
    import java.util.ArrayList;
    
    
    
    public class RecycleAdapter extends RecyclerView.Adapter<RecycleAdapter.HerosViewHolder> {
        ArrayList<Heros> herosList;
        public RecycleAdapter(ArrayList<Heros> heross){
            herosList=heross;
        }
    
    
        @Override
        public HerosViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.eachrow,parent,false);
            return new HerosViewHolder(view);
        }
    
        @Override
        public void onBindViewHolder(HerosViewHolder holder, int position) {
            Heros heros=herosList.get(position);
            holder.txtName.setText(heros.name);
    
    
    
        }
    
        @Override
        public int getItemCount() {
            return herosList.size();
        }
    
        public class HerosViewHolder extends RecyclerView.ViewHolder{
            public ImageView herosImg;
            public TextView txtName;
            public HerosViewHolder(View itemView) {
                super(itemView);
                herosImg=(ImageView) itemView.findViewById(R.id.imgg);
                txtName=(TextView)itemView.findViewById(R.id.txtHerosName);
    
    
            }
        }
    }



    public class PageFragment extends Fragment {
        public static final String ARG_PAGE = "ARG_PAGE";
    
        private int mPage;
        RecyclerView recyclerView;
        LinearLayoutManager manager;
        String[] names={"abs","vline","chest"};
    
        ArrayList<Heros> passName;
    
        public static PageFragment newInstance(int page) {
            Bundle args = new Bundle();
            args.putInt(ARG_PAGE, page);
            PageFragment fragment = new PageFragment();
            fragment.setArguments(args);
            return fragment;
        }
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            mPage = getArguments().getInt(ARG_PAGE);
        }
    
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            passName=new ArrayList<>();
    
    
            View view = inflater.inflate(R.layout.fragment_page, container,
                    false);
            recyclerView=(RecyclerView)view.findViewById(R.id.rec);
            manager=new LinearLayoutManager(G.context);
            recyclerView.setLayoutManager(manager);
            recyclerView.setHasFixedSize(true);
            for (int i=0;i<3;i++){
                Heros heros=new Heros();
                heros.name=names[i];
                passName.add(heros);
            }
            recyclerView.setAdapter(new RecycleAdapter(passName));
    
    
            return view;
        }
    }





