Random Java Knowledge Drop Did you know? 👀 In Java, calling run() on a thread does NOT create a new thread. It runs just like a normal method on the current thread. 👉 Only start() creates a new thread and calls run() internally. Why this matters: Many beginners think run() = multithreading ❌ This mistake can cause performance issues and bugs Small concepts like these make a big difference in real projects. Learning Java one concept at a time 🚀 More such small knowledge drops coming soon! 👍 Like if this was new to you 💬 Comment if you already knew this #Java #Learning #DeveloperTips #Programming #JavaDeveloper
Java run() vs start(): Understanding Thread Creation
More Relevant Posts
-
🚀 Day – Java Learning Update ⏳ 🎯 Understanding Switch Case in Java Today, I learned about the Switch Case statement in Java, which is used to execute different blocks of code based on the value of a variable or expression. It is mainly used when we have multiple conditions to check for a single variable, making the code more readable compared to many if-else statements. 🔹 What is Switch Case? The switch statement allows a variable to be tested against multiple possible values called cases. ✔ Each case represents a possible value ✔ break stops execution after a case runs ✔ default runs if no case matches 🔹 Syntax of Switch Case switch(expression) { case value1: // code block break; case value2: // code block break; case value3: // code block break; default: // default code block } 🧑💻 Task Practiced: Traffic Signal Program I implemented a simple program using switch case to represent a traffic signal. #Java #CoreJava #JavaFullStack #SwitchCase #Programming #SoftwareDeveloper #LearningJourney 10000 Coders Meghana M
To view or add a comment, sign in
-
-
Learning Java for nearly two years has presented challenges, particularly in finding well-structured notes that cover concepts clearly in one place. To address this, I started creating my own notes—typed so they can be easily updated and improved over time. It took a lot of effort, but the result has been very rewarding. I'm sharing this document here in case it helps other Java developers or students in their learning journey. This document currently covers Java Collections Framework concepts, including core interfaces, common implementations, and Concurrent Collections used in multithreaded environments. Feel free to use it, and let me know if it helps you in learning Java. #Java #JavaDeveloper #JavaCollections #ConcurrentProgramming #Programming #JavaNotes
To view or add a comment, sign in
-
Day 26 of Learning Java ☕ Today, I practiced Access Modifiers in Java and learned how they help control the visibility of variables, methods, and classes. What I learned: • public – Accessible from anywhere • private – Accessible only within the same class • protected – Accessible within the same package or subclasses • default (no keyword) – Accessible only within the same package Why access modifiers are important: • They improve security • They help with data hiding • They make code more structured and maintainable #Java #JavaLearning #AccessModifiers #Programming #CodingJourney #LearnJava #DeveloperJourney #StudentLife
To view or add a comment, sign in
-
-
⚡ Small concept, big impact in Java! While learning Java, I realized that Arrays are powerful but they also come with some important limitations. 🔹 Arrays store only homogeneous data types 🔹 Their size is fixed once created 🔹 They require contiguous memory allocation Because of these limitations, Java provides Collections like ArrayList and LinkedList, which support dynamic resizing and more flexibility. Understanding these fundamentals helps developers choose the right data structure for better and efficient programs. 📚 Learning step by step and strengthening my Java foundation as a Full Stack Developer. 💬 Do you prefer Arrays or Collections while coding in Java? #TapAcademy #Java #JavaDeveloper #Programming #DataStructures #SoftwareDevelopment #CodingJourney #LearningInPublic
To view or add a comment, sign in
-
-
💻 Java Programming Practice – Capitalize First Letter of Each Word. Today I practiced a Java program to capitalize the first letter of each word in a sentence. 📌 What this program does: • Takes a sentence input from the user • Splits the sentence into individual words • Converts the first character of each word to uppercase • Displays the updated sentence ✅ Example: Input: good morning Output: Good Morning 💡 Concepts used in this program: ✔ Java Scanner input ✔ String split() method ✔ Character array conversion ✔ Loops and conditions I am practicing Java programs daily to improve my coding and problem-solving skills for IT placements. #Java #Programming #CodingPractice #JavaDeveloper #Learning #SoftwareDevelopment
To view or add a comment, sign in
-
-
💻 Java Programming Practice – Count Repeated Character. Today I practiced a Java program to count how many times a character appears in a string. 📌 What this program does: • Takes a string input from the user • Takes a character to check • Compares the character with each letter in the string • Counts how many times the character appears ✅ Example: String: saravanan Character: a Output: Repeated character count = 4 💡 Concepts used in this program: ✔ Java Scanner input ✔ String methods ✔ For loop ✔ Character comparison I am practicing Java programs daily to improve my coding and problem-solving skills for IT placements. #Java #Programming #CodingPractice #JavaDeveloper #Learning #SoftwareDevelopment
To view or add a comment, sign in
-
-
🔷️Continuing My Java Learning Series – Exception Handling Today I focused on Exception Handling in Java, which helps make programs more robust and error-free. ✔️ Try–Catch Block – Handles runtime errors gracefully. ✔️ Finally Block – Executes important cleanup code. ✔️ Throw & Throws – Used to create and declare exceptions. ✔️ Custom Exceptions – Helps design better application-specific error handling. Proper exception handling improves program stability and user experience. Learning step by step and improving every day 💻 #Java #ExceptionHandling #Programming #JavaDeveloper #CodingJourney #Learning
To view or add a comment, sign in
-
Day 22-What I Learned In a Day(JAVA) Today I learned about method calling in Java. I practiced how a method can be called multiple times from the main() method. I also understood that when calling a method, we can pass arguments in two ways: 1️⃣ Directly passing values m1(10); 2️⃣ Passing values through a variable int a = 10; m1(a); Both approaches will pass the value to the method parameter and execute the method. Through this practice, I improved my understanding of method creation, parameter passing, and method execution flow in Java. Hashtags Practiced 👇 #Java #CoreJava #JavaLearning #Programming #CodingJourney #JavaMethods #LearnJava #Developers #TechLearning #DailyLearning
To view or add a comment, sign in
-
💻 Java Programming Practice – Find the Largest Word in a Sentence. Today I practiced a Java program to find the largest word in a sentence. 📌 What this program does: • Takes a sentence input from the user • Splits the sentence into individual words • Compares the length of each word • Displays the largest word in the sentence ✅ Example: Sentence: I am Dinesh from Tiruvannamalai Output: Largest word in the sentence = Tiruvannamalai 💡 Concepts used in this program: ✔ Java Scanner input ✔ String split() method ✔ Loops ✔ String length comparison I am practicing Java programs daily to improve my coding and problem-solving skills for IT placements. #Java #Programming #CodingPractice #JavaDeveloper #Learning #SoftwareDevelopment
To view or add a comment, sign in
-
-
📘 Back to Learning Java – Rules of Method Overloading After a short break of a week, I started learning again and today’s focus was on Rules of Method Overloading, beginning with the first rule: Access Modifiers. 🔹 Access Modifiers are used to modify the accessibility (visibility) of variables and methods. We learned the four types of access modifiers in Java: 1️⃣ Public ✔ Can be used in the same class ✔ Different class in the same package ✔ Different package (with and without inheritance) 2️⃣ Protected ✔ Can be used in the same class ✔ Different class in the same package ✔ Different package (only if it is inherited) 3️⃣ Package (Default) ✔ Can be used in the same class ✔ Same package 4️⃣ Private ✔ Can be used only inside the same class ❌ Cannot be inherited or accessed outside the class 💡 To understand this better, we created multiple packages and classes and tested how each access modifier behaves in different scenarios. 🔎 Key Conclusion: If you use access modifiers from bottom → top, the accessibility/visibility increases. private → package → protected → public If you use them from top → bottom, the visibility decreases. Always interesting to see how these concepts work practically while coding! 💻 #Java #LearningJava #AccessModifiers #Programming #CodingJourney #SoftwareDevelopment
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