I have my small framework wrote in C# and SeleniumWebDriver and now I want to learn Java. I try to create new framework in Java according to my C# framework and I have problem with some code related with get and set because in Java that not exist.
In Java I tried to rewrite this but without any success and I haven't got already any idea.
This is my C# code which i need to write in Java:
private static IWebDriver _driver;
public static IWebDriver Driver
{
get
{
if (_driver == null)
{
InitializeDriver();
}
return _driver;
}
private set => _driver = value;
}
It is possible to write this C# code in Java? Correction. Could somebody show me how to do it? Thanks a lot for respond.