I want to pass a Method (SaveClound) as a parameter (AlertDialog Parameter) so i can use differents methods through this parameter (in actionButtons Method).
public void actionButtons(){
    buttonVoltar.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            alertDialog(saveClound());
            // see? I want to call the a method through this parameter
        }
    });
}
public void alertDialog(Method methodName) {
    AlertDialog.Builder builderaction = new AlertDialog.Builder(this);
    builderaction.setTitle("Atenção!");
    builderaction.setMessage("Você tem certeza que deseja sair?");
    builderaction.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    // i want to call here the paramater i'm passing on this method (methodName)
                    // so i can call any methods i want right here
                }
            });
    builderaction.setNegativeButton("No",new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    dialog.dismiss();
                }
            });
    AlertDialog alert = builderaction.create();
    alert.setIcon(R.drawable.ic_stop);
    alert.show();
}
public void saveClound(){
    Toast.makeText(getApplicationContext(), "ABC", Toast.LENGTH_SHORT).show();
}
 
    