Why does not it give compile time error when I use void as return type of the constructor ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why does not it give compile time error when I use void as return type of the constructor ?

But if my code is : class Demo { void Demo () { } } It compiles successfully.

5th Apr 2020, 11:21 PM
Rahul Kumar
Rahul Kumar - avatar
0 Answers