Java Queries | Selenium Forum
H
Harsha Posted on 16/06/2020

Hi Ashish,

I have couple of queries.
 
1) What is the difference between "void()" and "public void()" and
"public static void()". when to use all the three.
 
2) What is the use of Interface in Selenium automation?
where exactly will use it.
 
3) Can yo please tell the practical usage of access modifiers Protected & Default in java?
 
 
Thanks,
Harsha

 


A
Ashish Thakur Replied on 17/06/2020

void() - there is nothing known as void()

its only 'void'

void means that function has no return type

public void xyz(){} - this function returns nothing

public int xyz(){ return 100 ; } - this returns 100

public - this is access specifier. ust watch video on access specifier and it will be clear to you


Related Posts