#String formating

50 messages · Page 1 of 1 (latest)

solid jay
#

Anyone know a better way to do this?

stark fossilBOT
#

This post has been reserved for your question.

Hey @solid jay! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

solid jay
#

l

prime smelt
prime smelt
solid jay
#

so class main can print it out

prime smelt
#

you do all the format in the first string argument, and then just pass another argumens

solid jay
#

and the assignment

#

requires it to

prime smelt
#

I mean you do format("$f, %f ...", "here if do another string and concat it with a " + someFloat)

#

could you send the text code

#

not image

prime smelt
solid jay
#

huh

#

im trying to limit all the variables to 3 decimals

#

do I replace all the + with , ?

prime smelt
prime smelt
solid jay
#

why a float

#

i dont get what you mean

sage briar
#

but it is one of the easiest way

#

so this code is good enough

#

you can use stringbuilder if you need to but idk tho

sharp sigil
#

another javascript feature i want in java

maiden pebble
#

lmao you're still on this

maiden pebble
sharp sigil
#

blah blah has ${money} and owns ${beans} beans

maiden pebble
#

anyways, this guy's already been answered but refuses to learn to use the answers lol

sharp sigil
#

oh i read the thing wrong

#

whoops

maiden pebble
sharp sigil
#

yeah i misread it

solid jay
#

my assignment requires me to

#

do it in a very specific way

maiden pebble
#

and you refuse to learn how 3D_Laugh

sharp sigil
sharp sigil
maiden pebble
#

seems more like a mental barrier

#

they just refuse to learn ¯_(ツ)_/¯

solid jay
#

idk

maiden pebble
#

see?

solid jay
#

idk

#

okay now idk what is causing the error

solid jay
#

💀