CopyPastor

Detecting plagiarism made easy.

Score: 0.8075575828552246; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2016-07-11
by Krunal Patel

Original Post

Original - Posted on 2016-07-11
by Niranj Patel



            
Present in both answers; Present only in the new answer; Present only in the old answer;



try this @Override public void onBackPressed() { AlertDialog.Builder ab = new AlertDialog.Builder(this); ab.setMessage("Really want to exit"); ab.setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); } }); ab.setNegativeButton("No", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Main.super.onBackPressed(); } }); ab.create(); ab.show(); }
Don't call super method of `onBackPressed`.
@Override public void onBackPressed() { AlertDialog.Builder ab = new AlertDialog.Builder(this); ab.setMessage("Really want to exit"); ab.setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); } }); ab.setNegativeButton("No", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { } }); ab.create(); ab.show(); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;