Created
February 22, 2021 18:22
-
-
Save mjg123/3b3c8fa8b2a82ff3aa2ae0602fcda4d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String messageBuilder(Price price, String symbol) { | |
return String.format("Here are the most up-to-date %s prices:\n" + | |
"\uD83C\uDF05 Open price of the day: $%s\n" + | |
"\uD83D\uDCC8 High price of the day: $%s\n" + | |
"\uD83D\uDCC9 Low price of the day: $%s\n" + | |
"\uD83D\uDD14 Current price: $%s\n" + | |
"\uD83D\uDCC6 Previous close price: $%s\n" + | |
"\uD83E\uDD1E Send another symbol.", | |
symbol, price.open, price.high, price.low, price.current, price.close); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OMG I just learned this:
if you put
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
into the<properties>
section ofpom.xml
you can write your code like this:(if you're trying to copy-paste emoji into IntelliJ you might need to use ctrl-shift-v to paste without formatting, but it works)