karthi karthi - 2 years ago 82
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>>();


Answer Source

this is working perfect for me

personList = new ArrayList<>();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download