What is difference between static block and constructor ?
Answers
Answered by
0
First of all thats not a static block...Its a Method block having static value.!!! It just means that the value returned by the Method will be static.!! you could even write that as public int <WhateverYourMethodNameIs>...and the difference is..!! Method does return only the value.!! and constructor doen have any return statements for returning a value.!!
Peace..!!
Peace..!!
Similar questions