Hi there,
I'm not really familiar with JAVA yet and try to convert a double to a string using format().
Compiler gives a warning. Nevertheless it works fine in my project.
Before that line the newString was ceated and initialized.
Should I change anything?
java warning to .format()
- honki-bobo
- Posts: 310
- Joined: Sat Nov 09, 2019 1:18 pm
Re: java warning to .format()
format() is a static method, not an object method.
Try
Try
Code: Select all
newString = String.format(%6.2f", value);