Question : why do we check if driver object has already created
Answered by : obedient-ocelot-5tkogtygmlyl
(if driver==null)
This is because of singleton pattern.
It will not create object of the class
again if already initialized once.
Source : | Last Update : Thu, 21 Jan 21