FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
String in Java
How-ToMachine Learning

String in Java

via Dev.to TutorialAnees Abdul2h ago

What is a String: A string is a sequence of characters. It is stored in a special memory area called the String Constant Pool (SCP) The String Constant Pool (SCP) is a special memory area inside the heap. Ways of creating a string in Java: String literal (Static Memory) Using new keyword (Heap Memory) How to create a string literal: String s1="Java"; When you create a string using a literal, Java first checks: -If the same string already exists in SCP → it reuses it Otherwise → it creates a new object String s1 = "Java" ; String s2 = "Java" ; -> Both s1 and s2 point to the same memory location in the String Pool . public static void main ( String [] args ) { String s = "Test" ; // concat() method appends the string at the end s . concat ( " Automation" ); // This will print Test because strings are immutable objects System . out . println ( s ); } O / P: Test As we can see in the given figure, two objects are created, but the reference variable still refers to "Test" and not to "Automa

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles

Best Laptops for Multi-Monitor Setups in 2026
How-To

Best Laptops for Multi-Monitor Setups in 2026

Medium Programming • 24m ago

I Thought Learning Tech Would Fix My Life. It Didn’t.
How-To

I Thought Learning Tech Would Fix My Life. It Didn’t.

Medium Programming • 1h ago

How a Future Twitter Co-Founder Almost Lost a $10,000,000,000 Opportunity — Most Developers Make…
How-To

How a Future Twitter Co-Founder Almost Lost a $10,000,000,000 Opportunity — Most Developers Make…

Medium Programming • 1h ago

I'm a Mac Mini power user - these 5 accessories make it the ultimate workstation for me
How-To

I'm a Mac Mini power user - these 5 accessories make it the ultimate workstation for me

ZDNet • 2h ago

Developer Leave Planning: How to Handoff Projects Before FMLA Starts
How-To

Developer Leave Planning: How to Handoff Projects Before FMLA Starts

Dev.to • 5h ago

Discover More Articles