Search code examples
javaconstructorparameterized

Is It neccessary for a parameterized Constructor in java to have a body?


I want to know if it is possible to not have defined body in parameterized Constructor.

this is my Constructor Below

public AutomationTest(RestTemplate restTemplate) 
{

}

Solution

  • Yes, It is fine. Don't worry about it.