Ich habe die Hauptaktivität, dass es öffentliche void (String, Int) & einige wo in der Hauptaktivität ich möchte die Öffentlichkeit nennen, leer, aber ich bekomme Fehler, die 'void Kasse (string, int) nicht auf() angewendet werden,‘...So nennen Sie öffentliche void (int i, String s)
das ist, wie ich meine public void nennen:
main activity {
//some where in main activity
checkout(); //here i call public void but this line show error
public void checkout(String answer,int missedcallcount){
String MissedCallWhere = CallLog.Calls.TYPE + "=" + CallLog.Calls.MISSED_TYPE + " AND " + CallLog.Calls.NEW + "=1";
Cursor cmissedcallc = getApplicationContext().getContentResolver().query(CallLog.Calls.CONTENT_URI,null,MissedCallWhere, null, null);
cmissedcallc.moveToFirst();
Log.d("CALL", ""+cmissedcallc.getCount());
missedcallcount = cmissedcallc.getCount();
cmissedcallc.close();
if (missedcallcount<=5){
answer= "you have less than 5 miss call";
}else if (missedcallcount>5){
answer= "you have more than 5 miss call";
}
}
}
mir bitte dabei helfen ... danke
'checkout' benötigt 2 Argumente, Sie übergeben derzeit keine daran. – Diasiare
Parameter aufrufen! – florgeng
Bitte lernen Sie Java zuerst http://www.learnjavaonline.org/ – Kushan