تفاوت های Method و Constructor در جاوا

Differents between Method and Constructor are as follows:

ConstructorMethod
does not contain any return typehas a signature of return type, name and the arguments
should be same as class namemethod name can not be same as a class name
Constructor can be called only once per objectwe can call a method n number of times on a particular object

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد