<?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: Sakthi S</title>
    <description>The latest articles on DEV Community by Sakthi S (@sakthi_s_daa401cfb84f4108).</description>
    <link>https://dev.to/sakthi_s_daa401cfb84f4108</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%2F3847096%2Fcb788ac9-856f-4451-afef-ac193c2523b6.jpg</url>
      <title>DEV Community: Sakthi S</title>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sakthi_s_daa401cfb84f4108"/>
    <language>en</language>
    <item>
      <title>Java Packages?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Tue, 21 Apr 2026 06:33:40 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/java-packages-5243</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/java-packages-5243</guid>
      <description>&lt;h2&gt;
  
  
  Packages
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A packages in java is used to group related classes.Think of it as a folder in a file directory.And to write a better maintainable code. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Providing access control using public, protected, and default access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It Avoiding name conflicts (two classes with the some name can exist in different packages).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Packages are divided into two categories:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Built-in packages&lt;br&gt;
(packages from the Java API)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User-defined Packages&lt;br&gt;
(create your own packages)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Built-in packages
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Java API is a library of prewritten classes, that are free to use, included in the Java Development Environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The library contains components for managing input, database programming, and much much more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The library is divided into packages and classes. Meaning you can either import a single class (along with its methods and attributes), or a whole package that contain all the classes that belong to the specified package.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Syntax:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;package.name.Class&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// Import a single class&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;package.name.*&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// Import the whole package&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  User-defined Packages
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;User-defined packages are those packages that are designed or created by the developer to categorize classes and packages. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It can be imported into other classes and used in the same way as we use built-in packages. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But if we omit the package statement, the class names are put into the default package, which has no name.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Syntax:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;package&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>java</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is Constructor in java?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Fri, 17 Apr 2026 18:08:28 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-constructor-in-java-cc7</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-constructor-in-java-cc7</guid>
      <description>&lt;h2&gt;
  
  
  Constructor
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In Java, a constructor is a block of codes similar to the method. It is called when an Object of the class is created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is a special type of method which is used to initialize the object.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rule of Constructor
&lt;/h2&gt;

&lt;p&gt;There are two rules defined for the constructor.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The  Constructor has the same name as the class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Constructor must have no explicit return type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The constructor is called automatically every time you make an object.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Classname&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Classname&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
        &lt;span class="c1"&gt;// constructor body&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Student&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// Constructor&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Student&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
       &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Constructor"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Method"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="nc"&gt;Student&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Student&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>java</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Difference between static and non-static in java?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Thu, 16 Apr 2026 18:22:36 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/difference-between-static-and-non-static-in-java-1g2e</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/difference-between-static-and-non-static-in-java-1g2e</guid>
      <description>&lt;h2&gt;
  
  
  Static
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A static member (variable or method) belongs to the class itself, not to individual objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A static method in Java is associated with the class, not with any object or instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It can be accessed by all instances of the class, but it does not rely on any specific instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static methods can access static variables directly without the need for an object.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Non-Static (Instance)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An instance method belongs to an object of a class and requires an instance to be called. It can access and modify the object’s instance variables and can also call other instance or static methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can access and modify instance variables (object state).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can accept parameters and return a value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can call other instance methods or static methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports encapsulation and object-oriented design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follows the divide-and-conquer principle in larger applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is a Server?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Wed, 15 Apr 2026 16:43:02 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-a-server-1joh</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-a-server-1joh</guid>
      <description>&lt;h2&gt;
  
  
  Server
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The term "server" comes from the world of computing and refers to a piece of computer software or hardware that offers its services to other devices or programs, referred to as "clients."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Servers provide a wide variety of services, including the execution of calculations and the distribution of resources and data to several clients at the same time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The size of the organization's network, the storage capacity, the accessibility needs, the number of users, and other factors, among others, can all influence the formation of a server that will control many different functions on the network.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Servers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mail Server&lt;/strong&gt; − A server that administers and regulates the distribution of emails within an organization is known as a mail server. It is responsible for both receiving and sending emails on time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Printer Server&lt;/strong&gt; − The printing done by users is managed by a Print server, which also synchronizes all connected printers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;FTP Server&lt;/strong&gt; − Files may be moved more quickly and easily with the assistance of an FTP server, which also serves as a repository for the files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;Web Server *&lt;/em&gt;− Interaction and accessibility with the material on the web are both governed by what is known as a web server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;File Server&lt;/strong&gt; − It is the responsibility of a file server to store all of the user files and network data files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database Server&lt;/strong&gt; − A database server is responsible for managing many databases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single Server&lt;/strong&gt; − In addition, a single server has the capability of managing a multitude of functions simultaneously, given that the hardware conditions are adequate to match the requirements of the network.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
    </item>
    <item>
      <title>History of Java?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Sat, 11 Apr 2026 18:28:30 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/history-of-java-13ec</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/history-of-java-13ec</guid>
      <description>&lt;h2&gt;
  
  
  Java
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Java was initiated in 1991 by &lt;strong&gt;James Gosling&lt;/strong&gt; at Sun Microsystems (the &lt;strong&gt;"Green Team"&lt;/strong&gt;) to develop a platform-independent language for embedded devices. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Originally named &lt;strong&gt;Oak&lt;/strong&gt;, it was renamed Java in 1995&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After exploring C++ (which proved too heavy and too closely tied to platform dependencies), the team embarked on an entirely new project codenamed the “&lt;strong&gt;Green Project&lt;/strong&gt;”.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From the outset Java was built around key design goals: &lt;strong&gt;robustness, portability, platform independence, high performance, and multithreading.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Over the years the Java Class Library expanded from only a few hundred classes to thousands and the platform grew to support &lt;br&gt;
&lt;strong&gt;enterprise, mobile, and cloud applications&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
    </item>
    <item>
      <title>What is Java Programming?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Fri, 10 Apr 2026 15:47:48 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-java-programming-1cl8</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-java-programming-1cl8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Java&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Java is a high-level, Object-oriented programming language developed by James Gosling at Sun Microsystems (now owned by Oracle Corporation).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Java programming is the use of the Java language to create software applications. It’s one of the most widely used programming languages in the world.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Where is Java Used?&lt;/strong&gt;&lt;br&gt;
