Day 23 of #50DaysOfCode – Java 💻 Today’s challenge was to check whether a number is a Perfect Number. A Perfect Number is a number that is equal to the sum of all its positive divisors (excluding itself). Example: 6 → 1 + 2 + 3 = 6 28 → 1 + 2 + 4 + 7 + 14 = 28 This problem helped me strengthen my understanding of loops, conditions, and mathematical logic 🔍✨ #Java #CodingChallenge #50DaysOfCode #LearnToCode #ProgrammingBasics #LogicBuilding #CodeDaily #ProblemSolving
More Relevant Posts
-
Day 4 of my #100DaysOfDSA Challenge 💻 Today I solved a classic problem — Reverse of a String in Java. It’s one of the most basic yet fundamental questions that helps you understand how strings work in Java (immutable vs mutable). Here are 3 simple approaches I learned today 👇 🔹 Using loop (beginner-friendly) 🔹 Using StringBuilder (efficient way) 🔹 Using recursion (interview-level concept) Small steps every day → Big results soon 🚀 #Java #DSA #CodingChallenge #100DaysOfCode #Programming #DeveloperJourney #Learning
To view or add a comment, sign in
-
-
🚀 Java Practice: Armstrong Number Checker 💻 Today I wrote a Java program to check whether a number is an Armstrong number or not! 🔢 An Armstrong number is a number that equals the sum of its own digits each raised to the power of the number of digits. For example: ✅ 153 → (1³ + 5³ + 3³ = 153) → Armstrong Number ❌ 135 → (1³ + 3³ + 5³ = 153 ≠ 135) → Not an Armstrong Number This simple program helped me understand how loops, Math.pow(), and digit extraction work together in Java. Every small program like this strengthens my logic-building skills and deepens my core Java understanding. 💪 #Java #Programming #Coding #Learning #ArmstrongNumber #JavaDeveloper #TechJourney #BPUT #OOPsConcepts
To view or add a comment, sign in
-
-
Day 19 of #50DaysOfCode – Java Today’s challenge: Count the number of even and odd digits in a given number! ✨ This problem helps strengthen your understanding of loops, modular arithmetic, and conditional logic — all key concepts in programming 💪 #Java #CodingChallenge #50DaysOfCode #ProgrammingBasics #LearnToCode #CodeNewbie #LogicBuilding #DailyCoding
To view or add a comment, sign in
-
Day 22 of #50DaysOfCode – Java 🚀 Today’s challenge was to check whether a number is a Strong Number 💪 A Strong Number is a number in which the sum of the factorials of each digit equals the original number. Example: 145 → 1! + 4! + 5! = 145 ✔️ (Strong Number) This problem helped me practice: ✔️ Using loops inside loops ✔️ Calculating factorials ✔️ Strengthening logic-building skills #Java #CodingChallenge #50DaysOfCode #LogicBuilding #ProgrammingBasics #LearnToCode #DailyCoding #StrongNumber
To view or add a comment, sign in
-
🌟 Main Method in Java The main method is the entry point of every Java program. It allows the OS to hand over control to your code for execution. 📝 Signature: public static void main(String[] args) 💡 public → accessible to OS 💡 static → no object needed 💡 void → no return 💡 String[] args → command-line arguments ✅ Example: class Demo { public static void main(String[] args) { System.out.println("Hello World!"); } } #Java #ProgrammingBasics #Coding #HelloWorld #LearningJourney #ComputerScience
To view or add a comment, sign in
-
-
Day 45 of #50DaysOfLeetCodeChallenge Today's Problem: Sort characters in a string by their frequency. -Approach: First, I counted the frequency of each character in the string using a HashMap. Then, I used a Max-Heap (PriorityQueue) to sort the characters based on their frequencies. Finally, I built the result string by repeating each character according to its count. It was interesting to see how Java’s collections can simplify what seems like a complex problem at first! -Key Takeaways: HashMaps make counting elements fast and easy. PriorityQueue (Max-Heap) is perfect when we need to sort dynamically by priority. #Java #DSA #ProblemSolving #CodingJourney #50Days #CodeToLearn
To view or add a comment, sign in
-
-
Day 21 of #50DaysOfCode – Java Today’s challenge was Printing All Prime Numbers Between 1 and N. This task helped me understand how to identify prime numbers and how nested loops work in Java. Key learnings from today: 🔹 A prime number is divisible only by 1 and itself 🔹 We can check primality by testing divisibility 🔹 Using logical conditions and loops together improves problem-solving Slowly building confidence with new concepts every day! 💪✨ #Java #CodingJourney #50DaysOfCode #PrimeNumbers #LogicBuilding #ProgrammingBasics #LearningEveryday
To view or add a comment, sign in
-
Why does 1 == 1 return true but 128 == 128 return false in Java? 🤔 Last week, I stumbled across this little Java “paradox” again — and it reminded me how deep even the simplest lines of code can go. I broke it down in my latest article — explaining what really happens under the hood with Integer caching and autoboxing. 👉 Check it out here: https://lnkd.in/ef2Zxadr #Java #Programming #Coding #SoftwareEngineering #JavaInternals
To view or add a comment, sign in
-
Day 18 of #50DaysOfCode – Java Today’s challenge: Calculate the Product of Digits in a Number! A simple yet logical problem that enhances understanding of loops and arithmetic operations 💡 📘 Example: Input → 234 Output → 24 (2 × 3 × 4 = 24) #Java #CodingChallenge #50DaysOfCode #CodeEveryday #LogicBuilding #LearnToCode #ProgrammingBasics
To view or add a comment, sign in
-
🔹 The 4 Pillars of Object-Oriented Programming in Java Understanding the core principles of Object-Oriented Programming — Encapsulation, Inheritance, Polymorphism, and Abstraction — is essential for writing clean, reusable, and scalable code in Java. In this post, Otávio Borges breaks down each of these pillars with clear examples to help developers strengthen their object-oriented mindset. 💡 #Java #OOP #ObjectOrientedProgramming #JavaDevelopers #Programming #SoftwareDevelopment #Coding #LearnJava #BrasilJUG #DevsJava
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