<?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: Srinivasan. R</title>
    <description>The latest articles on DEV Community by Srinivasan. R (@seenu_seenu_1e97a9dd35e0c).</description>
    <link>https://dev.to/seenu_seenu_1e97a9dd35e0c</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%2F3691389%2F9319b24c-1195-498b-9636-9581fbb155c9.jpg</url>
      <title>DEV Community: Srinivasan. R</title>
      <link>https://dev.to/seenu_seenu_1e97a9dd35e0c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seenu_seenu_1e97a9dd35e0c"/>
    <language>en</language>
    <item>
      <title>Encapsulation</title>
      <dc:creator>Srinivasan. R</dc:creator>
      <pubDate>Tue, 10 Mar 2026 11:37:22 +0000</pubDate>
      <link>https://dev.to/seenu_seenu_1e97a9dd35e0c/encapsulation-in-oop-with-simple-java-example-db0</link>
      <guid>https://dev.to/seenu_seenu_1e97a9dd35e0c/encapsulation-in-oop-with-simple-java-example-db0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Object-Oriented Programming (OOP) is one of the most widely used programming paradigms in modern software development.&lt;br&gt;
One of the key principles of OOP is Encapsulation, which helps developers protect data and maintain clean code structure.&lt;/p&gt;

&lt;p&gt;In this article, we will understand what encapsulation is and how to implement it in Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Encapsulation?
&lt;/h2&gt;

&lt;p&gt;Encapsulation means wrapping data (variables) and methods (functions) together inside a single unit called a class.&lt;/p&gt;

&lt;p&gt;It also helps to hide sensitive data from direct access by making variables private and controlling access through methods.&lt;/p&gt;

&lt;p&gt;**Java Example&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private double balance;

public void deposit(double amount) {
    balance = balance + amount;
}

public double getBalance() {
    return balance;
}
&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;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    BankAccount acc = new BankAccount();
    acc.deposit(1000);

    System.out.println("Balance: " + acc.getBalance());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

</description>
      <category>beginners</category>
      <category>java</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Dynamic Sales Report: Implementing Date Range Filtering in C# Windows Forms</title>
      <dc:creator>Srinivasan. R</dc:creator>
      <pubDate>Fri, 09 Jan 2026 09:04:38 +0000</pubDate>
      <link>https://dev.to/seenu_seenu_1e97a9dd35e0c/building-a-dynamic-sales-report-implementing-date-range-filtering-in-c-windows-forms-561f</link>
      <guid>https://dev.to/seenu_seenu_1e97a9dd35e0c/building-a-dynamic-sales-report-implementing-date-range-filtering-in-c-windows-forms-561f</guid>
      <description>&lt;h2&gt;
  
  
  From Date: 01-12-2025 (December 1st)
&lt;/h2&gt;

&lt;h2&gt;
  
  
  To Date: 09-01-2026 (January 9th)
&lt;/h2&gt;

&lt;p&gt;As you can see, the DataGridView now populates with a much larger list of bills, and the Total Amount automatically updates to reflect the cumulative sales (17,130.00).&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.amazonaws.com%2Fuploads%2Farticles%2Fo8fiblwo8l8nixykcttn.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.amazonaws.com%2Fuploads%2Farticles%2Fo8fiblwo8l8nixykcttn.png" alt=" " width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  From Date: 01-01-2026
&lt;/h2&gt;

&lt;h2&gt;
  
  
  To Date: 09-01-2026
&lt;/h2&gt;

&lt;p&gt;By selecting these dates and clicking the "TOTAL" button, the application filters the records and calculates the total sales for just those 9 days (Total: 420.00).&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.amazonaws.com%2Fuploads%2Farticles%2Fcw72wugr5krbvsbwwj1g.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.amazonaws.com%2Fuploads%2Farticles%2Fcw72wugr5krbvsbwwj1g.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  (Backend)
&lt;/h2&gt;

&lt;p&gt;using (SqlCommand cmd = new SqlCommand(query, connection))&lt;br&gt;
{&lt;br&gt;
    // Binding the DateTimePicker values to SQL parameters&lt;br&gt;
    cmd.Parameters.AddWithValue("@StartDate", dateTimePickerFrom.Value.ToString("yyyy-MM-dd"));&lt;br&gt;
    cmd.Parameters.AddWithValue("@EndDate", dateTimePickerTo.Value.ToString("yyyy-MM-dd"));&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable dataTable = new DataTable();
adapter.Fill(dataTable);

// Binding data to the Grid
dataGridView1.DataSource = dataTable;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

</description>
    </item>
    <item>
      <title>Prime number</title>
      <dc:creator>Srinivasan. R</dc:creator>
      <pubDate>Sat, 03 Jan 2026 13:39:56 +0000</pubDate>
      <link>https://dev.to/seenu_seenu_1e97a9dd35e0c/prime-number-1lfl</link>
      <guid>https://dev.to/seenu_seenu_1e97a9dd35e0c/prime-number-1lfl</guid>
      <description>&lt;h2&gt;
  
  
  1. The Logic Building (The Strategy)
&lt;/h2&gt;

&lt;p&gt;The general rule for a Prime number is that it’s only divisible by 1 and itself. However, I realized a common confusion: Composite numbers (like 4) are also divisible by 1 and themselves.&lt;/p&gt;

&lt;p&gt;Prime Number (e.g., 5): When divided by every number from 1 to itself, it produces a remainder of zero exactly two times (1 and 5).&lt;/p&gt;

&lt;p&gt;Composite Number (e.g., 4): It produces a remainder of zero more than two times (1, 2, and 4).&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Recipe Writing (The Algorithm)
&lt;/h2&gt;

&lt;p&gt;I treated my code like a recipe:&lt;/p&gt;

&lt;p&gt;Input: Get the number.&lt;/p&gt;

&lt;p&gt;Loop: Check every number from 1 up to the input number.&lt;/p&gt;

&lt;p&gt;Check Remainder: Use the modulo operation (%) to find where the remainder is 0.&lt;/p&gt;

&lt;p&gt;Counter: Count how many times the remainder was 0.&lt;/p&gt;

&lt;p&gt;Final Result: If the count is exactly 2, it's Prime. Otherwise, it’s Composite.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The Ingredients (The Variables)
&lt;/h2&gt;

&lt;p&gt;I gathered my "ingredients" for the Java code:&lt;/p&gt;

&lt;p&gt;input: The number to check.&lt;/p&gt;

&lt;p&gt;count: To track the number of divisors.&lt;/p&gt;

&lt;p&gt;for loop: &lt;/p&gt;

&lt;p&gt;Start:1(Initialization)&lt;br&gt;
End:Input(Condition)&lt;br&gt;
Next step:+1(Increment)&lt;/p&gt;

&lt;p&gt;if-else: To handle the logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Program(Javascript):&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;var a = 24&lt;br&gt;
var c = 0&lt;/p&gt;

&lt;p&gt;for (i = 1; i &amp;lt;= a; i++) &lt;br&gt;
{&lt;br&gt;
    if (a % i == 0)&lt;br&gt;
    {&lt;br&gt;
        c++&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;if (c == 2)&lt;br&gt;
{&lt;br&gt;
    console.log("Prime")&lt;br&gt;
}&lt;br&gt;
else&lt;br&gt;
{&lt;br&gt;
    console.log("Not Prime") &lt;/p&gt;

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

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
