Answers for "android studio unreachable statement"

1

android studio unreachable statement

Make sure your return statement exists at the end of the code segment
Eg: public boolean onContextItemSelected(@NonNull MenuItem item) {
        if(item.getItemId() == R.id.call){ 
            Toast.makeText(getApplicationContext(),"calling code",Toast.LENGTH_LONG).show();
        }
        return super.onContextItemSelected(item);
    }
Posted by: Guest on February-01-2022

Browse Popular Code Answers by Language