Java Strings: Immutable & Mutable, Comparison Methods & Operations

📘 Day 13 | Java Learning – Strings Today I explored one of the most important topics in Java — Strings. I learned how strings work internally, how they are stored in memory, and how different methods help in comparing and manipulating them efficiently. 📌 Key Concepts Covered: 🔹 Strings as a collection of characters enclosed in double quotes 🔹 Types of Strings:   • Immutable (cannot be changed)   • Mutable (can be modified) 🔍 String Comparison Methods: ✔ == ✔ equals() ✔ compareTo() ✔ equalsIgnoreCase() 🔗 String Operations: ✔ String concatenation ✔ Understanding String memory in the Heap 💻 Programs Practiced: ✅ Printing a string ✅ Reversing a string ✅ Reversing a string using logic ✅ Checking whether a string is a palindrome ✅ Comparing complete strings using equals() ✅ Comparing characters using == ✅ Counting spaces in a string ✅ Counting words in a string ✅ Counting vowels using if condition ✅ Printing consonants in a string 📈 Learning something new every day and growing step by step! #Java #CoreJava #StringsInJava #JavaLearning #CodingJourney #Programming #TAPAcademy #LearningEveryDay #StudentDeveloper

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories