Post a Job  |   Ask a Question?   |   Already registered? login or register
RajaChandra Boppana
20/04/2016 11:12 AM

@ConstructorProperties


When do we use @ConstructorProperties?
Spam    5 Comments

Srikanth,T
20/04/2016 11:21:54
If we are using name attribute of <constructor-arg> tag then we have to use @ConstructorProperties on top of the constructor. The constructor argument names are substituted by different names by the compiler at the time of compilation. @ConstructorProperties is used to identify the appropriate constructor.

RajaChandra,Boppana
20/04/2016 11:29:19
@Srikanth,T Is this applicable when we are using multiple constructors in a class?

Srikanth,T
20/04/2016 11:34:16
It is no way related to number of constructors in a class

RajaChandra,Boppana
20/04/2016 12:38:09
@Srikanth,T Thank you..

siva,reddy
21/04/2016 00:01:58
Rightnow, from 3.1 onwards...@ConstructorProperties(" ") is optional when we are using name attribute to resolve the constructor ambiguity. if we are not placing also we can execute our code...But it works on from 3.1 on wards...if your using 3.0...version its mandatory..

Languages :
xml