<?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: Abinesh.R</title>
    <description>The latest articles on DEV Community by Abinesh.R (@abineshrajendiran).</description>
    <link>https://dev.to/abineshrajendiran</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%2F4090395%2F5f46cdf1-affc-4e2d-8986-5aaa93329b88.jpg</url>
      <title>DEV Community: Abinesh.R</title>
      <link>https://dev.to/abineshrajendiran</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abineshrajendiran"/>
    <language>en</language>
    <item>
      <title>Scanner Class</title>
      <dc:creator>Abinesh.R</dc:creator>
      <pubDate>Sun, 06 Sep 2026 11:42:18 +0000</pubDate>
      <link>https://dev.to/abineshrajendiran/scanner-class-6po</link>
      <guid>https://dev.to/abineshrajendiran/scanner-class-6po</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is the Scanner Class?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scanner is a class in the java.util package used to read input — from the keyboard (System.in), a file, or even a String. It breaks input into tokens (words, numbers, lines) using whitespace as the default delimiter, and provides methods to parse each token into the type you need (int, double, String, etc.).&lt;/p&gt;

&lt;p&gt;Think of it as a "reader + parser" combined — it doesn't just grab raw text, it converts it into the exact data type your program expects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Importing and Creating a Scanner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;import java.util.Scanner;&lt;/p&gt;

&lt;p&gt;Scanner sc = new Scanner(System.in);&lt;/p&gt;

&lt;p&gt;System.in tells it to read from the keyboard/console. You can also pass a File object or a String to read from those sources instead.&lt;/p&gt;

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

&lt;p&gt;import java.util.Scanner;&lt;/p&gt;

