Day 24 – String Methods in Java Today I explored commonly used String methods in Java, which are essential for handling text data. Things I learned: 🔹 length() – finds string length 🔹 charAt() – accesses characters 🔹 substring() – extracts part of string 🔹 equals() – compares values 🔹 Case conversion methods 💡 Key takeaway: String methods are widely used in real-world applications for processing and manipulating text efficiently. Building stronger fundamentals step by step #Java #Strings #Programming #LearningInPublic #CodingJourney #Day24 #100DaysOfJava
Java String Methods and Their Uses
More Relevant Posts
-
Day 36/100 – Working with ArrayList in Java 📚 Today I practiced using ArrayList in Java, a dynamic array that allows flexible storage and manipulation of data. Unlike normal arrays, ArrayList can grow and shrink dynamically, making it very useful in real-world applications. Key learnings: • Adding elements using add() • Storing multiple values dynamically • Finding size using size() • Easier and more flexible than traditional arrays Understanding collections like ArrayList is important for handling data efficiently in Java. Building strong fundamentals step by step. 🚀 #100DaysOfCode #Java #ArrayList #DataStructures #CodingJourney #LearningInPublic
To view or add a comment, sign in
-
-
💻 Day 23 – Strings in Java Today I explored Strings in Java, one of the most fundamental and important concepts. I learned about different types of string handling: 🔹 String – Immutable (cannot be changed) 🔹 StringBuilder – Mutable and faster 🔹 StringBuffer – Mutable and thread-safe Understanding immutability was a key highlight today, as it plays an important role in memory management and performance. 💡 Key takeaway: Choosing the right type of string handling improves both performance and efficiency in Java applications. Continuing to strengthen my core Java concepts step by step 🚀 #Java #Strings #Programming #LearningInPublic #CodingJourney #Day23
To view or add a comment, sign in
-
-
Day 94/100 – Consistency Journey Today’s focus: Strings in DSA + Java Multithreading Practiced string problems involving sliding window, two pointers, and pattern-based thinking. Realized how much efficiency improves when you move from brute force to optimized approaches. On the backend side, explored ExecutorService in Java — understanding how thread pools help manage multiple tasks efficiently instead of creating threads manually every time. Key takeaway: DSA builds problem-solving mindset, while backend concepts like multithreading show how things actually scale in real-world systems. Slowly connecting both worlds. Consistency > Motivation. #Day94 #100DaysOfCode #DSA #Java #BackendDevelopment #LearningInPublic
To view or add a comment, sign in
-
-
Day 89 of #100DaysOfLeetCode 💻✅ Solved #15. 3Sum problem in Java. Approach: • Sorted the array first • Fixed one element and used Two Pointers for the rest • Skipped duplicates to avoid repeated triplets • Adjusted pointers based on sum comparison Performance: ✓ Runtime: 30 ms (Beats 87.77% submissions) ✓ Memory: 59.02 MB (Beats 77.30% submissions) Key Learning: ✓ Mastered Two Pointer technique with sorting ✓ Learned handling duplicates efficiently ✓ Improved problem-solving for combination-based problems Learning one problem every single day 🚀 #Java #LeetCode #DSA #TwoPointers #Arrays #Sorting #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Beats 100% of all Java solutions on LeetCode! Just solved LeetCode #290 — Word Pattern in Java with 0ms runtime, outperforming every submission. Here's how I approached it 👇 🧩 Problem: Given a pattern (like "abba") and a string of words, check if the words follow the exact same pattern — a full bijection. e.g. pattern = "abba", s = "dog cat cat dog" → true ✅ 💡 My approach: Used a single HashMap<Character, String> to map each pattern character to its corresponding word. The key insight: also check containsValue() to prevent two different characters from mapping to the same word — ensuring true one-to-one bijection. 📊 Results: Runtime: 0 ms — Beats 100.00% 🌿 Memory: 42.65 MB — Beats 80.14% 🔑 Key takeaway: Always verify bijection in both directions — a one-way map is not enough for pattern matching problems. One extra containsValue() check is all it takes! All 44 test cases passed ✅ — Clean, simple, and blazing fast. #LeetCode #Java #DSA #CodingChallenge #ProblemSolving #100Percent #Programming #SoftwareEngineering #CompetitiveProgramming #HashMap
To view or add a comment, sign in
-
-
Day 33/100 — Threads & Multithreading ⚡ Java can do multiple things at the same time using threads. Thread lifecycle: NEW → RUNNABLE → RUNNING → WAITING → TERMINATED 2 ways to create threads: // Method 1: extend Thread class MyThread extends Thread { public void run() { println("Running!"); } } new MyThread().start(); // NOT run()! // Method 2: Runnable lambda (preferred!) Thread t = new Thread(() -> println("Lambda thread!")); t.start(); Most important rule: ALWAYS call start() — NOT run()! → run() = normal method call (same thread) → start() = creates new thread and calls run() 3 things to remember: → Prefer Runnable over extending Thread → start() not run() → Multiple threads = race conditions possible! 🎯 Challenge: Create 3 threads that each print their name 5 times. Observe the interleaved output! #Java #Threads #Multithreading #CoreJava #100DaysOfJava #100DaysOfCode
To view or add a comment, sign in
-
-
Starting a 100-day Java series, and this is day 1 ☕ Today, we are covering Java variables - from syntax to scope to memory, all in one place. Declaration, data types, the 3 types of variables, casting, the final keyword and the mistakes most beginners make without realising. 10 slides covering everything. The last slide has a full cheat sheet worth saving.🔖 For more such tech content, follow @herbrewcode on Instagram too. #Java #Day1 #100DaysOfCode #LearnToCode #CodingJourney #HerBrewCode
To view or add a comment, sign in
-
Understanding Quicksort Partition Logic using Java 8 💻⚡ Today I explored the Quicksort 1 – Partition problem, which focuses on dividing an array based on a pivot element. 💡 What I learned: How partitioning works in the Quicksort algorithm Dividing elements into three groups: left, equal, and right Building logic using simple comparisons instead of full sorting ⚙️ Approach: Selected the first element as the pivot Traversed the array and grouped elements into: Left → elements smaller than pivot Equal → elements equal to pivot Right → elements greater than pivot Combined all groups to form the final array 📌 Key Takeaway: Understanding partition logic is the foundation of efficient sorting algorithms like Quicksort. ⚡ Time Complexity: O(n) ⚡ Space Complexity: O(n) 👨💻 Breaking complex algorithms into smaller steps makes them easier to understand and implement. #Java #Java8 #Quicksort #Algorithms #DataStructures
To view or add a comment, sign in
-
-
Day 49-What I Learned In a Day (JAVA) Today, I focused on understanding the execution flow of static elements in Java. 🔹 Learned about: • Static variables and how they are shared across objects • Static methods and how they can be accessed without object creation • Static initializer (single-line) • Static initializer (multi-line) This helped me clearly understand how Java handles memory and execution at the class level before objects are created. Building strong fundamentals step by step! #Java #Programming #LearningJourney #OOP #TechSkills
To view or add a comment, sign in
-
-
Day 21– Thread Methods in Java Today I explored how to control threads in Java using different methods. Things I learned: 🔹 start() – begins thread execution 🔹 run() – contains logic (called internally) 🔹 sleep() – pauses thread for a specific time 🔹 join() – ensures one thread finishes before another starts 💡 Key takeaway: Thread methods help manage execution flow and improve control over multithreading behavior. Step by step understanding how Java handles concurrent tasks 🚀 #Java #Multithreading #Threads #Programming #LearningInPublic #Day21 #100DaysOfJava
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development