replace(R.id.fragmentcontainer, ProfileFragment()) will:

  1. Add ProfileFragment on top of the existing one
  2. Remove the fragment(s) in that container and add ProfileFragment
  3. Hide the container
  4. Open a new activity
Answer

B) Remove the fragment(s) in that container and add ProfileFragment

replace = remove existing + add new.

Computer Science MCQ · More Windows Mobile, Eclipse and Fragments MCQs · Practise