I get the error “Unreachable statement” return in android

We don’t put return statement above any other statement unless that return is under any conditional statement. If we do that then all the statements below that would never get executed (means it would become unreachable under all circumstances) which causes the error you are getting. Do it like this public class TabFragmentA extends Fragment … Read more