Hi,
I have a little question and I hope its in the right section but well here it comes

today in class our professor "collected the homework" (what was a programm that takes decimal numbers and converts them to binary numbers). Well not very difficult but he told me i created a "dead object" by writing:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| public class Converter { public Converter() { } public void otherFUnctions() { } public static void main(String[] args) { [b]new Converter();[/b] } } |
He told me this is a bad behaviour of writing code and my algorithm should better be in the main method, than instantiating a dead object. He also didnt want to explain that to me and just said you'll learn more about that when you learned how stacks are built.
I wonder now why this is so bad because i always see alot of ppl starting their code like this (even example code in books I've read is like that).
Since my prof didnt had the time or smth else

to explain that to me.
So I wanted to ask you guys, maybe someone can explain it
thx