This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have a value that has to be defined as a float. I'm trying to right this value to a text field using setText but everything that I have tried gives me a compile error. How do I handle this?
Ernest Friedman-Hill
author and iconoclast
Marshal
setText() wants a String as an argument, so you need to convert your float to a String. There are (as is often the case) several ways to do this, but easy one is the static method String.valueOf(); there's an overloaded version of this for just about every primitive type. So you could say