&lt;p&gt;public class ScannerDemo {&lt;br&gt;
    public static void main(String[] args) {&lt;br&gt;
        Scanner sc = new Scanner(System.in);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    System.out.print("Enter your name: ");
    String name = sc.nextLine();

    System.out.print("Enter your age: ");
    int age = sc.nextInt();

    System.out.println("Hello " + name + ", you are " + age + " years old.");

    sc.close();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;&lt;strong&gt;Commonly Used Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Method  Reads&lt;br&gt;
nextInt()   an int&lt;br&gt;
nextLong()  a long&lt;br&gt;
nextDouble()    a double&lt;br&gt;
nextFloat() a float&lt;br&gt;
next()         a single word (stops at whitespace)&lt;br&gt;
nextLine()  an entire line, including spaces&lt;br&gt;
nextBoolean()   true/false&lt;br&gt;
hasNext()   checks if more input is available&lt;br&gt;
hasNextInt()    checks if the next token is a valid int&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Classic Bug: Mixing nextInt() and nextLine()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scanner sc = new Scanner(System.in);&lt;/p&gt;

&lt;p&gt;System.out.print("Enter age: ");&lt;br&gt;
int age = sc.nextInt();      // reads the number, but leaves "\n" in the buffer&lt;/p&gt;

&lt;p&gt;System.out.print("Enter name: ");&lt;br&gt;
String name = sc.nextLine(); // reads that leftover "\n" instead of waiting for real input!&lt;/p&gt;

&lt;p&gt;nextInt() only consumes the digits — it leaves the newline character behind in the input buffer. The next nextLine() call then grabs that leftover newline instead of pausing for actual input, so name ends up empty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt;&lt;br&gt;
** consume the leftover newline with an extra nextLine() call:**&lt;/p&gt;

&lt;p&gt;int age = sc.nextInt();&lt;br&gt;
sc.nextLine();&lt;br&gt;&lt;br&gt;
String name = sc.nextLine();&lt;/p&gt;

&lt;p&gt;nextInt() only consumes the digits — it leaves the newline character behind in the input buffer. The next nextLine() call then grabs that leftover newline instead of pausing for actual input, so name ends up empty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;consume the leftover newline with an extra nextLine() call:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;int age = sc.nextInt();&lt;br&gt;
sc.nextLine();  // clears the leftover newline&lt;br&gt;
String name = sc.nextLine();&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reading Multiple Inputs in a Loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scanner sc = new Scanner(System.in);&lt;br&gt;
System.out.print("How many numbers? ");&lt;br&gt;
int n = sc.nextInt();&lt;/p&gt;

&lt;p&gt;int[] arr = new int[n];&lt;br&gt;
for (int i = 0; i &amp;lt; n; i++) {&lt;br&gt;
    arr[i] = sc.nextInt();&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always Close Your Scanner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;sc.close();&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scanner reads and parses input from the console, a file, or a string.&lt;br&gt;
Use next()/nextLine() for text, and nextInt()/nextDouble()/etc. for numbers.&lt;br&gt;
Watch out for the nextInt() → nextLine() buffer bug — it's the #1 gotcha for beginners.&lt;br&gt;
Always close your Scanner when done.&lt;/p&gt;

</description>
      <category>java</category>
      <category>jvm</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Online Voting System in my facing challenges.....</title>
      <dc:creator>Abinesh.R</dc:creator>
      <pubDate>Sun, 06 Sep 2026 11:14:11 +0000</pubDate>
      <link>https://dev.to/abineshrajendiran/online-voting-system-in-my-facing-challenges-with-answer-pmh</link>
      <guid>https://dev.to/abineshrajendiran/online-voting-system-in-my-facing-challenges-with-answer-pmh</guid>
      <description>&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%2Fatcvhhhcxhq6ynvn2xxt.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%2Fatcvhhhcxhq6ynvn2xxt.png" alt=" " width="800" height="363"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;1. JDBC Connection &amp;amp; SQL Errors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My first roadblock wasn't even logic — it was just getting connected. I kept hitting:&lt;/p&gt;

&lt;p&gt;com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure&lt;br&gt;
**&lt;br&gt;
What was going wrong:**&lt;/p&gt;

&lt;p&gt;Wrong JDBC URL format (missing useSSL=false or timezone parameter caused issues on newer MySQL versions)&lt;br&gt;
MySQL service not running&lt;br&gt;
Driver JAR not added to the classpath correctly&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How I fixed it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;java&lt;/strong&gt;&lt;br&gt;
String url = "jdbc:mysql://localhost:3306/voting_db?useSSL=false&amp;amp;serverTimezone=UTC";&lt;br&gt;
Connection con = DriverManager.getConnection(url, "root", "password");&lt;/p&gt;

&lt;p&gt;I also wrapped every connection attempt in a proper try-catch-finally block instead of letting exceptions crash the whole app silently:&lt;/p&gt;

&lt;p&gt;java&lt;br&gt;
*&lt;em&gt;try *&lt;/em&gt;(Connection con = DriverManager.getConnection(url, user, pass)) {&lt;br&gt;
    // queries here&lt;br&gt;
} catch (SQLException e) {&lt;br&gt;
    System.out.println("DB connection failed: " + e.getMessage());&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Lesson: Using try-with-resources for Connection, PreparedStatement, and ResultSet saved me from a bunch of "leaked connection" bugs later.&lt;br&gt;
**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Preventing Duplicate Votes**&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This was the trickiest logic problem. Nothing stops a user from just running the "vote" function twice unless you explicitly block it.&lt;br&gt;
**&lt;br&gt;
My approach:**&lt;/p&gt;

&lt;p&gt;Added a has_voted boolean column to the voters table.&lt;br&gt;
Before casting a vote, I check this flag. After a successful vote, I flip it immediately in the same transaction — not as an afterthought.&lt;br&gt;
&lt;strong&gt;java&lt;/strong&gt;&lt;br&gt;
public boolean hasVoted(String voterId) throws SQLException {&lt;br&gt;
    String query = "SELECT has_voted FROM voters WHERE voter_id = ?";&lt;br&gt;
    try (PreparedStatement ps = con.prepareStatement(query)) {&lt;br&gt;
        ps.setString(1, voterId);&lt;br&gt;
        ResultSet rs = ps.executeQuery();&lt;br&gt;
        return rs.next() &amp;amp;&amp;amp; rs.getBoolean("has_voted");&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;I also added a UNIQUE constraint at the database level as a backup — never trust application logic alone to enforce something this important. If the app logic has a bug, the database still refuses the duplicate insert.&lt;br&gt;
**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Designing the DAO Pattern Cleanly**&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At first, my DB queries were scattered across the main class — messy and hard to test. Refactoring into a proper DAO layer took a few iterations to get right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final structure I settled on:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;VoterDAO *&lt;/em&gt;      -&amp;gt; handles voter lookup &amp;amp; verification&lt;br&gt;
*&lt;em&gt;CandidateDAO *&lt;/em&gt;  -&amp;gt; handles candidate data&lt;br&gt;
*&lt;em&gt;VoteDAO    *&lt;/em&gt;    -&amp;gt; handles casting + counting votes&lt;br&gt;
*&lt;em&gt;DBConnection  *&lt;/em&gt; -&amp;gt; single utility class for getting connections&lt;/p&gt;

&lt;p&gt;Each DAO interface has an implementation class, so if I ever swap MySQL for another database, only the implementation changes — not the code calling it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;java&lt;/strong&gt;&lt;br&gt;
public interface VoterDAO {&lt;br&gt;
    boolean verifyVoter(String voterId);&lt;br&gt;
    boolean hasVoted(String voterId);&lt;br&gt;
}&lt;br&gt;
**&lt;br&gt;
Lesson:** Separating "what" (interface) from "how" (implementation) made my code far easier to debug and extend later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Generating the Vote Result File&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once voting closes, I needed to tally results and write them to a file — but my first attempt kept producing incomplete or garbled output because I wasn't flushing/closing the file writer properly.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;java&lt;/strong&gt;&lt;br&gt;
try (BufferedWriter writer = new BufferedWriter(new FileWriter("vote_results.txt"))) {&lt;br&gt;
    for (Map.Entry entry : results.entrySet()) {&lt;br&gt;
        writer.write(entry.getKey() + " : " + entry.getValue() + " votes");&lt;br&gt;
        writer.newLine();&lt;br&gt;
    }&lt;br&gt;
} catch (IOException e) {&lt;br&gt;
    System.out.println("Error writing results: " + e.getMessage());&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>sql</category>
      <category>jdbc</category>
    </item>
    <item>
      <title>SQL COMMANDS,AND FUNCTIONS CONCEPTS</title>
      <dc:creator>Abinesh.R</dc:creator>
      <pubDate>Sat, 05 Sep 2026 03:06:06 +0000</pubDate>
      <link>https://dev.to/abineshrajendiran/sql-commandsand-functions-concepts-27ai</link>
      <guid>https://dev.to/abineshrajendiran/sql-commandsand-functions-concepts-27ai</guid>
      <description>&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%2Fw7d6iklryxudeq149prx.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%2Fw7d6iklryxudeq149prx.jpg" alt=" " width="706" height="878"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. SQL Basics &amp;amp; Filtering&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;SELECT **&lt;br&gt;
SELECT — SELECT name FROM users; → picks which columns to return.&lt;br&gt;
**Example:&lt;/strong&gt;&lt;br&gt;
 SELECT * FROM users; &lt;br&gt;
     → returns all columns.&lt;br&gt;
*&lt;em&gt;DISTINCT *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;SELECT DISTINCT city FROM users;         → removes duplicate rows from results.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;FROM *&lt;/em&gt;&lt;br&gt;
    SELECT * FROM users; &lt;br&gt;
→ names the table to query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHERE&lt;/strong&gt; &lt;br&gt;
 SELECT * FROM users WHERE age &amp;gt; 18; &lt;br&gt;
    → filters rows before     grouping/output.&lt;br&gt;
&lt;strong&gt;EXAMPLE&lt;/strong&gt;:&lt;br&gt;
*&lt;em&gt;AND *&lt;/em&gt;&lt;br&gt;
 WHERE age &amp;gt; 18 AND city='Chennai'; &lt;br&gt;
→ all conditions must be true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OR —&lt;/strong&gt; &lt;br&gt;
   WHERE city='Chennai' OR city='Trichy'; &lt;br&gt;
  → at least one condition must be true.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;NOT *&lt;/em&gt; &lt;br&gt;
    WHERE NOT city='Chennai';&lt;br&gt;
 → negates a condition.&lt;br&gt;
*&lt;em&gt;IN *&lt;/em&gt;&lt;br&gt;
WHERE city IN ('Chennai','Trichy'); &lt;br&gt;
→ matches any value in a list.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;NOT IN *&lt;/em&gt;&lt;br&gt;
WHERE city NOT IN ('Chennai'); &lt;br&gt;
→ excludes values in a list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BETWEEN&lt;/strong&gt; &lt;br&gt;
WHERE age BETWEEN 18 AND 25; &lt;br&gt;
→ inclusive range check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LIKE **&lt;br&gt;
 WHERE name LIKE 'A%'; &lt;br&gt;
→ pattern match (%=any chars, _=one char).&lt;br&gt;
*&lt;em&gt;Like *&lt;/em&gt; &lt;br&gt;
**case-insensitive&lt;/strong&gt;&lt;br&gt;
 LIKE (Postgres only; &lt;br&gt;
MySQL's LIKE is case-insensitive by default on most collations).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IS NULL&lt;/strong&gt; &lt;br&gt;
WHERE phone IS NULL; &lt;br&gt;
→ checks for missing values.&lt;br&gt;
*&lt;em&gt;IS NOT NULL *&lt;/em&gt; &lt;br&gt;
WHERE phone IS NOT NULL;&lt;br&gt;
 → checks value exists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ORDER BY **&lt;br&gt;
 ORDER BY age DESC; &lt;br&gt;
      → sorts result rows.&lt;br&gt;
**ASC&lt;/strong&gt; &lt;br&gt;
 ascending sort order (default).&lt;br&gt;
&lt;strong&gt;DESC **&lt;br&gt;
 descending sort order.&lt;br&gt;
**LIMIT&lt;/strong&gt; &lt;br&gt;
      LIMIT 10;&lt;br&gt;
 → caps number of rows returned.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;OFFSET *&lt;/em&gt;&lt;br&gt;
 LIMIT 10 OFFSET 20; &lt;br&gt;
→ skips rows before returning (pagination).&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;AS *&lt;/em&gt; &lt;br&gt;
SELECT name AS full_name; &lt;br&gt;
→ renames a column/table (alias).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CASE WHEN&lt;/strong&gt; &lt;br&gt;
 CASE WHEN age&amp;lt;18 THEN 'Minor' ELSE 'Adult' END → conditional logic in a query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COALESCE()&lt;/strong&gt;&lt;br&gt;
*&lt;em&gt;COALESCE(phone,'N/A') *&lt;/em&gt;&lt;br&gt;
  → returns first non-null value from a list.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;NULLIF() *&lt;/em&gt; &lt;br&gt;
      NULLIF(a,b)&lt;br&gt;
      → returns NULL if a=b, else    returns a.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;CAST() *&lt;/em&gt; &lt;br&gt;
CAST(salary AS DECIMAL(10,2)) &lt;br&gt;
   →converts data type.&lt;br&gt;
*&lt;em&gt;ROUND() *&lt;/em&gt;&lt;br&gt;
 ROUND(3.14159,2)&lt;br&gt;
 → rounds a number to given decimals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPPER()&lt;/strong&gt; &lt;br&gt;
    converts text to uppercase.&lt;br&gt;
*&lt;em&gt;LOWER() *&lt;/em&gt;&lt;br&gt;
converts text to lowercase.&lt;br&gt;
*&lt;em&gt;TRIM() *&lt;/em&gt;&lt;br&gt;
removes leading/trailing spaces.&lt;/p&gt;

&lt;p&gt;**CONCAT() &lt;br&gt;
    CONCAT(first,' ',last)&lt;br&gt;
 → joins strings together.&lt;/p&gt;

&lt;p&gt;2*&lt;em&gt;. Aggregation &amp;amp; Functions&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;COUNT() *&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;COUNT(*)&lt;br&gt;
 counts rows; COUNT(col) counts non-null values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COUNT(&lt;em&gt;) *&lt;/em&gt;&lt;br&gt;
    counts total rows including    NULLs.&lt;br&gt;
*&lt;em&gt;COUNT(DISTINCT) *&lt;/em&gt;&lt;br&gt;
counts unique non-null values.&lt;br&gt;
*&lt;em&gt;SUM() *&lt;/em&gt;&lt;br&gt;
 total of a numeric column.&lt;br&gt;
**AVG()&lt;/strong&gt; &lt;br&gt;
average of a numeric column.&lt;br&gt;
*&lt;em&gt;MIN() *&lt;/em&gt;&lt;br&gt;
smallest value.&lt;br&gt;
*&lt;em&gt;MAX() *&lt;/em&gt;&lt;br&gt;
 largest value.&lt;br&gt;
*&lt;em&gt;GROUP BY *&lt;/em&gt;&lt;br&gt;
 GROUP BY department &lt;br&gt;
→ groups rows to apply aggregates per group.&lt;br&gt;
*&lt;em&gt;HAVING *&lt;/em&gt;&lt;br&gt;
 HAVING COUNT(&lt;em&gt;)&amp;gt;5 &lt;br&gt;
→ filters groups after aggregation (WHERE can't do this).&lt;br&gt;
**GROUPING SETS *&lt;/em&gt;&lt;br&gt;
 lets you compute multiple GROUP BY combinations in one query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ROLLUP&lt;/strong&gt; &lt;br&gt;
adds subtotal + grand total rows to grouped results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CUBE&lt;/strong&gt; &lt;br&gt;
like ROLLUP but generates subtotals for every combination of grouped columns.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;DATE() *&lt;/em&gt; extracts the date part from a datetime value.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;EXTRACT()  *&lt;/em&gt;&lt;br&gt;
EXTRACT(YEAR FROM order_date)&lt;br&gt;
 → pulls a specific part (year/month/day) from a date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DATE_TRUNC()&lt;/strong&gt; &lt;br&gt;
rounds a timestamp down to a unit (day, month, year) &lt;br&gt;
Postgres; MySQL uses DATE_FORMAT.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;CURRENT_DATE *&lt;/em&gt;&lt;br&gt;
 returns today's date.&lt;br&gt;
*&lt;em&gt;CURRENT_TIMESTAMP *&lt;/em&gt;&lt;br&gt;
returns current date and time.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;INTERVAL *&lt;/em&gt;&lt;br&gt;
 date + INTERVAL 7 DAY &lt;br&gt;
→ adds/subtracts a time span.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ABS()&lt;/strong&gt; &lt;br&gt;
absolute (non-negative) value.&lt;br&gt;
&lt;strong&gt;CEIL() **&lt;br&gt;
 rounds a number up.&lt;br&gt;
**FLOOR()&lt;/strong&gt; &lt;br&gt;
 rounds a number down.&lt;br&gt;
&lt;strong&gt;POWER()&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
POWER(2,3) &lt;br&gt;
→ 2³ = 8.&lt;br&gt;
*&lt;em&gt;MOD() *&lt;/em&gt;&lt;br&gt;
 remainder of division.&lt;br&gt;
*&lt;em&gt;LENGTH() *&lt;/em&gt; &lt;br&gt;
number of characters in a string.&lt;br&gt;
*&lt;em&gt;SUBSTRING() *&lt;/em&gt; SUBSTRING(name,1,3) &lt;br&gt;
→ extracts part of a string.&lt;br&gt;
*&lt;em&gt;REPLACE() *&lt;/em&gt; REPLACE(str,'a','b') &lt;br&gt;
→ replaces substring occurrences.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;POSITION() *&lt;/em&gt;&lt;br&gt;
finds the index of a substring within a string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STRING_AGG()&lt;/strong&gt; &lt;br&gt;
concatenates values from multiple rows into one string with a separator &lt;br&gt;
(Postgres; MySQL equivalent is GROUP_CONCAT).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GREATEST() **&lt;br&gt;
 returns the largest of a list of values.&lt;br&gt;
*&lt;em&gt;LEAST() *&lt;/em&gt;&lt;br&gt;
returns the smallest of a list of values.&lt;br&gt;
**3. Joins &amp;amp; Subqueries&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;INNER JOIN&lt;/strong&gt; &lt;br&gt;
returns only rows matching in both tables.&lt;br&gt;
&lt;strong&gt;LEFT JOIN&lt;/strong&gt; &lt;br&gt;
all rows from left table, matched rows from right (NULL if no match).&lt;br&gt;
&lt;strong&gt;RIGHT JOIN&lt;/strong&gt; &lt;br&gt;
 all rows from right table, matched rows from left.&lt;br&gt;
&lt;strong&gt;FULL OUTER JOIN&lt;/strong&gt;&lt;br&gt;
 all rows from both tables, matched where possible (not supported directly in MySQL — simulate with UNION of LEFT and RIGHT joins).&lt;br&gt;
&lt;strong&gt;CROSS JOIN&lt;/strong&gt; &lt;br&gt;
 every row of table A paired with every row of table B (Cartesian product).&lt;br&gt;
&lt;strong&gt;SELF JOIN ** &lt;br&gt;
a table joined with itself &lt;br&gt;
(e.g., comparing employees to their managers in the same table).&lt;br&gt;
**JOIN ... ON&lt;/strong&gt;&lt;br&gt;
JOIN table2 ON t1.id=t2.id&lt;br&gt;
 → &lt;strong&gt;join condition&lt;/strong&gt; &lt;br&gt;
using arbitrary columns.&lt;/p&gt;

&lt;p&gt;JOIN ... USING &lt;br&gt;
 JOIN table 2 *&lt;em&gt;USING(id)&lt;br&gt;
 → **shorthand join when column names match exactly.&lt;br&gt;
**UNION *&lt;/em&gt;&lt;br&gt;
combines results of two queries, removing duplicates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UNION ALL&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
combines results of two queries, keeping duplicates (faster).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INTERSECT&lt;/strong&gt; &lt;br&gt;
 returns rows common to both queries.&lt;br&gt;
&lt;strong&gt;EXCEPT&lt;/strong&gt; &lt;br&gt;
 returns rows in the first query not present in the second &lt;br&gt;
(MySQL: use NOT IN/NOT EXISTS instead).&lt;br&gt;
&lt;strong&gt;EXISTS&lt;/strong&gt; &lt;br&gt;
WHERE EXISTS (subquery) &lt;br&gt;
→ true if subquery returns any row.&lt;br&gt;
&lt;strong&gt;NOT EXISTS&lt;/strong&gt; &lt;br&gt;
true if subquery returns no rows.&lt;br&gt;
*&lt;em&gt;ANY — *&lt;/em&gt;&lt;br&gt;
compares a value to any result of a subquery &lt;br&gt;
(e.g., &amp;gt; ANY(...)).&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;ALL *&lt;/em&gt;&lt;br&gt;
compares a value to all results of a subquery &lt;br&gt;
(e.g., &amp;gt; ALL(...)).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IN (Subquery)&lt;/strong&gt; &lt;br&gt;
 WHERE id IN (SELECT ...)&lt;br&gt;
 → filters using a subquery result set.&lt;br&gt;
&lt;strong&gt;Scalar Subquery&lt;/strong&gt; &lt;br&gt;
 a subquery that returns exactly one value, used like a single value.&lt;br&gt;
*&lt;em&gt;Correlated Subquery  *&lt;/em&gt;&lt;br&gt;
a subquery that references the outer query's columns, run once per outer row.&lt;br&gt;
*&lt;em&gt;Nested Subquery *&lt;/em&gt; &lt;br&gt;
a subquery inside another subquery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WITH&lt;/strong&gt; &lt;br&gt;
 starts a Common Table Expression (CTE), a named temporary result set.&lt;br&gt;
&lt;strong&gt;CTE&lt;/strong&gt; &lt;br&gt;
WITH temp AS (SELECT ...) &lt;/p&gt;

&lt;p&gt;SELECT * FROM temp; &lt;br&gt;
→ improves readability of complex queries.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Recursive CTE *&lt;/em&gt; &lt;br&gt;
a CTE that references itself, used for hierarchical/tree data&lt;br&gt;
 (e.g., org charts).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CREATE VIEW&lt;/strong&gt; &lt;br&gt;
     saves a query as a virtual, reusable table.&lt;/p&gt;

&lt;p&gt;CREATE TABLE AS &lt;br&gt;
     creates a new table populated from a query's results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INSERT INTO&lt;/strong&gt; &lt;br&gt;
     adds new rows to a table.&lt;br&gt;
&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br&gt;
 modifies existing rows.&lt;br&gt;
&lt;strong&gt;DELETE **&lt;br&gt;
removes rows from a table.&lt;br&gt;
*&lt;em&gt;MERGE *&lt;/em&gt;— combines **INSERT/UPDATE/DELETE&lt;/strong&gt;&lt;br&gt;
 logic based on a match condition&lt;br&gt;
 ("upsert" in Oracle/SQL Server; MySQL uses INSERT ... ON DUPLICATE KEY UPDATE).&lt;/p&gt;

&lt;p&gt;UPSERT — general term for "insert, or update if it already exists."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Window &amp;amp; Advanced SQL&lt;/strong&gt;&lt;br&gt;
*&lt;em&gt;OVER() *&lt;/em&gt;&lt;br&gt;
    turns an aggregate/ranking function into a window function that doesn't collapse rows.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;PARTITION BY  *&lt;/em&gt;&lt;br&gt;
OVER(PARTITION BY dept)&lt;br&gt;
 → resets the window calculation for each group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ORDER BY (in window)&lt;/strong&gt; &lt;br&gt;
 defines row order within each partition for ranking/running calcs.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;ROW_NUMBER()  *&lt;/em&gt;&lt;br&gt;
assigns a unique sequential number to each row within a partition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RANK()&lt;/strong&gt; &lt;br&gt;
 ranks rows, skipping numbers after ties (1,2,2,4).&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;DENSE_RANK()  *&lt;/em&gt;&lt;br&gt;
ranks rows without skipping after ties (1,2,2,3).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NTILE()&lt;/strong&gt; &lt;br&gt;
 splits rows into N roughly equal buckets (e.g., quartiles).&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;LAG() *&lt;/em&gt; &lt;br&gt;
accesses a value from the previous row in the partition.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;LEAD() *&lt;/em&gt;&lt;br&gt;
 accesses a value from the next row in the partition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FIRST_VALUE()&lt;/strong&gt; &lt;br&gt;
 returns the first value in the window frame.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;LAST_VALUE() *&lt;/em&gt;&lt;br&gt;
returns the last value in the window frame.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NTH_VALUE()&lt;/strong&gt; &lt;br&gt;
returns the value at a specific position in the window frame.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SUM() OVER()&lt;/strong&gt; &lt;br&gt;
running/grouped total without collapsing rows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AVG() OVER()&lt;/strong&gt; &lt;br&gt;
running/grouped average.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COUNT() OVER()&lt;/strong&gt;    running/grouped count.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MIN() OVER()&lt;/strong&gt; &lt;br&gt;
 running/grouped minimum.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;MAX() OVER() *&lt;/em&gt;&lt;br&gt;
 running/grouped maximum.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;ROWS BETWEEN *&lt;/em&gt;&lt;br&gt;
defines a physical row-based window frame&lt;br&gt;
 (e.g., ROWS BETWEEN)&lt;/p&gt;

&lt;p&gt;2 &lt;strong&gt;PRECEDING AND CURRENT ROW).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RANGE BETWEEN&lt;/strong&gt; &lt;br&gt;
defines a value-based window frame instead of row-count based.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;UNBOUNDED PRECEDING *&lt;/em&gt;&lt;br&gt;
 window frame starts from the very first row of the partition.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;CURRENT ROW *&lt;/em&gt;&lt;br&gt;
 window frame boundary set at the current row.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;PERCENT_RANK()  *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;relative rank of a row as a percentage (0 to 1).&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;CUME_DIST()  *&lt;/em&gt;&lt;br&gt;
cumulative distribution fraction of rows with value ≤ current row.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;PERCENTILE_CONT() *&lt;/em&gt;&lt;br&gt;
interpolated percentile value (continuous).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PERCENTILE_DISC()&lt;/strong&gt; &lt;br&gt;
 percentile value taken from actual data (discrete).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;QUALIFY&lt;/strong&gt; &lt;br&gt;
filters rows based on a window function result &lt;br&gt;
(Snowflake/BigQuery; in MySQL/Oracle, wrap in a subquery and filter with WHERE instead).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PIVOT&lt;/strong&gt; &lt;br&gt;
rotates row values into columns (native in Oracle/SQL Server; MySQL simulates with CASE WHEN + GROUP BY).&lt;br&gt;
&lt;strong&gt;UNPIVOT&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
rotates columns into rows (opposite of PIVOT).&lt;br&gt;
&lt;strong&gt;JSON_EXTRACT() **&lt;br&gt;
 pulls a value out of a JSON column by path.&lt;br&gt;
**EXPLAIN&lt;/strong&gt; &lt;br&gt;
shows the database's query execution plan, used to analyze/optimize performance.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Basic of SQL</title>
      <dc:creator>Abinesh.R</dc:creator>
      <pubDate>Sun, 23 Aug 2026 06:04:27 +0000</pubDate>
      <link>https://dev.to/abineshrajendiran/basic-of-sql-592f</link>
      <guid>https://dev.to/abineshrajendiran/basic-of-sql-592f</guid>
      <description>&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%2F5uuflawgnwplaza3g8wn.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%2F5uuflawgnwplaza3g8wn.jpg" alt=" " width="706" height="1118"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>OOP (Object-Oriented Programming).</title>
      <dc:creator>Abinesh.R</dc:creator>
      <pubDate>Sun, 23 Aug 2026 04:55:34 +0000</pubDate>
      <link>https://dev.to/abineshrajendiran/oop-object-oriented-programming-1j1f</link>
      <guid>https://dev.to/abineshrajendiran/oop-object-oriented-programming-1j1f</guid>
      <description>&lt;p&gt;JAVA OOPS CONCEPTS&lt;br&gt;
│&lt;br&gt;
├── 1. Class&lt;br&gt;
├── 2. Object&lt;br&gt;
├── 3. Encapsulation&lt;br&gt;
├── 4. Inheritance&lt;br&gt;
├── 5. Polymorphism&lt;br&gt;
└── 6. Abstraction&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Class&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Blueprint for creating objects. Defines what data (fields) and behavior (methods) objects will have.&lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
class Student {&lt;br&gt;
    String name;&lt;br&gt;
    int age;&lt;br&gt;
    void study() { System.out.println(name + " is studying"); }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Object&lt;/strong&gt;&lt;br&gt;
    An actual instance created from the class, using new.&lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
Student s1 = new Student(); // object&lt;br&gt;
s1.name = "Abinesh";&lt;br&gt;
**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Encapsulation**
Hiding data using private, exposing it safely via getters/setters.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example&lt;br&gt;
class Account {&lt;br&gt;
    private double balance;&lt;br&gt;
    public double getBalance() { return balance; }&lt;br&gt;
    public void deposit(double amt) { balance += amt; }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Inheritance&lt;/strong&gt;&lt;br&gt;
  Child class reuses parent class's code via extends.&lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
class Animal {&lt;br&gt;
    void eat() { System.out.println("eating"); }&lt;br&gt;
}&lt;br&gt;
class Dog extends Animal {&lt;br&gt;
    void bark() { System.out.println("barking"); }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Polymorphism&lt;/strong&gt;&lt;br&gt;
   Same method name, different behavior.&lt;br&gt;
Overloading (compile-time) — same method, different parameters, same class.&lt;br&gt;
Overriding (runtime) — child class redefines parent's method.&lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
// Overloading&lt;br&gt;
void add(int a, int b) {}&lt;br&gt;
void add(int a, int b, int c) {}&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;6. Abstraction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hiding implementation details, showing only essential features. Done via abstract class or interface.&lt;/p&gt;

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

&lt;p&gt;abstract class Shape {&lt;br&gt;
    abstract void draw(); // no implementation&lt;br&gt;
}&lt;br&gt;
class Circle extends Shape {&lt;br&gt;
    void draw() { System.out.println("drawing circle"); }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;important oops concept **&lt;br&gt;
**1.Constructor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Special method that runs automatically when an object is created. Same name as class, no return type. Used to initialize values.&lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
class Student {&lt;br&gt;
    String name;&lt;br&gt;
    Student(String n) {   // constructor&lt;br&gt;
        name = n;&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
Student s1 = new Student("Abinesh"); // auto-called&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. this keyword&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Refers to the current object. Mainly used to fix naming conflicts between instance variables and parameters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;example&lt;/strong&gt;&lt;br&gt;
class Student {&lt;br&gt;
    String name;&lt;br&gt;
    Student(String name) {&lt;br&gt;
        this.name = name;  // this.name = instance var, name = parameter&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String name;
Student(String name) {
    this.name = name;  // this.name = instance var, name = parameter
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
&lt;strong&gt;5. Instance vs Static&lt;br&gt;
**&lt;br&gt;
Instance members belong to each object separately.&lt;br&gt;
Static members belong to the class itself — shared by all objects.&lt;br&gt;
**Example&lt;/strong&gt;&lt;br&gt;
class Counter {&lt;br&gt;
    int id;              // instance — different for each object&lt;br&gt;
    static int count = 0; // static — shared, one copy only&lt;br&gt;
    Counter() {&lt;br&gt;
        count++;&lt;br&gt;
        id = count;&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>basci of java</title>
      <dc:creator>Abinesh.R</dc:creator>
      <pubDate>Sun, 23 Aug 2026 04:22:17 +0000</pubDate>
      <link>https://dev.to/abineshrajendiran/basci-of-java-514n</link>
      <guid>https://dev.to/abineshrajendiran/basci-of-java-514n</guid>
      <description>&lt;p&gt;&lt;strong&gt;what is java?&lt;/strong&gt;&lt;br&gt;
Java is a highly popular, object-oriented programming language used to build mobile apps, web applications, and large enterprise systems.&lt;/p&gt;

&lt;p&gt;It follows the rule "Write Once, Run Anywhere" (WORA), meaning Java code can run on any computer that supports Java without being rewritten.&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%2Fyxqlbyzrqd5hxvtkk8ye.webp" 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%2Fyxqlbyzrqd5hxvtkk8ye.webp" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 The Development Tools (JDK vs JRE vs JVM)&lt;/strong&gt;&lt;br&gt;
Think of these three structural pieces as boxes packed inside each other.&lt;br&gt;
&lt;strong&gt;JVM:&lt;/strong&gt; &lt;br&gt;
The inner engine that executes the program bytes line-by-line.&lt;br&gt;
&lt;strong&gt;JRE (Java Runtime Environment):&lt;/strong&gt; &lt;br&gt;
The middle box containing the JVM engine plus standard libraries to help run the code.&lt;br&gt;
JDK (Java Development Kit):&lt;br&gt;
 The complete outer kit containing the JRE, compilers, and debuggers needed to build programs from scratch.&lt;/p&gt;

&lt;p&gt;🧱 &lt;strong&gt;Core Concepts of Java&lt;/strong&gt;&lt;br&gt;
To understand Java, you need to know how it runs and how it handles data.1. &lt;br&gt;
&lt;strong&gt;How Java RunsJVM (Java Virtual Machine)&lt;/strong&gt;: The engine that actually runs the Java code.&lt;br&gt;
&lt;strong&gt;JRE (Java Runtime Environment):&lt;/strong&gt; The toolbox that contains the JVM and packages your code.&lt;br&gt;
**JDK (Java Development Kit): **The full developer kit containing the JRE and tools to write code.&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%2F5auemu8ycvv8c90rl0sj.gif" 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%2F5auemu8ycvv8c90rl0sj.gif" alt=" " width="530" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Variables and Data Types&lt;/strong&gt;&lt;br&gt;
Variables hold data in memory. &lt;br&gt;
Java requires you to state the type of data first.&lt;br&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%2Fj6b6oy7dohsf78o7hyjc.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%2Fj6b6oy7dohsf78o7hyjc.jpg" alt=" " width="765" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;int: Holds whole numbers (e.g., int age = 25;).&lt;br&gt;
double: Holds decimal numbers (e.g., double price = 19.99;).&lt;br&gt;
char: Holds a single letter (e.g., char grade = 'A';).&lt;br&gt;
boolean: Holds true or false values (e.g., boolean isJavaFun = true;).&lt;br&gt;
String: Holds text (e.g., String name = "Developer";).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Control Flow (Decision Making)&lt;/strong&gt;&lt;br&gt;
Control flow structures let your program make decisions or repeat tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;if-else statements:&lt;/strong&gt; Run code only if a condition is true.&lt;br&gt;
&lt;strong&gt;for and while loops:&lt;/strong&gt; &lt;br&gt;
Repeat code blocks multiple times.&lt;br&gt;
💻 Your First Java Program Here is the traditional "Hello World" program in Java.&lt;br&gt;
 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;    System.out.println("Hello, World!");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
&lt;strong&gt;Object-Oriented Programming (OOP)&lt;/strong&gt;&lt;br&gt;
Java organizes code into "Objects" based on real-world things.&lt;br&gt;
 &lt;strong&gt;OOP relies on four main pillars:&lt;/strong&gt;&lt;br&gt;
Class: A blueprint or template for creating objects (e.g., a "Car" blueprint).&lt;br&gt;
Object: An instance of a class (e.g., a specific "Red Tesla" built from the blueprint).&lt;br&gt;
Inheritance: Letting a new class adopt properties of an existing class.&lt;br&gt;
Polymorphism: Allowing different objects to respond to the same action in their own way.&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%2Fyzyb38yc6rmmkmctn7wm.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%2Fyzyb38yc6rmmkmctn7wm.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

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