gpt4 book ai didi

java - 使用 JSON 和 PHP 从 SQL 数据库(无 MYSQL DB)(在 android 中)获取数据

转载 作者:行者123 更新时间:2023-12-01 09:53:32 28 4
gpt4 key购买 nike

我尝试了以下代码

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();
    }

但我在这一行收到此警告

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

 

最佳答案

更换你的

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

行至

personList = new ArrayList<>();

关于java - 使用 JSON 和 PHP 从 SQL 数据库(无 MYSQL DB)(在 android 中)获取数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37431773/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com