文章

顯示從 3月, 2023 起發佈的文章

Java - Data structure - ArrayList

Java - Data structure Convert a ArrayList , List to Array : eg. ArrayList<String> arrList1 = new ArrayList<>(); //(Create a new ArrayList) arrList1.add( "One" );//Add something arrList1.add( "Two" ); String[] strArr = new String[arrList1.size()]; // ( // Create a new Array(Use the List .size() )