SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

SDET Flashcards - Java

» Start this Course
(Practice similar questions for free)
Question:

Constructor vs method?

Author: Ed Howard



Answer:

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 ratings)

1 answer(s) in total

Author

Ed Howard
Ed Howard