0 votes 0 votes How many constructors can a class have ? zero 1 2 any number Object Oriented Programming ugcnetcse-dec2008-paper2 object-oriented-programming constructor + – rishu_darkshadow asked Sep 25, 2017 edited Jun 19, 2020 by soujanyareddy13 rishu_darkshadow 814 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 2 votes 2 votes Any number of constructors are allowed, provided their parameters differ from each other. Example- Class A{ int a, b; A(){ this.a=5; } A(int a){ this.a=a; } A(int a, int b){ this.a=a; this.b=b; } } Mamta Satywali answered Sep 25, 2017 selected Sep 26, 2017 by rishu_darkshadow Mamta Satywali comment Share Follow See all 0 reply Please log in or register to add a comment.