π Sieve of Eratosthenes in Java
Find all prime numbers up to n efficiently by:
βοΈ Marking every number as prime initially
βοΈ Iteratively eliminating multiples of each prime
βοΈ Printing the numbers that remain marked
πποΈ Practicing Inheritance in Java OOP today!
Built a simple Transport System:
πΉ Vehicle β Base class
πΉ Car β Inherits Vehicle + AC functionality
πΉ Motorcycle β Inherits Vehicle + Wheelie functionality
Used a Main class for printing outputs
Just practiced Encapsulation in Java π
Created a Student class with private fields, constructors, getters, and setters. Also added validation to prevent invalid age values.
It's amazing how OOP helps keep code clean, secure, and maintainable! π‘
#Java#OOP#Coding#Programming
Implemented a Prime Number Generator in Java that prints all prime numbers from 0 to a user-defined limit.
Key concepts used:
β’ Functions/Methods
β’ Iteration with loops
β’ Prime number checking logic
β’ Object creation and method calls
Consistency > Complexity. Keep building.
Today's Java practice π»
Created a Perfect Number Checker that:
βοΈ Finds all divisors
βοΈ Calculates their sum
βοΈ Determines whether the number is perfect
Small projects like these help strengthen problem-solving and logic-building skills.
#Java#CodingJourney#Programming
Today's coding practice β
Implemented an Armstrong Number checker in Java from scratch, without using `Math.pow()`. Learned a lot about loops, digit operations, and problem-solving along the way.
Small steps, consistent progress! π
#Java#CodingJourney#Programming#Developer
π Learned how to find the Greatest Common Divisor (GCD/HCF) in Java today! It was a great exercise in understanding problem-solving, loops, and algorithmic thinking. One step closer to becoming a better developer. π»β¨
#Java#Programming#CodingJourney#LearnToCode