Search code examples
androidannotationsoncreateactivity-lifecycle

What is the use of @nullable in OnCreate(@nullable Bundle savedInstances);?


what is the use of @nullable and in what situation not using @nullable be a problem in onCreate(@nullable Bundle SavedInstances);


Solution

  • You can safely ignore/remove @nullable from OnCreate(@nullable Bundle savedInstances); as it denotes the parameter, Bundle can be null and it has no role at runtime See the Documentation here for more details