Add sample for constructor differences in C++ and Java