Head-First-Java icon indicating copy to clipboard operation
Head-First-Java copied to clipboard

TestClass for Chapter 6's code

Open Portowine opened this issue 8 years ago • 1 comments

How can I write test-code for DotComBust class without changing it, if I have no access to variables and the class has no setters or getters?

Portowine avatar Mar 19 '17 13:03 Portowine

I think you can use java reflection api to retrieve the fields

ojles avatar Sep 27 '17 13:09 ojles