#string escaping

1 messages · Page 1 of 1 (latest)

versed saffronBOT
#

<@&987246399047479336> please have a look, thanks.

versed saffronBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

tropic gulch
#

if u want help fast, u better invest time into posting a good high quality question that people won't just click away

#

provide the code as formatted text, not image. don't capslock. use a proper title. explain what's unclear to u

versed saffronBOT
#

string escaping

#

Changed the title to string escaping.

midnight kettle
#
  • provide the task that was given in this case
tropic gulch
#

that said, u only need to escape characters that have special meaning in a string. in this case, it's only the double quote ". not the single quote

#

a proper ide like intellij will also automatically do everything for u if u post the original text into it

#

Also note that java has string blocks """... """ which allow u to skip escaping like this entirely

midnight kettle
#

but only for newer version of java

#

which you should use anyways

tropic gulch
#

was it 13? been a few years already. but yeah

midnight kettle
#

baeldung says 15

#

but dk

#

JEP 378 adds the language feature text blocks to Java SE 15 and later.
oracle

gleaming stone
#

also, don't do this

haughty copper
midnight kettle
#

?

#

example?

#

you clearly broke a rule

haughty copper
#

Its dm's

#

not server

midnight kettle
#

Don't ask people via direct message (DM); Q&A takes place in our server, public - nobody will steal your code
and only mutual server is together java + emccue post it himself

versed saffronBOT
#
OP left

Closing thread...

midnight kettle
#

lmao

gleaming stone
#

Fascinating he left

gleaming stone
#

The metaphor is like a college dorm where there is a common area where people offer help

#

But you found my room and knocked in a panic and I wake up like

hybrid dome
#

Accurate