<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: scindia bethuraj</title>
    <description>The latest articles on Forem by scindia bethuraj (@scindia_bethuraj_7ffec81b).</description>
    <link>https://forem.com/scindia_bethuraj_7ffec81b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3778178%2Ffd1a538c-202c-42b9-a970-2a6a50cad67c.png</url>
      <title>Forem: scindia bethuraj</title>
      <link>https://forem.com/scindia_bethuraj_7ffec81b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/scindia_bethuraj_7ffec81b"/>
    <language>en</language>
    <item>
      <title>Day 9 of My Java Automation Journey – Understanding Types of Inheritance</title>
      <dc:creator>scindia bethuraj</dc:creator>
      <pubDate>Wed, 04 Mar 2026 20:30:56 +0000</pubDate>
      <link>https://forem.com/scindia_bethuraj_7ffec81b/day-9-of-my-java-automation-journey-understanding-types-of-inheritance-4e5p</link>
      <guid>https://forem.com/scindia_bethuraj_7ffec81b/day-9-of-my-java-automation-journey-understanding-types-of-inheritance-4e5p</guid>
      <description>&lt;p&gt;Trainer : Mr. Nantha&lt;br&gt;
Day 9&lt;br&gt;
Understanding inheritance is essential because it helps in code reuse, structured design, and real-world modeling.&lt;/p&gt;

&lt;p&gt;What is Inheritance in Java?&lt;/p&gt;

&lt;p&gt;Inheritance is a mechanism in Java where a child class acquires the properties and behaviors of a parent class.&lt;/p&gt;

&lt;p&gt;It represents an IS-A relationship.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;Developer is an Employee&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SeniorDeveloper is a Developer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This allows classes to reuse existing code instead of rewriting it.&lt;/p&gt;

&lt;p&gt;Types of Inheritance in Java&lt;/p&gt;

&lt;p&gt;Java supports several inheritance structures:&lt;/p&gt;

&lt;p&gt;Single Inheritance&lt;/p&gt;

&lt;p&gt;Multiple Inheritance&lt;/p&gt;

&lt;p&gt;Hierarchical Inheritance&lt;/p&gt;

&lt;p&gt;Multilevel Inheritance&lt;/p&gt;

&lt;p&gt;Hybrid Inheritance&lt;/p&gt;

&lt;p&gt;Let’s explore each one.&lt;/p&gt;

&lt;p&gt;Single Inheritance&lt;br&gt;
Definition&lt;/p&gt;

&lt;p&gt;Single inheritance occurs when one child class inherits from one parent class.&lt;/p&gt;

&lt;p&gt;Structure&lt;br&gt;
Parent → Child&lt;br&gt;
Example&lt;br&gt;
Animal → Dog&lt;br&gt;
Code Example&lt;br&gt;
class Animal {&lt;br&gt;
    void eat() {&lt;br&gt;
        System.out.println("Animal eats food");&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;class Dog extends Animal {&lt;br&gt;
    void bark() {&lt;br&gt;
        System.out.println("Dog barks");&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
Explanation&lt;/p&gt;

&lt;p&gt;Dog inherits the eat() method from Animal.&lt;/p&gt;

&lt;p&gt;Dog also has its own method bark().&lt;/p&gt;

&lt;p&gt;This improves code reusability.&lt;br&gt;
Multiple Inheritance&lt;br&gt;
Definition&lt;/p&gt;

&lt;p&gt;Multiple inheritance occurs when one child class inherits from more than one parent class.&lt;/p&gt;

&lt;p&gt;Structure&lt;br&gt;
Parent1&lt;br&gt;
   \&lt;br&gt;
    Child&lt;br&gt;
   /&lt;br&gt;
Parent2&lt;br&gt;
Example (Conceptual)&lt;br&gt;
Father&lt;br&gt;
   \&lt;br&gt;
    Child&lt;br&gt;
   /&lt;br&gt;
Mother&lt;br&gt;
Problem – Ambiguity Issue&lt;/p&gt;

&lt;p&gt;If both parents have the same method:&lt;/p&gt;

&lt;p&gt;void work()&lt;/p&gt;

&lt;p&gt;Java cannot determine:&lt;/p&gt;

&lt;p&gt;Should the child use Father.work()&lt;br&gt;
or&lt;/p&gt;

&lt;p&gt;Mother.work()?&lt;/p&gt;

&lt;p&gt;This confusion is called the Ambiguity Problem.&lt;/p&gt;

&lt;p&gt;Important Rule&lt;/p&gt;

&lt;p&gt;🚫 Java does NOT support multiple inheritance using classes.&lt;/p&gt;

&lt;p&gt;Example that causes an error:&lt;/p&gt;

&lt;p&gt;class Child extends Father, Mother { }&lt;/p&gt;

&lt;p&gt;This will produce a compile-time error.&lt;/p&gt;

&lt;p&gt;But Java Allows Multiple Inheritance via Interfaces&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;interface Camera {&lt;br&gt;
    void takePhoto();&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;interface MusicPlayer {&lt;br&gt;
    void playMusic();&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;class Smartphone implements Camera, MusicPlayer {&lt;br&gt;
    public void takePhoto() {&lt;br&gt;
        System.out.println("Taking Photo");&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public void playMusic() {
    System.out.println("Playing Music");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Here a class can implement multiple interfaces safely.&lt;/p&gt;

&lt;p&gt;Hierarchical Inheritance&lt;br&gt;
Definition&lt;/p&gt;

&lt;p&gt;Hierarchical inheritance occurs when multiple child classes inherit from a single parent class.&lt;/p&gt;

&lt;p&gt;Structure&lt;br&gt;
        Vehicle&lt;br&gt;
        /     \&lt;br&gt;
      Car    Bike&lt;br&gt;
Example Code&lt;br&gt;
class Vehicle {&lt;br&gt;
    void start() {&lt;br&gt;
        System.out.println("Vehicle starts");&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;class Car extends Vehicle {&lt;br&gt;
    void drive() {&lt;br&gt;
        System.out.println("Car drives");&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;class Bike extends Vehicle {&lt;br&gt;
    void ride() {&lt;br&gt;
        System.out.println("Bike rides");&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
Explanation&lt;/p&gt;

&lt;p&gt;Both Car and Bike inherit the start() method from Vehicle.&lt;/p&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;p&gt;Code reuse&lt;/p&gt;

&lt;p&gt;Better organization&lt;/p&gt;

&lt;p&gt;Common functionality centralized&lt;/p&gt;

&lt;p&gt;Multilevel Inheritance&lt;br&gt;
Definition&lt;/p&gt;

&lt;p&gt;Multilevel inheritance occurs when a class inherits from another class, and then another class inherits from that class.&lt;/p&gt;

&lt;p&gt;Structure&lt;br&gt;
Grandparent → Parent → Child&lt;br&gt;
Example&lt;br&gt;
Animal → Dog → Puppy&lt;br&gt;
Code Example&lt;br&gt;
class Animal {&lt;br&gt;
    void eat() {&lt;br&gt;
        System.out.println("Animal eats");&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;class Dog extends Animal {&lt;br&gt;
    void bark() {&lt;br&gt;
        System.out.println("Dog barks");&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;class Puppy extends Dog {&lt;br&gt;
    void weep() {&lt;br&gt;
        System.out.println("Puppy weeps");&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
Execution&lt;br&gt;
Puppy p = new Puppy();&lt;/p&gt;

&lt;p&gt;p.eat();   // from Animal&lt;br&gt;
p.bark();  // from Dog&lt;br&gt;
p.weep();  // from Puppy&lt;br&gt;
Output&lt;br&gt;
Animal eats&lt;br&gt;
Dog barks&lt;br&gt;
Puppy weeps&lt;/p&gt;

&lt;p&gt;Why Multilevel Inheritance is Powerful&lt;/p&gt;

&lt;p&gt;✔ Reusability across multiple layers&lt;br&gt;
✔ Represents real-world hierarchies&lt;br&gt;
✔ Makes code scalable&lt;br&gt;
✔ Easy to extend functionality&lt;/p&gt;

&lt;p&gt;Real-world example:&lt;/p&gt;

&lt;p&gt;Person → Employee → Developer → SeniorDeveloper&lt;/p&gt;

&lt;p&gt;Hybrid Inheritance&lt;br&gt;
Definition&lt;/p&gt;

&lt;p&gt;Hybrid inheritance is a combination of two or more inheritance types.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Multilevel + Hierarchical&lt;/p&gt;

&lt;p&gt;Structure Example&lt;br&gt;
        Vehicle&lt;br&gt;
       /      \&lt;br&gt;
     Car     Bike&lt;br&gt;
       |&lt;br&gt;
   ElectricCar&lt;br&gt;
Important Rule&lt;/p&gt;

&lt;p&gt;Java does not support hybrid inheritance using classes directly because it may involve multiple inheritance, which causes ambiguity.&lt;/p&gt;

&lt;p&gt;However, it can be achieved using interfaces.&lt;br&gt;
Key Concepts Learned Today&lt;/p&gt;

&lt;p&gt;✔ Types of inheritance in Java&lt;br&gt;
✔ Why Java avoids multiple inheritance with classes&lt;br&gt;
✔ Ambiguity problem&lt;br&gt;
✔ Hierarchical inheritance structure&lt;br&gt;
✔ Multilevel inheritance&lt;br&gt;
✔ Introduction to method overriding&lt;br&gt;
✔ Real-world class hierarchy design&lt;/p&gt;

</description>
      <category>automation</category>
      <category>beginners</category>
      <category>java</category>
      <category>programming</category>
    </item>
    <item>
      <title>Constructors, Default Values &amp; Object Initialization in Java</title>
      <dc:creator>scindia bethuraj</dc:creator>
      <pubDate>Fri, 27 Feb 2026 04:33:54 +0000</pubDate>
      <link>https://forem.com/scindia_bethuraj_7ffec81b/constructors-default-values-object-initialization-in-java-330l</link>
      <guid>https://forem.com/scindia_bethuraj_7ffec81b/constructors-default-values-object-initialization-in-java-330l</guid>
      <description>&lt;p&gt;Trainer: Mr.Nantha&lt;br&gt;
Day-7&lt;/p&gt;

&lt;p&gt;Overview&lt;/p&gt;

&lt;p&gt;Today’s session focused on three important topics in Java: default values, constructors, and object initialization.&lt;/p&gt;

&lt;p&gt;Constructors&lt;/p&gt;

&lt;p&gt;Constructors are special methods used to create and initialize objects in Java. They allow developers to set up an object’s initial state when it is instantiated.&lt;/p&gt;

&lt;p&gt;Important Rules&lt;/p&gt;

&lt;p&gt;(1) Constructor name must be same as class name.&lt;/p&gt;

&lt;p&gt;(2) It does not have a return type (not even void).&lt;/p&gt;

&lt;p&gt;(3) It runs automatically when object is created.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
class Student {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String name;

// Constructor
Student(String n) {
    name = n;
}

public static void main(String[] args) {
    Student s1 = new Student("Arjun");
    System.out.println(s1.name);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Arjun&lt;/p&gt;

&lt;p&gt;What Happens Here?&lt;br&gt;
Student s1 = new Student("Arjun");&lt;/p&gt;

&lt;p&gt;✔ Memory is created in Heap&lt;br&gt;
✔ Constructor runs automatically&lt;br&gt;
✔ Variable name gets initialized&lt;/p&gt;

&lt;p&gt;Default Values in Java&lt;/p&gt;

&lt;p&gt;When we create an object, Java automatically assigns default values to instance variables if we do not initialize them.&lt;/p&gt;

&lt;p&gt;Default Values for Instance Variables:&lt;/p&gt;

&lt;p&gt;|Data Type|       |Default Value|&lt;/p&gt;

&lt;p&gt;|int|                      |0|&lt;br&gt;
|double|               |0.0|&lt;br&gt;
|float|                    |0.0f|&lt;br&gt;
|boolean|              |false|&lt;br&gt;
|char|                     |'\u0000' (empty character)|&lt;br&gt;
|String (or any object)|   |null|&lt;/p&gt;

&lt;p&gt;Default Values&lt;/p&gt;

&lt;p&gt;Default values refer to the initial values assigned to fields or variables when an object is created, especially if no explicit value is provided.&lt;/p&gt;

&lt;p&gt;Object Initialization&lt;/p&gt;

&lt;p&gt;Object initialization is the process that occurs when an object is created, involving the assignment of default values and the execution of constructors to prepare the object for use.&lt;/p&gt;

&lt;p&gt;Default Values vs Constructor Initialization&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  |Default Values|                          |Constructor|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;|Assigned automatically by Java|                  |Assigned by programmer|&lt;br&gt;
|Only for instance variables|                 |Used to set custom values|&lt;br&gt;
|Cannot control value|                        |Can control initialization|&lt;/p&gt;

&lt;p&gt;Object Initialization in Java&lt;/p&gt;

&lt;p&gt;Object Initialization means assigning values to the variables of an object when it is created.&lt;/p&gt;

&lt;p&gt;When we create an object using the new keyword, memory is allocated in the Heap. Then the object’s variables must be initialized with values.&lt;/p&gt;

&lt;p&gt;Why Object Initialization is Important?&lt;/p&gt;

&lt;p&gt;Prevents null or default value issues&lt;/p&gt;

&lt;p&gt;Makes object ready to use&lt;/p&gt;

&lt;p&gt;Improves code clarity&lt;/p&gt;

&lt;p&gt;Example: Which I practiced in class today for Constructor.&lt;/p&gt;

&lt;p&gt;package Constructor;&lt;/p&gt;

&lt;p&gt;public class School {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    int id;

    //Constructor
    School(int stdId)
    {
        this.id = stdId;
    }



    public static void main(String[] args) {

        School yogesh = new School (101);
        System.out.println(yogesh.id);

    }
}   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Output:&lt;br&gt;
101&lt;/p&gt;

&lt;p&gt;Key Takeaways&lt;/p&gt;

&lt;p&gt;•  Constructors are special methods that are used to create and initialize objects, allowing developers to set up the initial state of an object upon instantiation.&lt;/p&gt;

&lt;p&gt;•  Default values are the initial values assigned to fields or variables in Java when no explicit value is provided.&lt;/p&gt;

&lt;p&gt;•  Object initialization involves both the assignment of default values and the execution of constructors, ensuring that objects are properly prepared for use in Java programs.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>oop</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Understanding Operators in Java</title>
      <dc:creator>scindia bethuraj</dc:creator>
      <pubDate>Wed, 25 Feb 2026 15:38:00 +0000</pubDate>
      <link>https://forem.com/scindia_bethuraj_7ffec81b/understanding-operators-in-java-3ndi</link>
      <guid>https://forem.com/scindia_bethuraj_7ffec81b/understanding-operators-in-java-3ndi</guid>
      <description>&lt;p&gt;Trainer: Mr.Nantha&lt;br&gt;
Day 6&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview of Java Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What are Operators in Java?&lt;/p&gt;

&lt;p&gt;Operators are special symbols used to perform operations on variables and values.&lt;/p&gt;

&lt;p&gt;In simple words, operators make it possible to carry out calculations, comparisons, and logical operations in a program.&lt;/p&gt;

&lt;p&gt;After understanding how to declare and initialize variables, it is essential to explore their practical applications. Gaining proficiency in the operators of the Java programming language serves as an important next step. Operators are specialized symbols that execute defined operations on one, two, or three operands, subsequently yielding a result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
int a = 10;&lt;br&gt;
int b = 5;&lt;br&gt;
int sum = a + b;&lt;/p&gt;

&lt;p&gt;Here,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;is an operator
It adds a and b.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Types of Operators in Java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arithmetic Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Java programming language provides operators that perform addition, subtraction, multiplication, and division. There's a good chance you'll recognize them by their counterparts in basic mathematics. The only symbol that might look new to you is "%", which divides one operand by another and returns the remainder as its result.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;int result = 10 % 3;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Unary Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The unary operators require only one operand; they perform various operations such as incrementing/decrementing a value by one, negating an expression, or inverting the value of a Boolean.&lt;/p&gt;

&lt;p&gt;|Operator|  |Description|&lt;/p&gt;

&lt;p&gt;|+|       |Unary plus operator; indicates positive value (numbers are &lt;br&gt;
positive without this, however)|&lt;br&gt;
  |-|      |Unary minus operator; negates an expression|&lt;br&gt;
|++|      |Increment operator; increments a value by 1|&lt;br&gt;
|--|      |Decrement operator; decrements a value by 1|&lt;br&gt;
|!|   |Logical complement operator; inverts the value of a boolean|&lt;/p&gt;

&lt;p&gt;The increment/decrement operators can be applied before (prefix) or after (postfix) the operand. The code result++; and ++result; will both end in result being incremented by one. The only difference is that the prefix version (++result) evaluates to the incremented value, whereas the postfix version (result++) evaluates to the original value. If you are just performing a simple increment/decrement, it doesn't really matter which version you choose. But if you use this operator in part of a larger expression, the one that you choose may make a significant difference.&lt;/p&gt;

&lt;p&gt;What is Increment Operator?&lt;/p&gt;

&lt;p&gt;++ is called the increment operator.&lt;br&gt;
It increases the value of a variable by 1.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;int a = 5;&lt;br&gt;
a++;   // now a becomes 6&lt;/p&gt;

&lt;p&gt;re-Increment (++a)&lt;/p&gt;

&lt;p&gt;👉 Value is increased first, then used.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
int a = 5;&lt;br&gt;
int b = ++a;&lt;/p&gt;

&lt;p&gt;Step-by-step:&lt;/p&gt;

&lt;p&gt;a becomes 6&lt;/p&gt;

&lt;p&gt;b gets 6&lt;/p&gt;

&lt;p&gt;Final Values:&lt;/p&gt;

&lt;p&gt;a = 6&lt;br&gt;
b = 6&lt;br&gt;
Post-Increment (a++)&lt;/p&gt;

&lt;p&gt;👉 Value is used first, then increased.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
int a = 5;&lt;br&gt;
int b = a++;&lt;/p&gt;

&lt;p&gt;Step-by-step:&lt;/p&gt;

&lt;p&gt;b gets 5&lt;/p&gt;

&lt;p&gt;then a becomes 6&lt;/p&gt;

&lt;p&gt;Final Values:&lt;/p&gt;

&lt;p&gt;a = 6&lt;br&gt;
b = 5&lt;/p&gt;

&lt;p&gt;Easy Trick to Remember&lt;/p&gt;

&lt;p&gt;Pre = Change first&lt;br&gt;
Post = Print first&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Equality, Relational, and Conditional Operators&lt;/strong&gt;&lt;br&gt;
The Equality and Relational Operators&lt;br&gt;
The equality and relational operators determine if one operand is greater than, less than, equal to, or not equal to another operand. The majority of these operators will probably look familiar to you as well. Keep in mind that you must use "==", not "=", when testing if two primitive values are equal.&lt;/p&gt;

&lt;p&gt;|==|      |equal to|&lt;br&gt;
|!=|     |not equal to|&lt;br&gt;
|&amp;gt; |      |greater than|&lt;br&gt;
|&amp;gt;= |     |greater than or equal to|&lt;br&gt;
|&amp;lt; |        |less than|&lt;br&gt;
|&amp;lt;= |     |less than or equal to|&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Conditional Operators&lt;/strong&gt;&lt;br&gt;
The &amp;amp;&amp;amp; and || operators perform Conditional-AND and Conditional-OR operations on two boolean expressions. These operators exhibit "short-circuiting" behavior, which means that the second operand is evaluated only if needed.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp; Conditional-AND&lt;br&gt;
|| Conditional-OR&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TASK :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;int a = 5;&lt;br&gt;
    int b = 7;&lt;br&gt;
    int c = 10;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int result = a++ + a-- - --a + --b - ++c -  --c;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;What is the result?&lt;br&gt;
a++&lt;br&gt;
Post-increment → use a first, then increment&lt;/p&gt;

&lt;p&gt;Value used = 5&lt;/p&gt;

&lt;p&gt;Then a becomes 6&lt;/p&gt;

&lt;p&gt;So first part = 5&lt;/p&gt;

&lt;p&gt;a = 6&lt;/p&gt;

&lt;p&gt;a--&lt;/p&gt;

&lt;p&gt;Post-decrement → use a first, then decrement&lt;/p&gt;

&lt;p&gt;Value used = 6&lt;/p&gt;

&lt;p&gt;Then a becomes 5&lt;/p&gt;

&lt;p&gt;Second part = 6&lt;/p&gt;

&lt;p&gt;a = 5&lt;/p&gt;

&lt;p&gt;--a&lt;/p&gt;

&lt;p&gt;Pre-decrement → decrement first, then use&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a = 4&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Value used = 4&lt;/p&gt;

&lt;p&gt;Third part = 4&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a = 4&lt;/strong&gt;&lt;br&gt;
--b&lt;/p&gt;

&lt;p&gt;Pre-decrement → decrement first, then use&lt;br&gt;
**&lt;br&gt;
b = 6**&lt;/p&gt;

&lt;p&gt;Value used = 6&lt;/p&gt;

&lt;p&gt;Fourth part = 6&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b = 6&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;++c&lt;/p&gt;

&lt;p&gt;Pre-increment → increment first, then use&lt;/p&gt;

&lt;p&gt;c = 11&lt;/p&gt;

&lt;p&gt;Value used = 11&lt;/p&gt;

&lt;p&gt;Fifth part = 11&lt;/p&gt;

&lt;p&gt;c = 11&lt;br&gt;
--c&lt;/p&gt;

&lt;p&gt;Pre-decrement → decrement first, then use&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c = 10&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Value used = 10&lt;/p&gt;

&lt;p&gt;Sixth part = 10&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c = 10&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Combine Everything&lt;/p&gt;

&lt;p&gt;The expression:&lt;/p&gt;

&lt;p&gt;result = a++ + a-- - --a + --b - ++c - --c&lt;/p&gt;

&lt;p&gt;Substitute values used in order:&lt;/p&gt;

&lt;p&gt;result = 5 + 6 - 4 + 6 - 11 - 10&lt;/p&gt;

&lt;p&gt;5 + 6 = 11&lt;/p&gt;

&lt;p&gt;11 - 4 = 7&lt;/p&gt;

&lt;p&gt;7 + 6 = 13&lt;/p&gt;

&lt;p&gt;13 - 11 = 2&lt;/p&gt;

&lt;p&gt;2 - 10 = -8&lt;/p&gt;

&lt;p&gt;Final Values of Variables&lt;/p&gt;

&lt;p&gt;After the expression:&lt;/p&gt;

&lt;p&gt;a = 4&lt;br&gt;
b = 6&lt;br&gt;
c = 10&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways – Operators &amp;amp; Increment/Decrement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Operators are symbols used to perform operations on variables and values.&lt;/p&gt;

&lt;p&gt;Arithmetic, Relational, Logical, Assignment, Unary are main types of operators in Java.&lt;/p&gt;

&lt;p&gt;Increment (++) and Decrement (--) can be prefix or postfix:&lt;/p&gt;

&lt;p&gt;Prefix (++a / --a) → value changes first, then used.&lt;/p&gt;

&lt;p&gt;Postfix (a++ / a--) → value used first, then changes.&lt;/p&gt;

&lt;p&gt;Complex expressions with multiple operators should be solved step by step, tracking variable values after each operation.&lt;/p&gt;

&lt;p&gt;Understanding operators is crucial for automation logic, loops, conditions, and interview questions.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Day 5 of My Selenium Java Class – Variables, String Methods &amp; Static vs Instance</title>
      <dc:creator>scindia bethuraj</dc:creator>
      <pubDate>Wed, 25 Feb 2026 04:08:47 +0000</pubDate>
      <link>https://forem.com/scindia_bethuraj_7ffec81b/day-5-of-my-selenium-java-class-variables-string-methods-static-vs-instance-3p51</link>
      <guid>https://forem.com/scindia_bethuraj_7ffec81b/day-5-of-my-selenium-java-class-variables-string-methods-static-vs-instance-3p51</guid>
      <description>&lt;p&gt;Trainer: Mr.Nantha&lt;br&gt;
Day 5&lt;br&gt;
Session Overview&lt;br&gt;
Today’s session focused on strengthening core Java concepts that are extremely important for automation testing and interviews.&lt;/p&gt;

&lt;p&gt;Topics Covered&lt;/p&gt;

&lt;p&gt;• Variables &amp;amp; Types of Variables: We explored the concept of variables in Java, including the different types that are commonly used.&lt;/p&gt;

&lt;p&gt;• Important String Methods: The session included a review of key String methods, emphasizing their significance and usage in Java programming.&lt;/p&gt;

&lt;p&gt;• Static vs Instance Variables: We discussed the distinction between static and instance variables, clarifying their roles and how they differ in Java applications.&lt;/p&gt;

&lt;p&gt;Variables in Java&lt;br&gt;
In Java, a variable acts as a container that holds data during program execution. Variables allow you to store, modify, and retrieve information as your code runs.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;int age = 25;&lt;br&gt;
String name = "John";&lt;/p&gt;

&lt;p&gt;In these examples:&lt;/p&gt;

&lt;p&gt;• The words int and String are data types that specify what kind of data the variable can store.&lt;br&gt;
• Age and name are the variables that store values of type int and String respectively.&lt;/p&gt;

&lt;p&gt;Types of Variables in Java&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local Variable&lt;/strong&gt;
• Declared inside a method.
• Accessible only within the method where it is declared.
• Does not have a default value; you must initialize it before use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;void display() {&lt;br&gt;
int number = 10;&lt;br&gt;
}&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Instance Variable&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• Declared inside a class but outside any method.&lt;br&gt;
• Each object of the class has its own copy of the variable.&lt;br&gt;
• Accessing the variable requires creating an object of the class.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;class Student {&lt;br&gt;
String name;&lt;br&gt;
}&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Static Variable&lt;/strong&gt;
• Declared using the static keyword inside a class.
• Shared among all objects of the class.
• Memory for the variable is allocated only once, regardless of how many objects are created.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;class Student {&lt;br&gt;
static String college = "GRD College";&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;All objects of the Student class share the same value for the college variable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important String Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In automation testing with Selenium, Strings are used frequently for storing locators, validating data, and working with URLs. Mastering String methods is essential for efficient Java programming.&lt;br&gt;
Some commonly used String methods include:&lt;/p&gt;

&lt;p&gt;length()&lt;/p&gt;

&lt;p&gt;Returns the number of characters in a String.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
String name = "Java";&lt;br&gt;
System.out.println(name.length());&lt;/p&gt;

&lt;p&gt;toUpperCase() / toLowerCase()&lt;/p&gt;

&lt;p&gt;Converts all characters to upper or lower case.&lt;br&gt;
Example:&lt;br&gt;
name.toUpperCase();&lt;br&gt;
name.toLowerCase();&lt;/p&gt;

&lt;p&gt;equals()&lt;/p&gt;

&lt;p&gt;Compares two strings for equality.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
name.equals("Java");&lt;/p&gt;

&lt;p&gt;contains()&lt;/p&gt;

&lt;p&gt;Checks if a substring exists within the String.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
name.contains("av");&lt;/p&gt;

&lt;p&gt;charAt()&lt;/p&gt;

&lt;p&gt;Returns the character at a specific index.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
name.charAt(0); // J&lt;/p&gt;

&lt;p&gt;substring()&lt;/p&gt;

&lt;p&gt;Extracts a part of the String from the given indices.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
name.substring(1,3);&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Static vs Instance Variables *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Understanding the difference between static and instance variables is a common interview topic. The table below summarizes the key differences:&lt;/p&gt;

&lt;p&gt;Instance Variable                 Static Variable&lt;/p&gt;

&lt;p&gt;Belongs to object              Belongs to class&lt;br&gt;
Requires object creation       No object needed&lt;br&gt;
Each object has a separate copy    Shared among all objects&lt;br&gt;
Memory allocated multiple times    Memory allocated once&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
class Example {&lt;br&gt;
int instanceVar = 10;&lt;br&gt;
static int staticVar = 20;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;If you create three objects of the Example class:&lt;/p&gt;

&lt;p&gt;• Each object gets its own copy of instanceVar (three copies in total).&lt;br&gt;
• There is only one shared copy of staticVar for all objects.&lt;/p&gt;

&lt;p&gt;Key Takeaways&lt;br&gt;
• Variables are containers for storing data in a program.&lt;br&gt;
• Java supports three main types of variables: Local, Instance, and Static.&lt;br&gt;
• Mastering String methods is crucial for automation testing and interview success.&lt;br&gt;
• Static variables are shared among all objects, while instance variables are unique to each object.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;Step 1: Create a file named:&lt;br&gt;
StudentDemo.java&lt;/p&gt;

&lt;p&gt;Step 2: class StudentDemo {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Instance variable
String name;

// Static variable
static String college = "GRD College";

public static void main(String[] args) {

    // Creating object (instance)
    StudentDemo s1 = new StudentDemo();
    s1.name = "John";

    // Using String methods
    System.out.println("Name length: " + s1.name.length());
    System.out.println("Uppercase: " + s1.name.toUpperCase());

    // Printing instance and static variables
    System.out.println("Student Name: " + s1.name);
    System.out.println("College Name: " + college);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Step 3: Compile the Program (Using Command Line)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Command Prompt&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to the folder where the file is saved:&lt;br&gt;
cd Desktop&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compile the file:&lt;br&gt;
javac StudentDemo.java&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If there is no error, it will create:&lt;/p&gt;

&lt;p&gt;StudentDemo.class&lt;/p&gt;

&lt;p&gt;If there is an error, it will show the line number.&lt;/p&gt;

&lt;p&gt;Step 4: Run the Program&lt;br&gt;
Now type:&lt;br&gt;
java StudentDemo&lt;/p&gt;

&lt;p&gt;Expected Output&lt;br&gt;
Name length: 4&lt;br&gt;
Uppercase: JOHN&lt;br&gt;
Student Name: John&lt;br&gt;
College Name: GRD College&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory Management in Java&lt;/strong&gt;&lt;br&gt;
**&lt;br&gt;
Built-In Memory Management System&lt;br&gt;
**&lt;br&gt;
Java has a built-in memory management system that is designed to efficiently handle data storage and cleanup during program execution. This automatic process ensures that memory is allocated and released as needed, reducing the risk of memory leaks and improving overall program stability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Importance in Automation Scripts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Understanding Java’s memory management system is essential for writing efficient Selenium or Playwright automation scripts. A solid grasp of these concepts helps developers optimize their scripts for better performance and reliability, making test automation more effective.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How Java Memory is Organized&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Java divides memory into two main areas:&lt;/p&gt;

&lt;p&gt;Memory Area - Purpose&lt;/p&gt;

&lt;p&gt;Stack Memory - Stores local variables and method calls. Memory is temporary and automatically removed when a method ends.&lt;/p&gt;

&lt;p&gt;Heap Memory - Stores objects and instance variables. Memory is shared among objects and managed by Garbage Collector (GC).&lt;/p&gt;

&lt;p&gt;Stack Memory&lt;/p&gt;

&lt;p&gt;Stores primitive local variables and references to objects.&lt;/p&gt;

&lt;p&gt;Follows Last In First Out (LIFO) principle.&lt;/p&gt;

&lt;p&gt;Memory is automatically released when the method finishes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Static vs Instance Variables in Memory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variable Type            Memory Location          Notes&lt;/p&gt;

&lt;p&gt;Instance Variable      Heap              Each object gets its own copy&lt;/p&gt;

&lt;p&gt;Static Variable    Method Area (part of heap)     Shared among all objects&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Garbage Collector (GC)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java automatically removes objects that are no longer referenced to free up memory.&lt;/p&gt;

&lt;p&gt;Helps prevent memory leaks&lt;/p&gt;

&lt;p&gt;Reduces programmer effort&lt;/p&gt;

&lt;p&gt;Memory Flow Example in a Program&lt;br&gt;
class Student {&lt;br&gt;
    String name;   // Instance variable (Heap)&lt;br&gt;
    static String college = "GRD College";  // Static variable (Method Area)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void display() {
    int age = 20;  // Local variable in stack
    System.out.println(name + " - " + age);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;public class MemoryDemo {&lt;br&gt;
    public static void main(String[] args) {&lt;br&gt;
        Student s1 = new Student();  // Object in Heap&lt;br&gt;
        s1.name = "John";&lt;br&gt;
        s1.display();&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Memory Map:&lt;/p&gt;

&lt;p&gt;s1 → reference in stack, object in heap&lt;/p&gt;

&lt;p&gt;name → stored in heap&lt;/p&gt;

&lt;p&gt;age → stored in stack temporarily&lt;/p&gt;

&lt;p&gt;college → stored in method area (shared among objects)&lt;/p&gt;

&lt;p&gt;Key Takeaways&lt;/p&gt;

&lt;p&gt;• Variables are containers for storing data in a program.&lt;/p&gt;

&lt;p&gt;• Java supports three main types of variables: Local, Instance, and Static.&lt;/p&gt;

&lt;p&gt;• Mastering String methods is crucial for automation testing and interview success.&lt;/p&gt;

&lt;p&gt;• Static variables are shared among all objects, while instance variables are unique to each object.&lt;/p&gt;

&lt;p&gt;Stack Memory&lt;/p&gt;

&lt;p&gt;Stores local variables and method calls.&lt;/p&gt;

&lt;p&gt;Memory is temporary and released automatically when the method ends.&lt;br&gt;
Heap Memory&lt;/p&gt;

&lt;p&gt;Stores objects and instance variables.&lt;/p&gt;

&lt;p&gt;Shared among all objects. Memory is managed by Garbage Collector.&lt;br&gt;
Instance vs Static Variables in Memory&lt;/p&gt;

&lt;p&gt;Instance variables → stored in heap, each object has its own copy.&lt;/p&gt;

&lt;p&gt;Static variables → stored in method area, shared among all objects.&lt;br&gt;
Garbage Collector (GC)&lt;/p&gt;

&lt;p&gt;Automatically removes unreferenced objects.&lt;/p&gt;

&lt;p&gt;Prevents memory leaks and reduces manual memory management.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>beginners</category>
      <category>java</category>
      <category>testing</category>
    </item>
    <item>
      <title>An Overview of JDK, JRE, JVM &amp; JIT</title>
      <dc:creator>scindia bethuraj</dc:creator>
      <pubDate>Wed, 25 Feb 2026 03:24:30 +0000</pubDate>
      <link>https://forem.com/scindia_bethuraj_7ffec81b/an-overview-of-jdk-jre-jvm-jit-14o</link>
      <guid>https://forem.com/scindia_bethuraj_7ffec81b/an-overview-of-jdk-jre-jvm-jit-14o</guid>
      <description>&lt;p&gt;Trainer: Mr. Nantha&lt;br&gt;
DAY 2&lt;/p&gt;

&lt;p&gt;This section focuses on the core components essential for running and developing Java applications: the Java Development Kit (JDK), Java Runtime Environment (JRE), Java Virtual Machine (JVM), and Just-In-Time (JIT) . Each plays a crucial role in the execution and performance of Java programs.&lt;/p&gt;

&lt;p&gt;What is JDK?&lt;/p&gt;

&lt;p&gt;JDK (Java Development Kit) is a software package used to develop Java applications.&lt;/p&gt;

&lt;p&gt;In simple terms, the JDK helps us write, compile, and run Java programs.&lt;/p&gt;

&lt;p&gt;• It provides the tools needed to create and execute Java applications, including a compiler and other utilities.&lt;br&gt;
• The JDK is used to convert a file with the .java extension (which is human-readable) into a .class file.&lt;br&gt;
• The .class file, also known as bytecode, is not readable by humans.&lt;br&gt;
• A key advantage of the .class file is its platform independence; it can be executed on any operating system.&lt;/p&gt;

&lt;p&gt;What is JRE?&lt;/p&gt;

&lt;p&gt;JRE (Java Runtime Environment) is used to run Java programs. It provides the resources required for executing Java applications, but does not include development tools for writing or compiling code.&lt;/p&gt;

&lt;p&gt;The JRE contains the following components:&lt;br&gt;
• JVM (Java Virtual Machine), which interprets and executes Java bytecode.&lt;br&gt;
• Supporting libraries that provide core functionality for Java applications.&lt;br&gt;
• Runtime files needed for program execution.&lt;br&gt;
 The JRE does not include a compiler, so it cannot be used to develop or compile Java programs—only to run them.&lt;/p&gt;

&lt;p&gt;What is JVM?&lt;br&gt;
JVM (Java Virtual Machine) is the engine that runs Java programs.&lt;br&gt;
Example:&lt;br&gt;
When we write a Java file:&lt;br&gt;
Sample.java&lt;br&gt;
Compile using JDK&lt;br&gt;
javac Sample.java&lt;br&gt;
This creates:&lt;br&gt;
Sample.class&lt;/p&gt;

&lt;p&gt;How Java Code Is Executed&lt;/p&gt;

&lt;p&gt;Step 1: Bytecode Generation&lt;br&gt;
After you write and compile a Java program, the compiler generates a .class file. This file contains bytecode, which is an intermediate, platform-independent code.&lt;/p&gt;

&lt;p&gt;Step 2: Execution by JVM&lt;br&gt;
The Java Virtual Machine (JVM) reads this bytecode and converts it into machine code that your computer's processor can understand and execute.&lt;/p&gt;

&lt;p&gt;Step 3: Platform Independence&lt;br&gt;
By using bytecode and the JVM, Java achieves platform independence. This means you can write your code once, and it will run on any operating system that has a compatible JVM—fulfilling Java's promise of "Write Once, Run Anywhere."&lt;/p&gt;

&lt;p&gt;What is JIT?&lt;/p&gt;

&lt;p&gt;JIT (Just-In-Time Compiler) is an essential component of the Java Virtual Machine (JVM). It plays a significant role in enhancing the performance of Java applications.&lt;/p&gt;

&lt;p&gt;The JIT compiler works by converting bytecode into machine code at runtime. This means that, as the program runs, the JIT compiles sections of bytecode into native machine code, which the computer's processor can execute directly.&lt;/p&gt;

&lt;p&gt;Instead of interpreting the code line by line each time it runs, the JIT identifies code that is used frequently and compiles it into native machine code. This process allows the program to execute these portions much more quickly in subsequent runs.&lt;/p&gt;

&lt;p&gt;By performing these optimizations at runtime, the JIT compiler significantly improves the execution speed of Java programs.&lt;/p&gt;

&lt;p&gt;How They Work Together&lt;br&gt;
1️⃣ We write code → Sample.java&lt;br&gt;
2️⃣ JDK compiles it → Sample.class&lt;br&gt;
3️⃣ JRE provides environment to run&lt;br&gt;
4️⃣ JVM executes bytecode&lt;br&gt;
5️⃣ JIT optimizes performance&lt;/p&gt;

&lt;p&gt;Simple Difference Table&lt;br&gt;
Component   Purpose&lt;br&gt;
JDK       Develop + Compile + Run&lt;br&gt;
JRE       Run Java programs&lt;br&gt;
JVM       Executes bytecode&lt;br&gt;
JIT       Improves performance&lt;/p&gt;

&lt;p&gt;Key Takeaways from Day 2&lt;/p&gt;

&lt;p&gt;On Day 2, I focused on understanding the essential components of the Java ecosystem. Here are my main takeaways:&lt;/p&gt;

&lt;p&gt;JDK (Java Development Kit)&lt;br&gt;
The JDK is specifically designed for development purposes. It provides all the necessary tools, libraries, and resources required to build Java applications.&lt;/p&gt;

&lt;p&gt;JRE (Java Runtime Environment)&lt;br&gt;
The JRE is used for running Java programs. It contains the libraries and components needed to execute Java applications, but does not include development tools.&lt;/p&gt;

&lt;p&gt;JVM (Java Virtual Machine)&lt;br&gt;
The JVM is responsible for executing bytecode. It acts as the runtime engine that interprets and executes the compiled Java code.&lt;/p&gt;

&lt;p&gt;JIT (Just-In-Time Compiler)&lt;br&gt;
The JIT compiler improves performance by converting bytecode into machine code during runtime, allowing for faster execution of Java programs.&lt;br&gt;
Platform Independence&lt;/p&gt;

&lt;p&gt;Day by day, I’m building a strong Java foundation before moving deeper into Selenium and Playwright automation.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Introduction to Selenium Java and Playwright: First Session</title>
      <dc:creator>scindia bethuraj</dc:creator>
      <pubDate>Tue, 17 Feb 2026 21:29:20 +0000</pubDate>
      <link>https://forem.com/scindia_bethuraj_7ffec81b/introduction-to-selenium-java-and-playwright-first-session-41hd</link>
      <guid>https://forem.com/scindia_bethuraj_7ffec81b/introduction-to-selenium-java-and-playwright-first-session-41hd</guid>
      <description>&lt;p&gt;*&lt;em&gt;Trainer : Mr. Nantha *&lt;/em&gt;&lt;br&gt;
Day 1 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview of the First Module&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today marked the beginning of my Selenium Java class. The session offered valuable information and inspired me to dive deeper into the subject. I felt encouraged and motivated throughout, as the trainer emphasized the importance of documenting our learning through blog posts, rather than traditional note-taking. This approach not only helps reinforce understanding but also allows us to share knowledge with a wider audience.&lt;br&gt;
The trainer also provided an overview of the modules we will cover in the first session, including key Java concepts such as JDK, JRE, JVM, and JIT. We learned how to compile and run Java programs using the command line, and received guidance on downloading the JDK. Overall, the class set a strong foundation for our journey with Selenium Java and Playwright.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Java: Definition and Ownership&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java is a programming language used to write instructions for computers. It enables developers to create software applications that can run on a variety of platforms, making it a versatile and widely-used language in the technology industry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Origin and Ownership of Java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java was originally developed by &lt;strong&gt;Sun Microsystems&lt;/strong&gt; in 1995 and is now owned by &lt;strong&gt;Oracle Corporation&lt;/strong&gt;. This transition of ownership has helped Java continue to evolve while remaining a critical tool for developers worldwide.&lt;br&gt;
**&lt;br&gt;
Understanding JDK**&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For today’s session, the focus was on JDK.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is JDK?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JDK stands for Java Development Kit.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In simple terms:&lt;/p&gt;

&lt;p&gt;JDK is a software package that helps you write, compile, and run Java programs on your computer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Java Compilation Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we write a Java file:&lt;br&gt;
• The file is saved with the extension .java&lt;br&gt;
When we compile it using the command line:&lt;br&gt;
java Sample.java&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two things can happen:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(1) IF THERE IS AN ERROR - The compiler shows an error message and indicates the line number where the mistake occurred.&lt;br&gt;
(2) IF THERE IS NO ERROR - A .class file is generated.&lt;br&gt;
This .class file is the bytecode that the Java Virtual Machine (JVM) executes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Learning from Day 1&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Understanding the significance of technical blogging&lt;br&gt;
Exploring the fundamental structure of Java&lt;br&gt;
Recognizing JDK's function in Java development&lt;br&gt;
Learning how Java files undergo compilation&lt;br&gt;
Setting up software needed for automation testing&lt;br&gt;
This is only the start, and I'm eager to explore Java, Selenium, and Playwright more thoroughly in the next sessions.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>beginners</category>
      <category>java</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
