Today I explored how multithreading works in Java. Instead of running tasks one by one, threads allow multiple tasks to execute parallelly, improving performance and efficiency. 🔥 In this program, I created three separate threads: ✅ One takes user input and performs addition ✅ One prints numbers ✅ One prints characters The interesting part? ✔ Using .run() → tasks execute sequentially ✔ Using .start() → each task runs in its own thread, at the same time Here’s the output behavior 👇 🧵 All three tasks run concurrently, and each one completes independently. I’ve attached the code screenshot below. ⬇️ Learning in small steps every day. 🚀 #Java #Multithreading #Programming #Threads #CodingJourney #LearnByDoing #JavaDeveloper #TapAcademy
Dileep Kumar’s Post
More Relevant Posts
-
Day 6 of #50DaysOfCode – Java Today I practiced arrays and loops by writing a program to take 5 numbers from the user and calculate their sum and average. 💻 What I did: Stored numbers in an array Calculated the sum using a for loop Calculated the average and displayed the results 🧠 Concepts learned: Arrays (int[]) Loops (for) Arithmetic operations (+, /) Input/output using Scanner Excited to keep learning step by step! 💪 #Java #LearnInPublic #CodingJourney #50DaysOfCode #Programming
To view or add a comment, sign in
-
Day 7 of #50DaysOfCode – Java Today I practiced arrays and conditional statements by writing a program to find the smallest number from five user inputs. 💻 What I did: Took 5 numbers from the user Stored them in an array Used a loop and if condition to find the smallest number 🧠 Concepts learned: Arrays (int[]) Loops (for) Conditional statements (if) Input/output using Scanner Step by step, getting stronger with Java! 💪 #Java #CodingJourney #LearnInPublic #Programming #50DaysOfCode
To view or add a comment, sign in
-
Day 9 of #50DaysOfCode – Java Today I practiced loops and arithmetic operations by writing a program to find the factorial of a given number. 💻 What I did: Took a number as input from the user Used a for loop to multiply numbers from 1 to n Displayed the factorial result 🧠 Concepts learned: Loops (for) Multiplication operations (*) Input/output using Scanner Step-by-step progress in Java! 💪 #Java #CodingJourney #LearnInPublic #Programming #50DaysOfCode
To view or add a comment, sign in
-
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
-
-
Day 5:- Today, I explored one of the most powerful parts of Java, Looping and Jump Statements! 🔁✨ Here’s what I learned 👇 => Looping Statements 1. for loop :-Best for fixed number of iterations 2. while loop :-Runs until the condition becomes false 3. do-while loop :- Executes at least once before checking the condition => Jump Statements 4. break :-Exits the loop immediately 5. continue :-Skips the current iteration and moves to the next 6. return :-Exits from the current method What I realized: Loops make code efficient by reducing repetition, and jump statements give us control inside loops! Excited to move toward the next Java concepts! #Java #LearningJourney #Programming #day5 #CodeNewbie
To view or add a comment, sign in
-
Day 8 of #50DaysOfCode – Java Today I practiced loops and conditional statements by writing a program to print all even numbers from 1 to 50. 💻 What I did: Used a for loop to iterate from 1 to 50 Checked each number using the modulus (%) operator Printed all even numbers 🧠 Concepts learned: Loops (for) Conditional statements (if) Modulus operator (%) Learning Java step by step! 💪 #Java #LearnInPublic #CodingJourney #Programming #50DaysOfCode
To view or add a comment, sign in
-
💻 Exploring Patterns in Java! Today, I implemented a simple yet classic program — a Hollow Square Pattern using nested loops in Java. This program helps in understanding: ✅ The logic behind nested for-loops ✅ The use of conditional statements for pattern control ✅ How small programs improve logical thinking & coding structure Here’s the output for input 3: *** * * *** Every line of code brings a new learning opportunity. 🔥 #Java #Programming #PatternPrinting #DeveloperJourney #CodingPractice #LogicBuilding #LearnWithCode
To view or add a comment, sign in
-
-
🚀 Exploring Java Fundamentals with a Practical Twist! Just shared a simple yet powerful Java program that identifies numbers divisible by both 3 and 5 within a user-defined range. It’s a great example of how object-oriented design and basic control structures come together to solve real-world problems. 🔍 What it does: Prompts the user for a range Iterates through numbers from 0 to that range Prints numbers divisible by both 3 and 5 💡 Whether you're just starting out or brushing up on your Java skills, this snippet is a great reminder of how clarity and logic go hand in hand in programming. #Java #Programming #ObjectOrientedDesign #CodingJourney #TechLearning #LinkedInLearning #SoftwareDevelopment
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
-
I'm excited to share my comprehensive notes on Object-Oriented Programming (OOPs) in Java! ☕️ Abstraction, Encapsulation, Inheritance, Polymorphism... mastering these core principles is crucial for building robust and scalable applications. I've compiled the key concepts and practical examples in one place. Check it out and let me know your thoughts or favorite OOPs principle! 👇 #Java #OOPs #Programming #SoftwareDevelopment #CS #TechNotes #LearningJourney
To view or add a comment, sign in
More from this author
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