Day 24 | Programming Classes at TAP Academy 🚨 Handling Extra Spaces in Strings 💡 1. Trim spaces from start and end only (without using .trim()) Traverse from left -> find first non-space -> start Traverse from right -> find first non-space -> end Loop between start and end ⚡ 2. “Remove extra spaces” is NOT “remove all spaces” Input: " how are you " Expected: "how are you" Not: "howareyou" 🔥 Core logic: Keep all characters Allow only one space between words Condition that matters: if (s.charAt(i) != ' ' || (s.charAt(i) == ' ' && s.charAt(i+1) != ' ')) 👉 That single condition = 80% of the problem solved. 🧠 3. Operators are silent killers || ->stops early (short-circuit) && -> stops early That’s why this doesn’t crash: s.charAt(i+1) Because sometimes Java never even checks it. 🔥 4. “NOT of vowel = consonant” ❌ (Big trap) Most common mistake: if (!(ch == 'a' || ch == 'e' ...)) Looks correct. It’s not. Why? Because: 👉 Character can be: Alphabet Number Special character So NOT vowel ≠ consonant ✅ Correct thinking: Check if alphabet Then check if NOT vowel THEN it’s consonant 🚀 5. Pattern mindset > Code memorization Example: 👉 Print * before every ‘a’ in "banana" Output: b*a n*a n*a Logic: Traverse If 'a' -> add "*a" Else -> normal char 👉 Every string problem = pattern + condition + traversal #Java #Strings #Programming #CoreJava #TAPAcademy #Upskilling #LearnByDoing #CodingMindset #DeveloperMindset #LogicOverSyntax #Learning #ProblemSolving #DSA #Logics #Problems #Learning #SoftwareDevelopment #Coding #CodingJourney #CodingPractice #LogicBuilding #ThinkLikeAProgrammer
Java String Handling at TAP Academy
More Relevant Posts
-
Day 25 | Programming Classes at TAP Academy Strings Subsequences ✨ 🔍 Problem 1: Find the Index of a Character in a String Given a string S and a character K, find the index of K. 💡 Core logic: Traverse the string Compare each character using == Return index immediately when found If not found -> return -1 👉 Sounds basic… but execution exposed gaps. ⚠️ Big Reality Check The logic is literally the same as “index of element in array” — just applied to strings. 🧠 Hidden Trap: Taking Character Input in Java Most common mistake: Trying scanner.nextChar() ❌ (doesn’t exist) ✔️ Correct way: Take input as string Extract first character using .charAt(0) This tiny detail broke a lot of code. 🔁 Problem 2: Last Index of Character Same logic. Just reverse traversal. Start from length - 1 Move backwards Return first match Simple twist. Same foundation. 🔗 Problem 3: Subsequence Check Now things got interesting. 👉 Given two strings S and T, check if T is a subsequence of S. Meaning: All characters of T must appear in S Order must be maintained They don’t need to be continuous Example: S = "hereiamstackerrank" T = "hackerrank" → ✅ YES 💡 Approach Use two pointers: i -> for string S j -> for string T Logic: If characters match -> move both i++, j++ If not -> move only i++ Continue until end Final check: If j == T.length() → YES Else → NO 🧩 Bonus Concept: Loop Understanding Quick reminder that hit hard: while loop -> runs only if condition is true do-while loop -> runs at least once no matter what Understanding this difference = avoiding silent logical bugs. #Programming #Java #DSA #LearningJourney #CodingLife #ProblemSolving #TechGrowth #Software #Development #TAPAcademy #Upskilling #Logics #Strings #DSA #Coding #Problems #Logics #Syntax #CoreJava #Loops #Subsequence #Index #Learning
To view or add a comment, sign in
-
-
🚀 Exciting News for V Programming Enthusiasts! 🚀 I'm thrilled to announce a brand-new module in my Udemy course, Learn V Programming! 🎉 Introducing "Handling JSON using Vlang"—a comprehensive guide to mastering JSON manipulation in Vlang. This module is designed to enhance your skills in working with JSON data, a vital aspect of modern programming. Here's what you'll learn in this module: 1️⃣ Encoding and Decoding JSON Data: Seamlessly convert data to and from JSON formats. 2️⃣ Working with json and json2 Modules: Learn the ins and outs of Vlang's powerful JSON handling libraries. 3️⃣ Decoding JSON Responses from the Web: Handle real-world scenarios by decoding JSON responses from APIs and web services. If you’re eager to level up your V programming skills and gain hands-on experience with JSON, this module is perfect for you. 🎯 Enroll now and start your journey today: https://lnkd.in/dFquAqbC Let’s code the future together! 💻✨ #vlang #vprogramming #learnvprogramming #programming #programminglanguage #technology #newhire #ITprofessional #ITskills
To view or add a comment, sign in
-
Why I Created Coding Made Simple As I progressed in learning to code, I realised how quickly things can start to feel overwhelming — especially when concepts begin to stack on top of each other. Not because the concepts are impossible, but because they’re unfamiliar, and they don’t always click straight away. I’d sometimes catch myself thinking while practising: “This feels a bit high level… I’m not sure I fully get it yet.” And honestly? That’s completely normal. Learning anything new takes time, clarity, and explanations that meet you exactly where you are — not where you’re “supposed” to be. Although things eventually start to make sense — especially with the support around you, whether that’s peers, mentors, or your learning community — those early stages, when you’re absorbing so much at once, can still feel like a lot. If you’ve ever felt that way, you’re not alone. You’re not behind. You’re simply learning. That’s exactly why I created Coding Made Simple. It’s the guide I wish I had earlier — something that: • breaks down programming concepts in plain English • focuses on the why behind the code • includes real‑world, practical examples • helps you build confidence step by step If you’re at the start of your coding journey and things feel a little overwhelming, this was made with you in mind. 👉 Check it out on Payhip: https://lnkd.in/e2iWbz_2 Or on Gumroad: 👉https://lnkd.in/eNCwfmHT Happy coding! #CodingJourney #LearningToCode #ProgrammingBasics #SoftwareDevelopment #BeginnerCoder #CodeNewbie #CodingMadeSimple #WomenWhoCode
To view or add a comment, sign in
-
Day 2 of placement training with Tap Academy focused on strengthening our core programming skills. Today’s session was all about: Understanding loops in Java (for, while, do-while) Building logic through pattern problems Improving problem-solving and coding approach Pattern problems really push you to think differently and sharpen your logic step by step. A solid foundation in loops makes everything in programming much easier moving forward. Appreciate the continuous guidance from our mentor, Poovizhi VP, for making the session interactive and easy to follow. Excited to keep learning and improving every day. #Java #Programming #Coding #Loops #ProblemSolving #TechSkills #LearningJourney #Engineering #PlacementPreparation #TapAcademy #StudentLife #FutureReady
To view or add a comment, sign in
-
-
"Started with OOP… ended up with OOPS 😅 That’s the journey of every developer learning Object-Oriented Programming. From understanding classes and objects to struggling with inheritance and polymorphism… we’ve all been there. Mistakes aren’t failures — they’re part of mastering the logic. Keep coding. Keep breaking. Keep learning. #OOP #CodingJourney #ProgrammerLife #Learning #SoftwareDevelopment"
To view or add a comment, sign in
-
-
Most people learn coding the wrong way… 👀 They watch tutorials, feel confident… but freeze when asked to build something from scratch. I just came across a simple challenge: 👉 “Build an ATM machine in 10 minutes using OOP” Sounds easy, right? But here’s the twist — You only get one variable: balance And every deposit/withdraw must update the SAME memory. That’s where real understanding kicks in. 💡 This isn’t about syntax… It’s about how you think like a programmer → Managing state → Writing clean logic → Handling real-world scenarios (like insufficient balance) Honestly, this made me realize: Learning = Watching ❌ Learning = Building under pressure ✅ If you're into coding, try this yourself. No shortcuts. No copying. You’ll instantly know where you stand. Link to know about how I know this:- https://lnkd.in/gQ3364iP #LearnCoding #PythonLearning #OOPConcepts #BuildInPublic #DeveloperMindset #CodingChallenge #ProgrammingLife #TechLearning #StudentDevelopers #UpskillDaily #StopProcrastinating #NoMoreExcuses #BreakThePattern #DontJustWatch #StopWastingTime #RealityCheck #WakeUpCall
To view or add a comment, sign in
-
-
When I started learning programming, I was mainly focused on writing functions and making things work. But after getting introduced to Object-Oriented Programming (OOP), my way of thinking started to change. Instead of only asking "what should the program do?", I began asking "who should be responsible for doing it?" Even with the basics like classes and constructors, I can already see how OOP helps in organizing code and making it easier to understand and maintain. I’m still at the beginning of my journey, but I’m starting to realize that programming is not just about writing code — it’s about thinking in a more structured and logical way. #programming #dart #flutter #learningjourney #mobileApplications
To view or add a comment, sign in
-
💻 Reality of starting coding Sometimes I think back to when I first started coding… watching tutorials made me feel like “yeah, I’ve got this now” But the moment I tried writing code on my own… everything felt different I didn’t even know where to start, and it felt like I didn’t know anything at all. " You will feel like a genius after watching tutorials 🤓 " " Then feel like you know nothing when you start alone 💀" But … that’s just part of the learning process ✨ #Coding #WebDevelopment #Programming #DeveloperJourney #LearningToCode #SoftwareDevelopment #100DaysOfCode
To view or add a comment, sign in
-
90% of your time in programming won't be spent writing code. Reading code. Understanding code. Fixing code. And that's what no one tells you while you're learning. We all learned to write. No one taught us to read. Then we were shocked when we saw the real rules of coding and found nothing like what we learned. The real goal isn't writing. It's reading, understanding, and making decisions. #ProgrammingMadeSimple #LearnProgramming #ArabProgrammers #Code #DeveloperLife #SoftwareEngineering #Programming #ProgrammingForBeginners
To view or add a comment, sign in
-
-
🎓 TAP Academy Learning Journey — From Concepts to Confidence (Day 11–15) 🚀 As part of my learning journey with Tap Academy, I’ve been diving deeper into Java fundamentals over the past few days. The experience has been both challenging and rewarding, with each day adding a new layer of clarity to how Java works behind the scenes. Here’s a glimpse of what I explored 👇 🔹 Day 11 – Data Types & Type Casting Gained a strong understanding of primitive data types, implicit & explicit casting, wrap-around logic, and operator precedence. 🔹 Day 12 – Programming Basics & Problem Solving Worked on real-time problems like currency and temperature conversions while strengthening logic using conditionals and operators. 🔹 Day 13 – Variables, Memory & JRE Learned how Java manages memory using Heap & Stack, and understood the difference between instance and local variables. 🔹 Day 14 – References & Memory Flow A major breakthrough 🚨 Understood how multiple references point to the same object and how changes reflect everywhere — a key concept for interviews. 🔹 Day 15 – Methods, Parameters & Garbage Collection Explored method creation, parameters vs arguments, return types, user input using Scanner, and how Java handles memory with Garbage Collection. 💡 Key Takeaways: ✔ Deep understanding of Java memory management ✔ Strong clarity on variables & object references ✔ Writing clean and structured methods ✔ Improved problem-solving and logical thinking ✔ Consistency is the real key to growth 📈 What started as learning syntax is now transforming into understanding how Java executes internally. Grateful for the continuous guidance and structured learning provided by Tap Academy 🙏 #TapAcademy #Java #Programming #LearningJourney #Coding #JavaDeveloper #100DaysOfCode #PlacementPreparation #TechSkills #Consistency #Growth
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