Java is used to build many types of applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Mobile apps (especially Android apps)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web applications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Desktop software&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise systems (banking, e-commerce)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Games and backend systems&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
When we learn any programming language, the first step is writing a simple program to display "Hello World". So, here is a simple Java program that displays "Hello World" on the screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HelloWorld&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello World!"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>programming</category>
      <category>java</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is Method Overloading in Java?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Wed, 08 Apr 2026 18:14:48 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-method-overloading-in-java-37ml</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-method-overloading-in-java-37ml</guid>
      <description>&lt;p&gt;&lt;strong&gt;Method Overloading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In java is a feature that allows a class to have multiple methods with the same name, provide they have different parameter lists&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is a form of compile-time polymorphism also known as static polymorphism or early binding  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Methods can share the same name if their parameter lists differ.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cannot overload by return type alone; parameters must differ.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The compiler chooses the most specific match when multiple methods could apply.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;class Product{&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public int multiply(int a, int b){

    int prod = a * b;
    return prod;
}


public int multiply(int a, int b, int c){

    int prod = a * b * c;
    return prod;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;class Geeks{&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)
{

    Product ob = new Product();


    int prod1 = ob.multiply(1, 2);


    System.out.println(
        "Product of the two integer value: " + prod1);


    int prod2 = ob.multiply(1, 2, 3);


    System.out.println(
        "Product of the three integer value: " + prod2);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

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

Product of the two integer value: 2
Product of the three integer value: 6

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

&lt;/div&gt;



</description>
      <category>java</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is Hook ?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Sun, 29 Mar 2026 12:02:13 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-hook--fh2</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-hook--fh2</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;React Hooks&lt;br&gt;
are functions that allow you to use state and other React features, such as lifecycle methods and context, within functional components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hooks let you use different React features from your components. You can either use the built-in Hooks or combine them to build your own. This page lists all built-in Hooks in React.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Commonly Used Built-in Hooks *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;useState: Adds state variables to a functional component and provides a function to update that state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useEffect: Manages side effects, such as data fetching, subscriptions, or manual DOM updates&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useContext: Allows components to subscribe to React's Context API, making it easier to share data across the component tree without "prop drilling".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useReducer: A more advanced state management Hook for handling complex state logic, often as an alternative to useState.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useRef: Returns a mutable ref object that can persist values across renders or directly access DOM elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useMemo / useCallback: Performance optimization Hooks that memoize expensive calculations or function definitions, preventing unnecessary re-renders of components.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is UseEffect ?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Sat, 28 Mar 2026 16:03:53 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-useeffect--3k76</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-useeffect--3k76</guid>
      <description>&lt;p&gt;In simple terms, useEffect allows you to run code after a component renders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purpose and Usage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;useEffect is crucial because functional components are intended to be pure functions (predictable output given the same input). &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operations that interact with the "outside world" need a designated place to run without disrupting the rendering process. Before hooks, these tasks were handled in class components using lifecycle methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;like componentDidMount, componentDidUpdate, and componentWillUnmount. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Typical uses:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fetching data from APIs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Updating the DOM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setting up subscriptions (e.g., WebSocket)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Timers (setTimeout, setInterval)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;UseEffect Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;incre&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;interval&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;working&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;clearInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;interval&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="na"&gt;div&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;incre&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;+&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is Use State?</title>
      <dc:creator>Sakthi S</dc:creator>
      <pubDate>Sat, 28 Mar 2026 15:28:34 +0000</pubDate>
      <link>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-use-state-339f</link>
      <guid>https://dev.to/sakthi_s_daa401cfb84f4108/what-is-use-state-339f</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The useState hook is a fundamental function in React that allows you to add state variables to functional components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;State refers to data or properties that need to be tracked and updated in an application, and useState enables components to "remember" information between re-renders, making the user interface dynamic and interactive. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;const [state, setState] = useState(initialState)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;useState(initialState)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Call useState at the top level of your component to declare a state variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="s2"&gt;`import { useState } from 'react';

function MyComponent() {
  const [age, setAge] = useState(28);
  const [name, setName] = useState('Taylor');
  const [todos, setTodos] = useState(() =&amp;gt; createTodos());`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
