java - Printing a method -


i need call method returns code below. using in enhanced loop objects in array. however, when try print out, error.

public string tostring(){     return string.format("length:%d\nwidth:%d\nheight:%d\n", length,width,height); 

this used main.

for(box n:boxes) system.out.printf(n.tostring()); 

the error is

exception in thread "main" java.util.illegalformatconversionexception: d != java.lang.double  


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -