Day 10.... 💡 Today I Learned: Method Types & For Loop in Java 👨💻 In today’s programming class, I learned about two important method types in Java: 1️⃣ Method with Parameters and No Return Type 👉 This type of method takes input values (parameters) but does not return any value. It simply performs an operation and displays the result. 2️⃣ Method with Parameters and Return Type 👉 This type of method accepts parameters and returns a value of a specific data type. If the return type is `int`, the method returns an integer. If it is `float`, it returns a float, and so on. 🔁 The parameters and return types can also follow typecasting rules: Implicit Typecasting:Done automatically by Java (smaller → larger type) Explicit Typecasting:Done manually by the programmer (larger → smaller type) 🔄 Also Learned: For Loop in Java A for loop is used to repeat a block of code multiple times. It has four main parts: Initialization – Setting the starting point Condition – Checking whether to continue Updation– Increment or decrement Body – The code that executes repeatedly 🧠 The loop runs until the condition becomes false, then exits and moves to the next part of the program. 📚 I also practiced a few problems on methods and for loops, which helped me understand how Java handles operations step by step. 🚀 Learning by doing really makes programming more fun and meaningful! #Java #LearningJourney #ProgrammingBasics #ForLoop #MethodsInJava #CodingLife
Java Method Types and For Loop Basics
More Relevant Posts
-
On Day 5, I learned one of the most fundamental concepts in Java — the main method, which acts as the entry point of program execution. 🔹 Role of the Operating System Whenever a Java program starts: The Operating System (OS) gives control of execution to the Java program. The OS enters the class and searches for the main method. Once found, execution begins line by line inside the main method. 🔹 Why the main Method is Important The main method tells the JVM: “This is where program execution should begin.” Without the main method, a Java program cannot start execution. 🔹 Structure of the Main Method public static void main(String[] args) Each keyword has a specific purpose: public: Makes the main method accessible to the Operating System. static: Allows the OS to call the main method without creating an object of the class. void: Specifies that the method does not return any value. main: The predefined method name recognized by the JVM. String[] args: Used to accept command-line arguments, passed as an array of strings. 🔹 Class File and Execution When a Java program is compiled, a .class file is created. This class file contains bytecode. The JVM executes this bytecode starting from the main method. This session helped me clearly understand how Java programs start execution, how the OS interacts with Java, and why the main method is mandatory. Learning the fundamentals step by step 🚀 Trainer:Sharath R TAP Academy #Java #MainMethod #JavaBasics #ProgrammingFundamentals #LearningJourney #Day5Learning #JVM #Bytecode
To view or add a comment, sign in
-
-
✅ System.out.println(); in Java 👉 System.out.println(); ✨is used in Java to print output on the console (screen). ✨It is one of the most commonly used statements in Java programming. 🔹 Breakdown of System.out.println() ✅ 1. System System is a built-in class in Java. ✨It belongs to the java.lang package. ✨It provides useful methods and variables for input, output, and system-related operations. ✅ 2. out ✨out is a static object inside the System class. ✨It represents the standard output device (console). ✨It is of type PrintStream. 👉 Means: It is used to display output. ✅ 3. println() ✨println() is a method of PrintStream class. ✨It prints the given data and moves the cursor to the next line. ✅ How It Works ✨System → Java class ✨out → Console output object ✨println() → Prints data and goes to next line. ✨System.out.println() is used in Java to print data on the console. System is a class, out is a static PrintStream object representing the console, and println() is a method that prints the data and moves the cursor to the next line. ✨Thank you Anand Kumar Buddarapu Sir for your guidance and motivation. Learning from you was really helpful! 🙏 ✨Thank you Uppugundla Sairam Sir and Saketh Kallepu Sir for your guidance and inspiration. Truly grateful to learn under your leadership. 🙏 #Java #CoreJava #ProgrammingBasics #Coding #JavaLearning #StudentDeveloper #ComputerScience
To view or add a comment, sign in
-
-
🚀 Day 17 – Methods in Java | @ Tap Academy Today’s session was all about Methods in Java, one of the most important building blocks of Java programming. Methods help us organize code, improve readability, and promote reusability. 📌 What I learned today: 🔹 What is a method? A method is a block of code that performs a specific task and is defined inside a class. 🔹 Method Syntax: returnType methodName(parameters) { // method body } 🔹 Types of methods based on input & output: 1️⃣ No Input, No Output 2️⃣ No Input, With Output 3️⃣ With Input, No Output 4️⃣ With Input, With Output Understanding these combinations made it easier to design programs efficiently and write clean, structured Java code. ✨ This session really strengthened my fundamentals and gave me clarity on how methods work internally. #Day17#Java#MethodsInJava#CoreJava #TapAcademy#JavaProgramming #LearningJourney#FutureSoftwareDeveloper
To view or add a comment, sign in
-
-
day 4 series In Java, loops are used to repeat a block of code until a condition fails. Instead of writing the same code again and again, loops make your program short, clean, and powerful 💡 👇 Let’s break down the 3 most important loops in Java 👇 🔹 for loop ✅ Used when the number of iterations is known for (init; condition; increment/decrement) { // code } 👉 Best for: Tables Counting Array traversal 🔹 while loop ✅ Repeats code as long as the condition is TRUE while (condition) { // code } 👉 Best for: User input validation Unknown number of repetitions 🔹 do-while loop ✅ Runs at least once, then checks the condition do { // code } while (condition); 👉 Best for: Menus Login attempts Confirmation screens 🧠 Quick memory trick for → Count known while → Condition first do-while → At least once . more information follow Prem chandar If you’re learning Java fundamentals, mastering loops is a must before moving to real-world projects and interviews 💪 #JavaProgramming #LearnJava #CodingBasics #ProgrammingForBeginners #SoftwareDeveloper #TechLearning #DailyCoding #JavaDevelopers #InterviewPrep
To view or add a comment, sign in
-
DAY 11: CORE JAVA 🔹 Understanding Variables in Java & Memory Allocation in JRE While learning Java, one concept that truly strengthened my foundation is understanding how variables work and how memory is allocated inside the JRE. 📌 Types of Variables in Java: 1️⃣ Local Variables Declared inside methods, constructors, or blocks Stored in Stack Memory Exist only during method execution 2️⃣ Instance Variables Declared inside a class but outside methods Stored in Heap Memory Each object gets its own copy 🧠 How Memory is Allocated in JRE When a Java program runs, memory is divided mainly into: 🔹 Stack Memory Stores method calls, local variables Works in LIFO (Last In First Out) order Automatically cleared after method execution 🔹 Heap Memory Stores objects and instance variables Managed by Garbage Collector Objects remain until no longer reference 💡 Why This Matters Understanding memory allocation helps in: ✔ Writing optimized code ✔ Avoiding memory leaks ✔ Understanding stack overflow errors ✔ Building strong OOP fundamentals Learning these internal concepts makes Java much more logical and structured rather than just syntax-based coding. TAP Academy #Java #Programming #OOP #LearningJourney #SoftwareDevelopment #CoreJava
To view or add a comment, sign in
-
-
Java Tutorial 10 🚀 ► https://lnkd.in/gzBxxNGR ► Learn how to find the range of all primitive data types in Java. This tutorial covers memory allocation and value ranges for each type. Follow the example code to print the minimum and maximum values of byte, short, int, long, float, double, char, and boolean. Ideal for Java beginners! Java Tutorials Playlist: ► https://lnkd.in/g-MdeE8X #Java #Programming #Coding #JavaTutorial #LearnJava #SoftwareDevelopment
To view or add a comment, sign in
-
-
Java Tutorial 10 🚀 ► https://lnkd.in/gXaFeHgE ► Learn how to find the range of all primitive data types in Java. This tutorial covers memory allocation and value ranges for each type. Follow the example code to print the minimum and maximum values of byte, short, int, long, float, double, char, and boolean. Ideal for Java beginners! Java Tutorials Playlist: ► https://lnkd.in/gz2_iusM #Java #Programming #Coding #JavaTutorial #LearnJava #SoftwareDevelopment
To view or add a comment, sign in
-
-
Day 8 – Java | Pass by Value & Object Reference Behavior 🚀 Today’s learning at Tap Academy focused on how Java passes data to methods and how memory plays a key role in this behavior. I learned that Java always follows pass by value, but the outcome differs based on what is passed: For primitive data types, a copy of the value is passed, so changes inside a method do not affect the original variable. For objects, a copy of the reference is passed. Multiple references can point to the same object in heap memory, so changes made using one reference are reflected through others. Key takeaways: Difference between changing an object’s state vs changing the reference How stack and heap memory work together during method calls Why object data changes but primitive values don’t This session clarified one of the most commonly misunderstood concepts in Java and strengthened my understanding of memory management and OOP fundamentals. #Java #OOPS #PassByValue #ObjectReference #HeapMemory #StackMemory #TapAcademy #LearningJourney #Day8
To view or add a comment, sign in
-
-
Java Just Got Simpler with Java 25 Java is evolving to reduce boilerplate and improve developer productivity. This visual shows how writing a simple Java program is becoming cleaner and more beginner-friendly. Before Java 25 - Required class declaration - Mandatory public static void main(String[] args) - More boilerplate for basic programs After Java 25 - No explicit class declaration - Simplified main method - Faster setup for beginners and rapid testing Why this update matters: - Easier learning curve for students - Cleaner code for quick experiments - Better focus on logic, not syntax - Ideal for academic projects and assignments If you need help with Java assignments, version upgrades, or project implementation, message us or click the link to get expert support. Follow me Md Shibly Sadik for more #Java #Java25 #Programming #SoftwareDevelopment #ComputerScience #CodingHelp #StudentSupport #LearnJava
To view or add a comment, sign in
-
-
Day 10 – Learning Java Full Stack Today let's learn about While Loop. The while loop is used when we want to execute a block of code repeatedly as long as a condition is true. Syntax: while (condition) { // loop body } The loop keeps running until the condition becomes false. Example: int a = 1; while (a <= 5) { System.out.println("JAVA"); a++; } Execution Flow: When a = 1 → JAVA When a = 2 → JAVA When a = 3 → JAVA When a = 4 → JAVA When a = 5 → JAVA When a = 6 → Condition becomes false → Loop terminates Key takeaway: A while loop is condition-based repetition. If the condition never becomes false, it can lead to an infinite loop — so updating the variable is very important. More learning updates coming soon #Java #JavaFullStack #WhileLoop #ControlStatements #LearningInPublic #CoreJava
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
Great breakdown! Methods and loops are the bread and butter of programming. Understanding the difference between void and return types early on makes debugging so much easier later. Keep it up!