java – Why do I get error to make a fragment list in android studio?

I want to make a array list of fragment class Where I have created FragmentOne,FragmentTwo and FragmentThree fragment class so I have wrote

Fragment entry1 = new FragmentOne();
Fragment entry2 = new FragmentTwo();
Fragment entry3 = new FragmentThree();
ArrayList<Fragment> FragmentArray = new ArrayList<Fragment>();

But I am getting an error in add portion showing <identifier> expected.
What is the wrong in this code?

Product of the Month September 2016

Source link

Leave a Comment

Your email address will not be published. Required fields are marked *