Day 24 of #50DaysOfCode – Java 💻 Today’s challenge was to check whether a number is an Automorphic Number. An Automorphic Number is a number whose square ends with the same digits as the number itself. Examples: 5 → 25 ✔️ (ends with 5) 76 → 5776 ✔️ (ends with 76) This problem helped me understand digit comparison, modulus operations, and number patterns in Java 🔍✨ #Java #CodingChallenge #50DaysOfCode #LearnToCode #ProgrammingBasics #LogicBuilding #CodeDaily #ProblemSolving #AutomorphicNumber #JavaBeginner
More Relevant Posts
-
💻 #Day33 of #100DaysOfJava — Exploring PriorityQueue in Java ⏫ Today I started exploring the Queue interface in Java, beginning with one of its most popular implementations — PriorityQueue ⚙️ A PriorityQueue is a special type of queue that stores elements based on their natural ordering or according to a custom comparator, instead of just the order of insertion. It’s commonly used in task scheduling, simulations, and algorithms like Dijkstra’s shortest path 🚀 Here’s the clean code I practiced 👇 #Day33 #100DaysOfCode #Java #CoreJava #PriorityQueue #QueueInterface #CollectionsFramework #DataStructures #MinHeap #MaxHeap #JavaDeveloper #LearningByDoing #CodingJourney #CleanCode
To view or add a comment, sign in
-
Day 3 – Java Basics | If-Else & Switch Case Today I spent time understanding how decision-making works in Java using if-else statements and switch cases. What I practiced today: Writing conditions to control program flow When to prefer if-else over switch (and vice-versa) Solving small logical cases using clean, readable code Building these basics slowly so that upcoming topics like loops and problem-solving feel natural. One concept at a time, staying consistent. #Java #DSA #ProgrammingBasics #CodingJourney #LearningEveryday #SoftwareDevelopment #ComputerScience #CodeNewbie #DeveloperLife
To view or add a comment, sign in
-
-
🚀 How the Java Compiler Works – Explained Simply! Ever wondered what happens when you run a Java program? 🤔 🔹 Java source code (.java) is compiled using javac 🔹 The compiler checks syntax, semantics, and logic 🔹 It generates platform-independent bytecode (.class) 🔹 The JVM executes bytecode as machine code ✨ This is why Java follows the principle: “Write Once, Run Anywhere” Perfect for students, beginners, and interview preparation 💡 #Java #JavaProgramming #JVM #JavaCompiler #ProgrammingBasics #ComputerScience #Coding #LearnJava #TechEducation
To view or add a comment, sign in
-
-
#100DayCodingChallenge #Day53 🔹 Problem Solved: Sorting Strings in Reverse Order using Java Streams I recently solved a problem where the goal was to sort a list of strings in reverse (descending) alphabetical order using Java 8 Streams. Here’s a clear breakdown of how the solution works: ✅ Explanation (Step by Step) A list of strings is created containing multiple fruit names. Instead of using traditional loops or Collections.sort(), the Java Stream API is used for a cleaner and more modern approach. The list is converted into a stream, which allows functional-style operations. A sorting operation is applied using a reverse order comparator, which changes the default ascending sort to descending. The sorted elements are then collected back into a new list. Finally, the result is printed, showing the strings sorted in reverse alphabetical order. #100daysCodingChallenge #ProblemSolving #java #Coding #Day53
To view or add a comment, sign in
-
-
💡 Day 28/30 — Java Memory Model: how threads see shared data Today I learned how the Java Memory Model (JMM) defines what happens when multiple threads read and write shared variables. [Video Link] - https://lnkd.in/gv8ZmzWB 🔄 Key concepts 🔹 Visibility A write in one thread is not immediately visible in another. 🔹 Happens-before If A happens-before B, then: Writes in A are visible in B This ensures correctness. 🧯 Tools to enforce ordering ✔ volatile volatile boolean running = true; Makes writes visible across threads. ✔ synchronized enter monitor critical section exit monitor Prevents race conditions and ensures visibility. ✔ Atomic classes CAS operations for non-blocking safety. 🚫 Without JMM You get: stale reads race conditions unpredictable behavior ⭐ Key takeaway The JMM ensures safety in multi-threaded programs by defining visibility and ordering rules. Tomorrow: Day 29 — Atomic classes & Locks #Java #Concurrency #JMM #Threads #SoftwareEngineering #LearningChallenge
DAY 28 Of "30 Day 30 Interesting Fact about Java Challenge- JMM. #java #challenge #coding
https://www.youtube.com/
To view or add a comment, sign in
-
Best if you want the image and the document to do the talking. Unlocking the power of parallelism! 🚀 Multithreading is key to writing efficient, high-performance Java applications. I’ve compiled my notes into a deep dive on how Threads work under the hood. Key topics covered: 🔹 Thread Creation (Thread vs Runnable) 🔹 Thread Lifecycle & States 🔹 The vital difference between start() and run() Swipe through/Read below to level up your Java skills! 💻⚡ https://lnkd.in/gZCNH-tB #Java #Programming #DeveloperLife #CodeNewbie #Multithreading
To view or add a comment, sign in
-
-
#Day143 | #365DaysCodingChallenge Today, I learned about memory management in Java. Java handles memory automatically, which helps developers focus more on logic than memory handling. => Key things I understood: Java uses Heap and Stack memory. Stack memory stores method calls and local variables. Heap memory stores objects and class instances. Java has Garbage Collection, which removes unused objects and frees memory automatically. This topic helped me understand how Java manages memory behind the scenes and why Java programs are safer and more efficient. Learning step by step and moving forward. Consistency matters more than speed. #Java #MemoryManagement #GarbageCollection #LearningDaily #Consistency #365DaysCodingChallenge
To view or add a comment, sign in
-
LeetCode Practice - 696. Count Binary Substrings The problem is solved using Java. 💡 Core Idea ✔Count consecutive groups of 0s and 1s ✔For every adjacent group, valid substrings = 👉 min(previousGroupCount, currentGroupCount) Add all such minimums Example: ✅"00110011" → groups = [2, 2, 2, 2] Answer = min(2,2) + min(2,2) + min(2,2) = 6 #LeetCode #Java #StringHandling #CodingPractice #ProblemSolving #DSA #DeveloperJourney #TechLearning
To view or add a comment, sign in
-
-
Exploring Wrapper Classes and Autoboxing in Java. Autoboxing makes code cleaner and more readable, but it comes with hidden risks. Using boxed types such as Integer and Long can silently introduce NullPointerExceptions when values are null. For performance-critical and logic-heavy code, primitives are often the safer choice. Wrapper classes should be used intentionally, not by default. It’s a small detail, but understanding it helps prevent subtle bugs and improves reliability. Strong backend systems are built on a solid understanding of language fundamentals. Small decisions at the type level can have a big impact on performance and stability. #Java #JavaBasics #BackendDevelopment #CleanCode #ProTips
To view or add a comment, sign in
-
🚀 Understanding the var Keyword in Java I recently came across the var keyword in Java, introduced in Java 10, which allows local variable type inference. Let’s break it down 🔹 What is var? var lets the compiler automatically infer the type of a local variable based on the value assigned. It is not a new type, just a syntactic convenience. 🔹 How it Works var message = "Hello Java"; var count = 10; var list = new ArrayList<String>(); Here, the compiler infers message as String, count as int, and list as ArrayList<String>. 🔹 Impact Reduces boilerplate code and improves readability. Makes code more concise, especially for long generic types. Encourages clean, maintainable code without losing type safety. 🔹 Things to Keep in Mind Can only be used for local variables, not class fields or method parameters. Overusing var in complex expressions can hurt readability. #java #javadeveloper #coding #backenddevelopment #springboot #cleanCode #learnjava #javatips #developerexperience
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