karthi karthi - 7 months ago 27
Java Question

Fetch Data from SQL Database (No MYSQL DB) (in android) using JSON with PHP

I tried the following code

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

but I get this warning in this line

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



this is working perfect for me

personList = new ArrayList<>();