@Override long getInvestment() { long total = 0; for (Person person : Staff) { total += person.getSalary(); } return total; }
@Override public long getInvestment() { int totalInvestment = 0; for (Person person : cast) { totalInvestment += person.getSalary(); } return totalInvestment; }
private void testInsert(Person person) { ContentValues contentValues = new ContentValues(); contentValues.put("name", person.getName()); contentValues.put("phone", person.getPhone()); contentValues.put("salary", person.getSalary()); Uri insertUri = Uri.parse("content://cn.bs.testcontentprovider/person"); Uri returnUri = mContentResolver.insert(insertUri, contentValues); System.out.println("新增数据:returnUri=" + returnUri); }