solispot.blogg.se

Java string format
Java string format









java string format

I did screw around with the spacing of the code, though, so line 112 of Item.java would be the return statement in. Since Windryder asked for compiler output. I'll throw it into Netbeans in a sec.Įxception in thread "main" : f != Īt $FormatSpecifier.failConversion(Formatter.java:3999)Īt $FormatSpecifier.printFloat(Formatter.java:2722)Īt $FormatSpecifier.print(Formatter.java:2667)Īt (Formatter.java:2433)Īt (Formatter.java:2367)Īt (String.java:2769)Īt (Item.java:112)Īt (Main.java:51) What? It's obvious that the OP wants to source the name and ID of the super class, and super.toString() is a completely fine way of doing as much.Īnyway, eh, I can't see the problem with the OP's code, but admittedly I only briefly skimmed it. You dont need that "super" to string thing, you need to have, In my main class all i'm trying to do is insert this toString() into a JTextArea. If anyone knows how i can do this it would be greatly apreciated.

java string format

Java string format code#

My code for formatting may be completely and utterly far far away from what it is suppose to be from what I have read on the internet this may be how? Super.toString(), pOrdered, pInStock, pSold, sellingPrice, manufPrice))

java string format

Public void setI(String n, int i, int ordered, int stock, int sold, double s, double m ) Public Inventory(String n, int i, int ordered, int stock, int sold, double s, double m)











Java string format