Lesson 23 of 34

StringBuilder: Strings ను వేగంగా నిర్మించడం

8 min 30 XP

Strings immutable కాబట్టి loop లో += ప్రతిసారీ కొత్త String ను సృష్టిస్తుంది, అది నెమ్మది. StringBuilder mutable మరియు వేగవంతం. String vs StringBuilder సాధారణ interview ప్రశ్న.

Example: edit me and press Run

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.

split() ఒక String ను String array గా విడగొడుతుంది, String.join() ముక్కలను మళ్ళీ కలుపుతుంది.

Example: edit me and press Run

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.

Challenge

+30 XP

ఒక వాక్యాన్ని చదివి దాని పదాలను తిరగబడిన క్రమంలో print చేయండి. Input: I love Java Output: Java love I

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.