The constructor must not have a return type. remove void before each constructor.
Some very basic constructor characteristic:
but. Same name as class b. no return type. from. will be called every time an object is created with a class. for example, in your program, if you created two Flow objects, Flow flow1 = new Flow (); Flow flow2 = new Flow (); then the thread constructor will be called 2 times.
e. If you want to call the constructor only once, then declare it as static (static constructor) and do not forget to remove any access modifier from the static constructor ..
Subhranshu Sep 20 '13 at 11:15 2013-09-20 11:15
source share