<?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>DEV Community: Gowtham</title>
    <description>The latest articles on DEV Community by Gowtham (@gowtham_s).</description>
    <link>https://dev.to/gowtham_s</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4094453%2Fb8b402eb-55be-4976-9ec9-292b2efed101.jpg</url>
      <title>DEV Community: Gowtham</title>
      <link>https://dev.to/gowtham_s</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gowtham_s"/>
    <language>en</language>
    <item>
      <title>Python - Operators, Functions &amp; Function Arguments</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Sun, 01 Nov 2026 05:36:31 +0000</pubDate>
      <link>https://dev.to/gowtham_s/python-operators-functions-function-arguments-481a</link>
      <guid>https://dev.to/gowtham_s/python-operators-functions-function-arguments-481a</guid>
      <description>&lt;h2&gt;
  
  
  1.Operators in Python
&lt;/h2&gt;

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

&lt;p&gt;Python has different types of operators.&lt;/p&gt;

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

&lt;p&gt;Arithmetic operators are used to perform mathematical calculations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpsi59cpj64gd6bcds68z.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpsi59cpj64gd6bcds68z.webp" alt=" " width="629" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B.Comparison Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Comparison operators are used to compare two values. They return either True or False.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftb0fsoxma07axiltuabe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftb0fsoxma07axiltuabe.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C.Logical Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Logical operators are used to combine multiple conditions.&lt;/p&gt;

&lt;p&gt;Python has three logical operators:&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;and&lt;/strong&gt; – Returns True if both conditions are true.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;or&lt;/strong&gt; – Returns True if at least one condition is true.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;not&lt;/strong&gt; – Reverses the result.&lt;/p&gt;

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

&lt;p&gt;age = 20&lt;/p&gt;

&lt;p&gt;print(age &amp;gt; 18 and age &amp;lt; 30)&lt;br&gt;
print(age &amp;lt; 18 or age == 20)&lt;br&gt;
print(not(age &amp;gt; 18))&lt;/p&gt;

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

&lt;p&gt;True&lt;br&gt;
True&lt;br&gt;
False&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D.Assignment Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Assignment operators are used to assign values to variables.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fttsht7dbyb45j9mt9dbm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fttsht7dbyb45j9mt9dbm.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;E.Membership Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Membership operators are used to check whether a value exists in a sequence.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;in&lt;/strong&gt; – Checks whether a value exists.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;not in&lt;/strong&gt; – Checks whether a value does not exist.&lt;/p&gt;

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

&lt;p&gt;fruits = ["apple", "banana", "mango"]&lt;/p&gt;

&lt;p&gt;print("apple" in fruits)&lt;br&gt;
print("orange" not in fruits)&lt;/p&gt;

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

&lt;p&gt;True&lt;br&gt;
True&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;F.Identity Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Identity operators are used to check whether two variables refer to the same object.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;is&lt;/strong&gt; – Returns True if both refer to the same object.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;is not&lt;/strong&gt; – Returns True if they refer to different objects.&lt;/p&gt;

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

&lt;p&gt;a = [1, 2, 3]&lt;br&gt;
b = a&lt;/p&gt;

&lt;p&gt;print(a is b)&lt;/p&gt;

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

&lt;p&gt;True&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;G.Bitwise Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgv2c3bpk3so3xh53s6fk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgv2c3bpk3so3xh53s6fk.webp" alt=" " width="657" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2.Functions in Python
&lt;/h2&gt;

&lt;p&gt;A function is a block of reusable code that performs a specific task.&lt;/p&gt;

&lt;p&gt;Functions help us avoid writing the same code repeatedly and make programs easier to understand.&lt;/p&gt;

&lt;p&gt;Python provides two main ways to work with functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in functions&lt;/li&gt;
&lt;li&gt;User-defined functions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A.Built-in Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Built-in functions are already available in Python. We can use them directly without defining them.&lt;/p&gt;

&lt;p&gt;Some common built-in functions are:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fquez595vh2u6nyvi9o0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fquez595vh2u6nyvi9o0n.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B.User-Defined Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;User-defined functions are functions created by programmers to perform specific tasks.&lt;/p&gt;

&lt;p&gt;We use the def keyword to create a function.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Syntax:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;def function_name():&lt;br&gt;
    # Statements&lt;/p&gt;

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

&lt;p&gt;def greet():&lt;br&gt;
    print("Hello, Welcome to Python!")&lt;/p&gt;

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

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

&lt;p&gt;Hello, Welcome to Python!&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;def is used to define a function.&lt;/li&gt;
&lt;li&gt;greet is the function name.&lt;/li&gt;
&lt;li&gt;greet() is used to call the function.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3.Function Arguments in Python
&lt;/h2&gt;

&lt;p&gt;Function arguments are values passed to a function when calling it. They allow us to send information to a function.&lt;/p&gt;

&lt;p&gt;Let's understand the different types of function arguments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A.Positional Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In positional arguments, values are passed according to the order of parameters.&lt;/p&gt;

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

&lt;p&gt;def student(name, age):&lt;br&gt;
    print("Name:", name)&lt;br&gt;
    print("Age:", age)&lt;/p&gt;

&lt;p&gt;student("Gowtham", 20)&lt;/p&gt;

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

&lt;p&gt;Name: Gowtham&lt;br&gt;
Age: 20&lt;/p&gt;

&lt;p&gt;Here, "Gowtham" is passed to name, and 20 is passed to age.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B.Keyword Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In keyword arguments, we pass values using parameter names. The order does not matter.&lt;/p&gt;

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

&lt;p&gt;def student(name, age):&lt;br&gt;
    print("Name:", name)&lt;br&gt;
    print("Age:", age)&lt;/p&gt;

&lt;p&gt;student(age=20, name="Gowtham")&lt;/p&gt;

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

&lt;p&gt;Name: Gowtham&lt;br&gt;
Age: 20&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C.Default Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Default arguments have predefined values. If we don't pass a value, Python uses the default value.&lt;/p&gt;

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

&lt;p&gt;def greet(name="Friend"):&lt;br&gt;
    print("Hello", name)&lt;/p&gt;

&lt;p&gt;greet()&lt;br&gt;
greet("Gowtham")&lt;/p&gt;

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

&lt;p&gt;Hello Friend&lt;br&gt;
Hello Gowtham&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D.Variable-Length Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, we don't know how many arguments will be passed to a function. Python supports variable-length arguments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;1.*args&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;*args allows us to pass multiple positional arguments to a function.&lt;/p&gt;

&lt;p&gt;def add(*numbers):&lt;br&gt;
    print(sum(numbers))&lt;/p&gt;

&lt;p&gt;add(10, 20)&lt;br&gt;
add(10, 20, 30, 40)&lt;/p&gt;

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

&lt;p&gt;30&lt;br&gt;
100&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2.**kwargs&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;**kwargs allows us to pass multiple keyword arguments to a function. These arguments are stored as a dictionary.&lt;/p&gt;

&lt;p&gt;def student(**details):&lt;br&gt;
    print(details)&lt;/p&gt;

&lt;p&gt;student(name="Gowtham", age=20, city="Chennai")&lt;/p&gt;

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

&lt;p&gt;{'name': 'Gowtham', 'age': 20, 'city': 'Chennai'}&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>learning</category>
      <category>fullstack</category>
    </item>
    <item>
      <title>Java - Constructor &amp; Constructor Overloading</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Sat, 31 Oct 2026 16:41:09 +0000</pubDate>
      <link>https://dev.to/gowtham_s/java-constructor-constructor-overloading-45d9</link>
      <guid>https://dev.to/gowtham_s/java-constructor-constructor-overloading-45d9</guid>
      <description>&lt;h2&gt;
  
  
  1.Constructor in Java:
&lt;/h2&gt;

&lt;p&gt;A constructor is a special member of a class that is used to initialize objects.&lt;/p&gt;

&lt;p&gt;A constructor is automatically called when an object is created using the new keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important Features of Constructors&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The constructor name must be the same as the class name.&lt;/li&gt;
&lt;li&gt;A constructor does not have a return type, not even void.&lt;/li&gt;
&lt;li&gt;It is called automatically when an object is created.&lt;/li&gt;
&lt;li&gt;Constructors can have parameters.&lt;/li&gt;
&lt;li&gt;Constructors can be overloaded.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;`class Student {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Student() {
    System.out.println("Constructor Called!");
}

public static void main(String[] args) {
    Student s1 = new Student();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Constructor Called!&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Student is the class name.&lt;/li&gt;
&lt;li&gt;Student() is the constructor.&lt;/li&gt;
&lt;li&gt;new Student() creates an object.&lt;/li&gt;
&lt;li&gt;The constructor is automatically executed when the object is created.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.Types of Constructors in Java
&lt;/h2&gt;

&lt;p&gt;Java constructors are commonly explained using two categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Default Constructor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If we do not write any constructor in a class, the Java compiler provides a default constructor.&lt;/p&gt;

&lt;p&gt;It initializes instance variables with their default values.&lt;/p&gt;

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

&lt;p&gt;`class Student {&lt;br&gt;
    int age;&lt;br&gt;
    String name;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static void main(String[] args) {
    Student s1 = new Student();

    System.out.println(s1.age);
    System.out.println(s1.name);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;0&lt;br&gt;
null&lt;/p&gt;

&lt;p&gt;Here, Java provides a default constructor because we did not define any constructor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If we write our own constructor, the compiler does not automatically provide a default constructor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.No-Argument Constructor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A no-argument constructor is a constructor written by the programmer that does not accept any parameters.&lt;/p&gt;

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

&lt;p&gt;`class Student {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Student() {
    System.out.println("Welcome to Java!");
}

public static void main(String[] args) {
    Student s1 = new Student();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Welcome to Java!&lt;/p&gt;

&lt;p&gt;Here, Student() is a programmer-defined no-argument constructor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Parameterized Constructor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A parameterized constructor accepts arguments to initialize object values.&lt;/p&gt;

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

&lt;p&gt;`class Student {&lt;br&gt;
    String name;&lt;br&gt;
    int age;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Student(String n, int a) {
    name = n;
    age = a;
}

void display() {
    System.out.println(name);
    System.out.println(age);
}

public static void main(String[] args) {
    Student s1 = new Student("Gowtham", 20);
    s1.display();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Gowtham&lt;br&gt;
20&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Student(String n, int a) is a parameterized constructor.&lt;/li&gt;
&lt;li&gt;name = n assigns the name.&lt;/li&gt;
&lt;li&gt;age = a assigns the age.&lt;/li&gt;
&lt;li&gt;new Student("Gowtham", 20) creates an object and passes values to the constructor.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3.Constructor Overloading in Java:
&lt;/h2&gt;

&lt;p&gt;Constructor overloading means creating multiple constructors in the same class with different parameter lists.&lt;/p&gt;

&lt;p&gt;It allows us to initialize objects in different ways.&lt;/p&gt;

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

&lt;p&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;
int age;

Student() {
    name = "Unknown";
    age = 0;
}

Student(String n) {
    name = n;
    age = 18;
}

Student(String n, int a) {
    name = n;
    age = a;
}

void display() {
    System.out.println(name + " " + age);
}

public static void main(String[] args) {

    Student s1 = new Student();
    Student s2 = new Student("Gowtham");
    Student s3 = new Student("Arun", 21);

    s1.display();
    s2.display();
    s3.display();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Unknown 0&lt;br&gt;
Gowtham 18&lt;br&gt;
Arun 21&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;In this example, we have created three constructors:&lt;/li&gt;
&lt;li&gt;Student() – No-argument constructor.&lt;/li&gt;
&lt;li&gt;Student(String n) – Constructor with one parameter.&lt;/li&gt;
&lt;li&gt;Student(String n, int a) – Constructor with two parameters.&lt;/li&gt;
&lt;li&gt;Java automatically selects the matching constructor based on the arguments passed when creating an object.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6.Advantages of Constructor Overloading
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: Create objects with different initial values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code reusability&lt;/strong&gt;: Avoid repeating initialization logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to use&lt;/strong&gt;: Choose a constructor based on the available information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better organization&lt;/strong&gt;: Keep object initialization inside the class.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>learning</category>
      <category>fullstack</category>
    </item>
    <item>
      <title>Python - Variables, Reserved Words &amp; Data Types</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Thu, 29 Oct 2026 15:50:23 +0000</pubDate>
      <link>https://dev.to/gowtham_s/python-variables-reserved-words-and-data-types-2f9e</link>
      <guid>https://dev.to/gowtham_s/python-variables-reserved-words-and-data-types-2f9e</guid>
      <description>&lt;h2&gt;
  
  
  1.Variables in Python
&lt;/h2&gt;

&lt;p&gt;A variable is a name used to store a value in a program. In Python, we don't need to declare the variable type explicitly. Python automatically identifies the type of value.&lt;/p&gt;

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

&lt;p&gt;`name = "Gowtham"&lt;br&gt;
age = 20&lt;br&gt;
price = 99.5&lt;/p&gt;

&lt;p&gt;print(name)&lt;br&gt;
print(age)&lt;br&gt;
print(price)`&lt;/p&gt;

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

&lt;p&gt;Gowtham&lt;br&gt;
20&lt;br&gt;
99.5&lt;/p&gt;

&lt;p&gt;In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name stores a string value.&lt;/li&gt;
&lt;li&gt;age stores an integer value.&lt;/li&gt;
&lt;li&gt;price stores a floating-point value.&lt;/li&gt;
&lt;li&gt;Rules for Naming Variables&lt;/li&gt;
&lt;li&gt;A variable name can contain letters, numbers, and underscores.&lt;/li&gt;
&lt;li&gt;A variable name must not start with a number.&lt;/li&gt;
&lt;li&gt;Variable names are case-sensitive.&lt;/li&gt;
&lt;li&gt;Spaces are not allowed in variable names.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reserved words cannot be used as variable names.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Valid variable names:&lt;br&gt;
name = "Python"&lt;br&gt;
age = 20&lt;br&gt;
student_name = "Ravi"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Invalid variable names:&lt;br&gt;
2name = "Ravi"   # Starts with a number&lt;br&gt;
student name = "Ravi"  # Contains a space&lt;br&gt;
class = 10       # Reserved word&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.Reserved Words in Python
&lt;/h2&gt;

&lt;p&gt;Reserved words, also called keywords, are words that have special meanings in Python. They are used to define the structure and behavior of a program.&lt;/p&gt;

&lt;p&gt;We cannot use these keywords as variable names or function names.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Python Keywords&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Febicpga6d65qk7xf3std.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Febicpga6d65qk7xf3std.jpg" alt=" " width="800" height="1035"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Data Types in Python
&lt;/h2&gt;

&lt;p&gt;A data type specifies the kind of value stored in a variable. Python provides several built-in data types.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Numeric Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integer&lt;/strong&gt; (int) — Stores whole numbers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;age = 20&lt;br&gt;
print(age)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Float&lt;/strong&gt; (float) — Stores decimal numbers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;price = 99.5&lt;br&gt;
print(price)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complex&lt;/strong&gt; (complex) — Stores complex numbers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;number = 2 + 3j&lt;br&gt;
print(number)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.String (str)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A string stores text inside single or double quotation marks.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;name = "Python"&lt;br&gt;
print(name)&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Python&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Boolean (bool)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Boolean represents either True or False.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;is_student = True&lt;br&gt;
print(is_student)&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;True&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.List (list)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A list stores multiple items in a single variable. Lists are ordered and mutable, meaning their contents can be changed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fruits = ["apple", "banana", "mango"]&lt;br&gt;
print(fruits)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Tuple (tuple)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A tuple stores multiple items. Unlike lists, tuples cannot be changed after creation.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;colors = ("red", "green", "blue")&lt;br&gt;
print(colors)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.Set (set)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A set stores unique values and does not guarantee a fixed order.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;numbers = {1, 2, 3, 3}&lt;br&gt;
print(numbers)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The duplicate value 3 is stored only once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.Dictionary (dict)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A dictionary stores information as key-value pairs.&lt;/p&gt;

&lt;p&gt;`student = {&lt;br&gt;
    "name": "Ravi",&lt;br&gt;
    "age": 20&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;print(student["name"])`&lt;/p&gt;

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

&lt;p&gt;Ravi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8.None Type (NoneType)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;None represents the absence of a value.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;result = None&lt;br&gt;
print(result)&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;None&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>learning</category>
      <category>fullstack</category>
    </item>
    <item>
      <title>Java - Methods &amp; Method Overloading</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Wed, 28 Oct 2026 17:55:36 +0000</pubDate>
      <link>https://dev.to/gowtham_s/java-methods-method-overloading-24f</link>
      <guid>https://dev.to/gowtham_s/java-methods-method-overloading-24f</guid>
      <description>&lt;h2&gt;
  
  
  1.Method in Java:
&lt;/h2&gt;

&lt;p&gt;A method is a block of code that performs a specific task. We can call a method whenever we need to execute that task.&lt;/p&gt;

&lt;p&gt;Methods help us avoid repeating the same code multiple times.&lt;/p&gt;

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

&lt;p&gt;`public class Main {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static void greet() {
    System.out.println("Hello, Welcome to Java!");
}

public static void main(String[] args) {
    greet();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Hello, Welcome to Java!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;static allows us to call the method using the class without creating an object.&lt;/li&gt;
&lt;li&gt;void means the method does not return a value.&lt;/li&gt;
&lt;li&gt;greet() is the method name.&lt;/li&gt;
&lt;li&gt;System.out.println() displays the message.&lt;/li&gt;
&lt;li&gt;greet(); calls the method.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.Types of Methods in Java
&lt;/h2&gt;

&lt;p&gt;Methods can be categorized in different ways. Two common types are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Predefined Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Predefined methods are already provided by Java's libraries.&lt;/p&gt;

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

&lt;p&gt;`public class Main {&lt;br&gt;
    public static void main(String[] args) {&lt;br&gt;
        System.out.println("Hello Java!");&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    int result = Math.max(10, 20);
    System.out.println(result);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Hello Java!&lt;br&gt;
20&lt;/p&gt;

&lt;p&gt;Here, println() and Math.max() are predefined methods.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.User-Defined Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;User-defined methods are created by programmers to perform specific tasks.&lt;/p&gt;

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

&lt;p&gt;`public class Main {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static void add() {
    int a = 10;
    int b = 20;

    System.out.println(a + b);
}

public static void main(String[] args) {
    add();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;30&lt;/p&gt;

&lt;p&gt;Here, add() is a user-defined method.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Methods with Parameters and Return Values:
&lt;/h2&gt;

&lt;p&gt;A method can accept parameters and return a result.&lt;/p&gt;

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

&lt;p&gt;`public class Main {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static int add(int a, int b) {
    return a + b;
}

public static void main(String[] args) {
    int result = add(10, 20);
    System.out.println(result);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;30&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;int a and int b are parameters.&lt;/li&gt;
&lt;li&gt;return a + b; returns the sum.&lt;/li&gt;
&lt;li&gt;add(10, 20) calls the method with two arguments.&lt;/li&gt;
&lt;li&gt;The returned result is stored in the result variable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4.Method Overloading in Java:
&lt;/h2&gt;

&lt;p&gt;Method overloading means creating multiple methods with the same name but different parameter lists within the same class.&lt;/p&gt;

&lt;p&gt;The methods can have different numbers of parameters or different parameter types.&lt;/p&gt;

&lt;p&gt;Method overloading makes code easier to understand because related operations can share the same method name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1: Different Number of Parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;`public class Main {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static int add(int a, int b) {
    return a + b;
}

static int add(int a, int b, int c) {
    return a + b + c;
}

public static void main(String[] args) {
    System.out.println(add(10, 20));
    System.out.println(add(10, 20, 30));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;30&lt;br&gt;
60&lt;/p&gt;

&lt;p&gt;Here, both methods have the name add, but one accepts two parameters and the other accepts three.&lt;/p&gt;

&lt;p&gt;Java selects the appropriate method based on the arguments supplied.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2: Different Parameter Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;`public class Main {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static int display(int a) {
    return a;
}

static double display(double a) {
    return a;
}

public static void main(String[] args) {
    System.out.println(display(10));
    System.out.println(display(10.5));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;10&lt;br&gt;
10.5&lt;/p&gt;

&lt;p&gt;The first method accepts an int, while the second accepts a double.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Changing only the return type is not enough to overload a method. The parameter list must be different.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.Advantages of Methods and Method Overloading:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Code reusability: Write code once and call it multiple times.&lt;/li&gt;
&lt;li&gt;Readability: Give meaningful names to operations.&lt;/li&gt;
&lt;li&gt;Less duplication: Avoid writing similar code repeatedly.&lt;/li&gt;
&lt;li&gt;Flexibility: Method overloading supports different input types and numbers of arguments.&lt;/li&gt;
&lt;li&gt;Easy maintenance: Organize programs into smaller, manageable parts.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Python - Introduction</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Tue, 27 Oct 2026 07:05:28 +0000</pubDate>
      <link>https://dev.to/gowtham_s/python-introduction-2d5h</link>
      <guid>https://dev.to/gowtham_s/python-introduction-2d5h</guid>
      <description>&lt;h2&gt;
  
  
  What Is Python?
&lt;/h2&gt;

&lt;p&gt;Python is a popular, high-level programming language known for its simple syntax and readability. It was created by Guido van Rossum and first released in 1991.&lt;/p&gt;

&lt;p&gt;Python is easy to learn, making it a great choice for beginners who want to start their programming journey.&lt;/p&gt;

&lt;p&gt;Python is used in web development, data science, artificial intelligence, machine learning, automation, and many other fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should We Learn Python?
&lt;/h2&gt;

&lt;p&gt;There are several reasons to learn Python:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easy to Learn&lt;/strong&gt;: Python has simple and readable syntax.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beginner-Friendly&lt;/strong&gt;: You can write programs with fewer lines of code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versatile&lt;/strong&gt;: Python can be used for many different types of applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large Community&lt;/strong&gt;: Many developers share tutorials, libraries, and solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source&lt;/strong&gt;: Python is free to use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  First Python Program
&lt;/h2&gt;

&lt;p&gt;Let's write our first Python program!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print("Hello, World!")&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Hello, World!&lt;/p&gt;

&lt;p&gt;The print() function displays text or other values on the screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Features of Python
&lt;/h2&gt;

&lt;p&gt;Python provides several useful features:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Simple Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python code is easy to read and understand.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;name = "Gowtham"&lt;br&gt;
print(name)&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Gowtham&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variables are used to store data.&lt;/p&gt;

&lt;p&gt;`name = "Python"&lt;br&gt;
age = 35&lt;/p&gt;

&lt;p&gt;print(name)&lt;br&gt;
print(age)`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python supports different types of data, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;int — Integer numbers, such as 10&lt;/li&gt;
&lt;li&gt;float — Decimal numbers, such as 10.5&lt;/li&gt;
&lt;li&gt;str — Text, such as "Hello"&lt;/li&gt;
&lt;li&gt;bool — Boolean values, such as True and False&lt;/li&gt;
&lt;li&gt;list — A collection of items, such as [1, 2, 3]&lt;/li&gt;
&lt;li&gt;dict — Data stored as key-value pairs, such as {"name": "Gowtham"}&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Cross-Platform&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python works on different operating systems, including Windows, Linux, and macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Is Python Used?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python is widely used in different areas of technology:&lt;/li&gt;
&lt;li&gt;Web Development: Building websites and web applications.&lt;/li&gt;
&lt;li&gt;Data Science: Analyzing and understanding data.&lt;/li&gt;
&lt;li&gt;Artificial Intelligence: Developing intelligent applications.&lt;/li&gt;
&lt;li&gt;Machine Learning: Building systems that learn from data.&lt;/li&gt;
&lt;li&gt;Automation: Automating repetitive tasks.&lt;/li&gt;
&lt;li&gt;Game Development: Creating simple games and game tools.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Java - Variables &amp; Objects</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Sun, 25 Oct 2026 16:24:22 +0000</pubDate>
      <link>https://dev.to/gowtham_s/java-variables-objects-c2o</link>
      <guid>https://dev.to/gowtham_s/java-variables-objects-c2o</guid>
      <description>&lt;h2&gt;
  
  
  Variable in Java:
&lt;/h2&gt;

&lt;p&gt;A variable is a named storage location used to hold a value of a particular data type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;int age = 20;&lt;br&gt;
String name = "Gowtham";&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;int is the data type.&lt;/li&gt;
&lt;li&gt;age is the variable name.&lt;/li&gt;
&lt;li&gt;20 is the value stored in the variable.&lt;/li&gt;
&lt;li&gt;String is the type used to represent text.&lt;/li&gt;
&lt;li&gt;name is the variable name.&lt;/li&gt;
&lt;li&gt;"Gowtham" is the text value.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Java has three main categories of variables based on where they are declared.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Local Variable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A local variable is declared inside a method, constructor, or block.&lt;/p&gt;

&lt;p&gt;void display() {&lt;br&gt;
    int age = 20;&lt;br&gt;
    System.out.println(age);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Instance Variable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An instance variable is declared inside a class but outside methods. Each object has its own instance fields.&lt;/p&gt;

&lt;p&gt;class Student {&lt;br&gt;
    String name = "Gowtham";&lt;br&gt;
    int age = 20;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Static Variable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A static variable belongs to the class rather than to individual objects.&lt;/p&gt;

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

&lt;p&gt;The static variable college is shared at the class level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Object in Java?
&lt;/h2&gt;

&lt;p&gt;An object is an instance of a class.&lt;/p&gt;

&lt;p&gt;A class defines the data and behaviors that its objects can have.&lt;/p&gt;

&lt;p&gt;For example, Student can be a class, while individual students can be represented by objects of that class.&lt;/p&gt;

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

&lt;p&gt;`class Student {&lt;br&gt;
    String name;&lt;br&gt;
    int age;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void display() {
    System.out.println(name);
    System.out.println(age);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;public class Main {&lt;br&gt;
    public static void main(String[] args) {&lt;br&gt;
        Student s1 = new Student();&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    s1.name = "Gowtham";
    s1.age = 20;

    s1.display();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

&lt;p&gt;Gowtham&lt;br&gt;
20&lt;/p&gt;

&lt;p&gt;Explanation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Student is the class.&lt;/li&gt;
&lt;li&gt;s1 is a reference variable.&lt;/li&gt;
&lt;li&gt;new Student() creates a new Student object.&lt;/li&gt;
&lt;li&gt;s1.name assigns a name to the object.&lt;/li&gt;
&lt;li&gt;s1.age assigns an age to the object.&lt;/li&gt;
&lt;li&gt;s1.display() calls the object's method.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>fullstack</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Java - OOP, Class &amp; Data Types</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Fri, 23 Oct 2026 17:26:12 +0000</pubDate>
      <link>https://dev.to/gowtham_s/java-oop-class-data-types-cai</link>
      <guid>https://dev.to/gowtham_s/java-oop-class-data-types-cai</guid>
      <description>&lt;h2&gt;
  
  
  1.OOP in Java:
&lt;/h2&gt;

&lt;p&gt;OOP stands for Object-Oriented Programming.&lt;/p&gt;

&lt;p&gt;It is a programming approach based on classes and objects. It helps us organize code, reuse functionality, and manage complex programs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java supports four main OOP principles:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Encapsulation&lt;/em&gt;: Combining data and methods in a class and controlling access to the data.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Inheritance&lt;/em&gt;: Creating a new class based on an existing class.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Polymorphism&lt;/em&gt;: Allowing the same interface or method name to have different behaviors.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Abstraction&lt;/em&gt;: Hiding implementation details and exposing essential functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.Class in Java:
&lt;/h2&gt;

&lt;p&gt;A class is a blueprint for creating objects.&lt;/p&gt;

&lt;p&gt;It defines the data and behaviors that its objects can have.&lt;/p&gt;

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

&lt;p&gt;`class Student {&lt;br&gt;
    String name = "Gowtham";&lt;br&gt;
    int age = 20;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void display() {
    System.out.println(name);
    System.out.println(age);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;`In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Student is the class name.&lt;/li&gt;
&lt;li&gt;name and age are instance variables.&lt;/li&gt;
&lt;li&gt;display() is a method.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can create an object of the class and call its method:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;public class Main {&lt;br&gt;
    public static void main(String[] args) {&lt;br&gt;
        Student s1 = new Student();&lt;br&gt;
        s1.display();&lt;br&gt;
    }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Gowtham&lt;br&gt;
20&lt;/p&gt;

&lt;p&gt;Here, s1 refers to the Student object.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Data Types in Java:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnuujg656hwij71hls898.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnuujg656hwij71hls898.webp" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>fullstack</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Java - Introduction</title>
      <dc:creator>Gowtham</dc:creator>
      <pubDate>Thu, 22 Oct 2026 17:22:34 +0000</pubDate>
      <link>https://dev.to/gowtham_s/java-programming-introduction-2eol</link>
      <guid>https://dev.to/gowtham_s/java-programming-introduction-2eol</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Java is one of the most popular programming languages in the world. It is a high-level, object-oriented programming language used to develop different types of applications.&lt;/p&gt;

&lt;p&gt;Java was developed by James Gosling and his team at Sun Microsystems. It was officially released in 1995. Today, Java is maintained by Oracle.&lt;/p&gt;

&lt;p&gt;Java is widely used in web development, enterprise applications, backend development, and many other areas of software development.&lt;/p&gt;

&lt;p&gt;If you are a beginner who wants to learn programming, Java is a good language to start with.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Java?
&lt;/h2&gt;

&lt;p&gt;Java is a general-purpose programming language designed to help developers build reliable, secure, and portable applications.&lt;/p&gt;

&lt;p&gt;One of Java's most important features is:&lt;/p&gt;

&lt;p&gt;"Write Once, Run Anywhere."&lt;/p&gt;

&lt;p&gt;This means that Java programs can run on different operating systems, such as Windows, Linux, and macOS, provided a compatible Java Virtual Machine (JVM) is available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should We Learn Java?
&lt;/h2&gt;

&lt;p&gt;There are several reasons to learn Java:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to Learn&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java has a structured syntax that helps beginners understand programming concepts step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Independent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java code is compiled into bytecode, which can run on any compatible JVM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object-Oriented Programming&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java supports object-oriented programming concepts such as classes, objects, inheritance, polymorphism, and encapsulation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java provides language and platform features that help developers build secure applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multithreading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java supports multithreading, allowing applications to perform multiple tasks concurrently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Large Community&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java has a large developer community, so beginners can find tutorials, documentation, and solutions to common problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features of Java
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Some important features of Java include:&lt;/li&gt;
&lt;li&gt;Simple and readable syntax&lt;/li&gt;
&lt;li&gt;Object-oriented programming&lt;/li&gt;
&lt;li&gt;Platform independence&lt;/li&gt;
&lt;li&gt;Portability&lt;/li&gt;
&lt;li&gt;Security features&lt;/li&gt;
&lt;li&gt;Multithreading support&lt;/li&gt;
&lt;li&gt;Automatic memory management&lt;/li&gt;
&lt;li&gt;Robust exception handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These features make Java useful for developing applications of different sizes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Is Java Used?
&lt;/h2&gt;

&lt;p&gt;Java is used in many areas of software development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Development&lt;/strong&gt;: Building server-side applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enterprise Applications&lt;/strong&gt;: Developing large business systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Android Development&lt;/strong&gt;: Java is used in Android applications, alongside other supported languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Banking Systems&lt;/strong&gt;: Developing financial and transaction-processing applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desktop Applications&lt;/strong&gt;: Creating applications with graphical user interfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Applications&lt;/strong&gt;: Building backend services and distributed systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  First Java Program
&lt;/h2&gt;

&lt;p&gt;Let's write our first Java program.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;public class HelloWorld {&lt;br&gt;
    public static void main(String[] args) {&lt;br&gt;
        System.out.println("Hello, World!");&lt;br&gt;
    }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hello, World!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;public class HelloWorld: Declares a class named HelloWorld.&lt;/p&gt;

&lt;p&gt;public static void main(String[] args): Defines the main method, which is the entry point when the program is launched using the standard Java launcher.&lt;/p&gt;

&lt;p&gt;System.out.println(): Prints text to the console.&lt;/p&gt;

&lt;p&gt;"Hello, World!": The message displayed on the screen.&lt;/p&gt;

&lt;p&gt;This simple program is the first step toward understanding Java programming.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is JVM, JRE, and JDK?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;JVM (Java Virtual Machine)&lt;/li&gt;
&lt;li&gt;The JVM executes Java bytecode.&lt;/li&gt;
&lt;li&gt;JRE (Java Runtime Environment)&lt;/li&gt;
&lt;li&gt;The JRE traditionally refers to the components needed to run Java applications, including the JVM and supporting libraries.&lt;/li&gt;
&lt;li&gt;JDK (Java Development Kit)&lt;/li&gt;
&lt;li&gt;The JDK provides the tools needed to develop Java applications, including the Java compiler and runtime components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In modern Java development, installing a JDK is the standard way to get started.&lt;/p&gt;

</description>
      <category>java</category>
      <category>fullstack</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
