I am creating an app using Fragments for tablet.I have so far created some buttons on the left side and the fragments appear on clicking the buttons.
But i am experi
You need to use getSupportFragmentManager() in your code, not getFragmentManager() - see here for more details.
getSupportFragmentManager()
getFragmentManager()
You also need to extend your class from android.support.v4.app.FragmentActivity, not just from standard android.Activity to get this method.
android.support.v4.app.FragmentActivity
android.Activity