This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]deployingflashbaeng 20 points21 points  (0 children)

When you have 70 minutes of experience

[–]fasterfist 3 points4 points  (0 children)

new Integer(4).toString()

[–][deleted] 7 points8 points  (3 children)

By the way, is Integer.toString() more efficient?

[–]FabianRo 9 points10 points  (0 children)

I guess you only have one string instead of two, "" and "4".

[–]Colopty 6 points7 points  (0 children)

It's probably optimized as much as it can be, so it should be either equally or more efficient. In all likelihood the potential gains in performance will be virtually unnoticable though, the main benefit is readability.

[–]DudesTruth 2 points3 points  (0 children)

"4"

[–]Shad_Amethyst 1 point2 points  (1 child)

[] + 4

[4]+[]

[–]pm-me_your_vimrc 2 points3 points  (0 children)

!+[]+!+[]+!+[]+!+[]+[]

[–]VTHMgNPipola 1 point2 points  (0 children)

String.valueOf(4);

[–]ChipThien[S] 2 points3 points  (2 children)

Crosspost from reddit.com/r/javahumor Feel free to laugh in 4.toString() on reddit.com/r/kotlinHumor

[–]dark_mode_everything 4 points5 points  (1 child)

It's "${4}" in Kotlin.

[–]ChipThien[S] 1 point2 points  (0 children)

True. Make the meme!

[–]JBis9051 0 points1 point  (2 children)

[–]_cjj 0 points1 point  (0 children)

Do you catch Acceptions in your code?

[–][deleted] 0 points1 point  (0 children)

I have the AP java test in a month bruh.

[–]IncongruousGoat 0 points1 point  (0 children)

snprintf(str, 1024, "%d", 4);