Java Strings Basics: Understanding String Creation and Methods

Started learning Strings in Java today. After working with arrays and matrices, this felt like moving into how real programs actually handle text and user input. The focus was on understanding how strings are created, how input is taken, and how basic built-in methods like charAt() and length() work internally. String s = "Pratim"; System.out.println(s.charAt(0));  // Output : P System.out.println(s.length());  // Output : 6 What became clear today: - Strings are not primitive values; they behave like objects with built-in functionality - Accessing characters requires methods like charAt() instead of direct indexing - length() is a method call, not a property like in arrays - Even simple text handling introduces a different way of thinking compared to numbers This felt like the starting point of working with real-world data, where most problems involve text rather than just numbers. Beginning the Strings module today. #Java #DSA #Strings #LearningInPublic #ProblemSolving #CodingJourney #Programming #JavaDeveloper #DeveloperJourney

To view or add a comment, sign in

Explore content categories