Pregunta:
Constructor vs method?
Autor: Ed HowardRespuesta:
A constructor should initialize the object, method perform actions on the objects. *We can overload but not override. We can change type and/or number of parameters or to overload. We can use all access modifiers with a constructor. No non-access modifiers can be added. I created a constructor when I created the page object model when I was initializng the variables all at once. Construtors do not participate in inheritance so It can not be over ridden.
0 / 5 (0 calificaciones)
1 answer(s) in total