Skip to content

core-java

45 Posts

What is a String in Java?

What is a String in Java? Learn what the String class represents, how Java stores text and the basics you need before working with strings in real code.

What is String Pool in Java?

What is the String Pool in Java? Learn how the JVM stores and reuses string literals, why it saves memory and how it affects comparing Java strings.

How To Create Strings in Java?

Learn how to create strings in Java using literals and the new keyword, how the two approaches differ and which one you should use in your everyday code.

Scope of Variables in Lambda Expressions

Learn the scope of variables inside Java lambda expressions: what a lambda can read, what it can change, and how it treats variables from the enclosing code.