0

I tried the following code

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        list = (ListView) findViewById(R.id.listView);
        personList = new ArrayList<HashMap<String,String>>();//Warning in this line Explicit type arg <> diamond 
        getData();
    }

but I get this warning in this line

personList= new ArrayList<HashMap<String,String>>();

 

Kayathiri
  • 779
  • 1
  • 15
  • 26

1 Answers1

1

Replace your

personList = new ArrayList<HashMap<String,String>>();

line to

personList = new ArrayList<>();
bendaf
  • 2,981
  • 5
  • 27
  • 62
  • wait i will check it out –  May 25 '16 at 09:17
  • yes the warning gone. but i cont get data in my list. when i run my php json to hold the data but android cloud not display –  May 25 '16 at 09:18
  • well your question were about the warning. How do you try to fetch the data :)? – bendaf May 25 '16 at 09:32
  • i think that the warning is problem now its gone but i can not get values okay no problem i will try –  May 25 '16 at 09:36
  • how is your getData() function looks like bro? If you need more help please share more info or if your problem is solved please mark my answer accepted. Thanks – bendaf May 25 '16 at 09:45
  • sure bro done done –  May 25 '16 at 10:24