it seems you pass the local field f to the second constructor, where you print it to System.out. Only after that, you assign 0.1 to it. So i guess the output is always "called test0.0". What output did you expect, or what does not work. If you are more specific in your questions, it's way easier to give specific and useful answers.