Question: What is the chief purpose of line five in this code snippet?
- to make sure that the activity finishes when the savedInstanceState is not null
- to make sure that the activity creates a new fragment each time it is restored from a previous state
- to prevent the display of two fragments side by side in cases where the activity is restored from a previous state
- to prevent the creation of overlapping fragments in cases where the activity is restored from a previous state
Answer: The correct answer of the above question is Option B:to make sure that the activity creates a new fragment each time it is restored from a previous state