🚀 Day 7 of #100DaysOfDSA (Java) Today’s focus: Functions & Methods Learned and practiced: Method declaration & return types Parameters & arguments Call by value in Java Breaking problems into reusable functions Big realization today 👇 Good programmers don’t write long code. They break problems into small, reusable methods. Understanding how to: Return values properly Pass inputs correctly Structure logic inside methods …makes code cleaner, readable, and professional. Day 7 ✅ Building logic. One step at a time. #DSA #Java #100DaysOfCode #CodingJourney #SoftwareDeveloper #LearningInPublic #DeveloperGrowth
Java DSA Day 7: Functions & Methods
More Relevant Posts
-
Day 52/100 Completed ✅ 🚀 Solved LeetCode – Merge Intervals (Java) ⚡ Implemented an interval merging approach by first sorting intervals based on their start times and then traversing them to combine overlapping ranges. 🧠 Used comparison logic to detect overlaps and update interval boundaries, ensuring that all overlapping intervals are merged efficiently. This approach avoids redundant checks and processes the intervals in a single pass after sorting. 💯 Strengthened understanding of interval problems, sorting strategies, and greedy traversal techniques commonly used in real-world scheduling and timeline merging scenarios. Profile: https://lnkd.in/gaJmKdrA #LeetCode #100DaysOfCode #Java #DSA #CodingPractice #ProblemSolving
To view or add a comment, sign in
-
-
JavaTip #1 :::writing{variant=“linkdin_post” id=“73925”} – Prefer Optional wisely, don’t misuse it. While working on backend systems, I’ve realised that NullPointerException is rarely a “big” problem — but frequent null handling makes code messy. Using Optional in service layers helped in: ✔ Making null handling explicit ✔ Improving readability ✔ Reducing unexpected NPEs However, one important learning: Optional should not be used in entity fields or everywhere blindly. It works best: • As a return type • When you want to clearly communicate “value may or may not be present” Clean code is not about using every feature Java provides. It’s about using the right feature at the right place. #JavaTip #Java #BackendDevelopment #CleanCode #SpringBoot#Hibernate #Microservices #TechHiring
To view or add a comment, sign in
-
𝐉𝐚𝐯𝐚 𝐄𝐱𝐜𝐞𝐩𝐭𝐢𝐨𝐧 𝐇𝐚𝐧𝐝𝐥𝐢𝐧𝐠 – 𝐂𝐨𝐦𝐩𝐥𝐞𝐭𝐞 𝐃𝐞𝐞𝐩 𝐃𝐢𝐯𝐞 🔹 What is an Exception & Exception Handling 🔹 Checked vs Unchecked Exceptions 🔹 try-catch, nested try-catch, multi-catch 🔹 finally block & resource cleanup 🔹 throw vs throws keywords 🔹 Exception Propagation 🔹 Exception Handling with Method Overriding 🔹 Custom (User-Defined) Exceptions 🔹 Try-With-Resources (AutoCloseable) 💡 𝐊𝐞𝐲 𝐭𝐚𝐤𝐞𝐚𝐰𝐚𝐲𝐬: • Understand exception hierarchy for robust code. • Handle exceptions smartly for normal flow continuity. • Use custom exceptions for business logic & clarity. • Leverage try-with-resources for safe and clean resource management. Strong fundamentals lead to optimized, interview-ready Java code. 🚀 hashtag Notes By : Pratham P Poreddiwar #Java #CoreJava #JavaDeveloper #ExceptionHandling #CleanCode #DSA #Coding #LearningJourney #InterviewPreparation #TechDeepDive #CodesInTransit #MondayMotivation #RevisitingTheTopics
To view or add a comment, sign in
-
Missed posting yesterday. Used the time to revise Java fundamentals. Revision in Java isn’t about rereading syntax. It’s about rediscovering why things work the way they do. Yesterday’s revision focused on: • How memory is managed inside the JVM • Why equals() matters beyond comparisons • How exceptions propagate through method calls • The real difference between == and .equals() These topics feel small — until they cause real bugs. Frameworks change. APIs evolve. But Java fundamentals stay relevant. Revising basics is not going backward. It’s upgrading how you think. Back today. Building on stronger foundations. #Java #CoreJava #JVM #BackendDevelopment #SoftwareEngineering #LearningInPublic #BuildInPublic
To view or add a comment, sign in
-
Stop Letting High-Level Code Depend on Details (DIP Explained) Read the full article: Tip #30: The Dependency-Inversion Principle ▸ https://lttr.ai/AoK3S #DependencyInversionPrinciple #java #SoftwareDesign #SOLIDPrinciples
To view or add a comment, sign in
-
-
𝗝𝗮𝘃𝗮 𝟴 - 𝗢𝗽𝘁𝗶𝗼𝗻𝗮𝗹 I have covered Optional, an important feature introduced in Java 8 to handle null values more safely and clearly. Optional helps write cleaner code by explicitly representing the presence or absence of a value, reducing the risk of NullPointerException. ✔ Why Optional was introduced ✔ How to create Optional (of, ofNullable, empty) ✔ isPresent() vs ifPresent() ✔ map() vs flatMap() ✔ filter() usage ✔ orElse() vs orElseGet() vs orElseThrow() ✔ Practical real-world examples ✔ Common mistakes and interview-focused scenarios Optional is not just about avoiding null, it’s about writing intentional and expressive APIs. #Java #Java8 #Optional #StreamAPI #FunctionalProgramming #BackendDevelopment #SpringBoot #InterviewPreparation
To view or add a comment, sign in
-
🚀 Java Full Stack Journey — Day 1 / Day 90 Refreshing core Java fundamentals as part of my continuous learning journey. 📌 Today’s Topic: Java Variables 🔹 Local Variables – Declared inside methods with limited scope. 🔹Instance Variables – Defined at class level and accessed through objects. 🔹Static Variables – Shared across class instances and accessed via class name. 💡 Revisiting fundamentals helps build better scalable systems. #Java #JavaFullStack #ContinuousLearning #BackendDevelopment
To view or add a comment, sign in
-
Java Inheritance allows one class to acquire the properties and behaviours of another using the "extends" keyword. In simple terms, it helps create a hierarchy where common functionality is defined once in a parent class and reused by child classes. In real world Java applications, inheritance supports code reusability, cleaner architecture, and logical domain modelling. It is commonly used in service layers, framework design, and base entity structures in enterprise systems. From an interview perspective, it often connects to concepts like method overriding, runtime polymorphism, and the “is-a” relationship. Strengthening this fundamental improves how I think about designing reusable and maintainable backend components. When designing systems, how do you decide between using inheritance and favouring composition to avoid rigid or overly deep class hierarchies? #Java #ObjectOrientedProgramming #BackendDevelopment #SoftwareEngineering #JavaDeveloper #InterviewPreparation
To view or add a comment, sign in
-
-
Abstract Class vs Interface in Java – Quick Tip Abstract Class: Can have methods with or without code. Supports shared behavior. A class can extend only one. Interface: Usually methods without code. Defines a contract. A class can implement multiple. Remember: Abstract → “is-a” Interface → “can-do” Mastering this helps you write clean, reusable, and maintainable code! 💻 #Java #OOP #SOLID #BackendDevelopment #ProgrammingTips
To view or add a comment, sign in
-
#Java21 : 𝗦𝘁𝗿𝗶𝗻𝗴 𝗧𝗲𝗺𝗽𝗹𝗮𝘁𝗲𝘀 - 𝗖𝗹𝗲𝗮𝗿𝗲𝗿 & 𝗘𝗮𝘀𝗶𝗲𝗿 No more messy + or String.format()—just clean, safe, readable strings: Clean ✅ Readable ✅ Bug-free ✅ 𝘚𝘵𝘳𝘪𝘯𝘨 𝘯𝘢𝘮𝘦 = "𝘈𝘭𝘰𝘬"; 𝘚𝘵𝘳𝘪𝘯𝘨 𝘮𝘴𝘨 = "𝘏𝘦𝘭𝘭𝘰, {𝗻𝗮𝗺𝗲} ! 𝘞𝘦𝘭𝘤𝘰𝘮𝘦 𝘵𝘰 𝘑𝘢𝘷𝘢 "; 𝘚𝘺𝘴𝘵𝘦𝘮.𝘰𝘶𝘵.𝘱𝘳𝘪𝘯𝘵𝘭𝘯(𝘮𝘴𝘨); // 𝘏𝘦𝘭𝘭𝘰, 𝘈𝘭𝘰𝘬! 𝘞𝘦𝘭𝘤𝘰𝘮𝘦 𝘵𝘰 𝘑𝘢𝘷𝘢 Java is getting simpler, cleaner, and more powerful day by day! 💡 #Java #Java21 #StringTemplates #CleanCode #DeveloperLife
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