<?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: Sonali Gupta</title>
    <description>The latest articles on DEV Community by Sonali Gupta (@sona_08).</description>
    <link>https://dev.to/sona_08</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%2F2519143%2F55f15286-1539-4455-a1c2-f4778d42e04e.jpg</url>
      <title>DEV Community: Sonali Gupta</title>
      <link>https://dev.to/sona_08</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sona_08"/>
    <language>en</language>
    <item>
      <title>Understanding Backend (part 1)</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Tue, 01 Sep 2026 15:37:42 +0000</pubDate>
      <link>https://dev.to/sona_08/understanding-backend-part-1-31hd</link>
      <guid>https://dev.to/sona_08/understanding-backend-part-1-31hd</guid>
      <description>&lt;p&gt;Before understanding backend development in depth, we first need to understand how a backend actually works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) how does a Backend actually works?&lt;/strong&gt;🖥️&lt;br&gt;
-&amp;gt; When a frontend(client) sends a request, it reaches the backend server through an Ip address and port.&lt;/p&gt;

&lt;p&gt;The backend then identifies the appropriate endpoint/route for that request and processes it according to the business logic.&lt;/p&gt;

&lt;p&gt;If required communicate with the database to read or store data.&lt;/p&gt;

&lt;p&gt;Finally, the backend sends a response to the frontend, often in JSON format and the frontend uses that response to display the result to the user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) How exactly happens when we enter a URL in the browser?&lt;/strong&gt;🌐&lt;br&gt;
-&amp;gt; suppose we entered : &lt;a href="https://example.com/products" rel="noopener noreferrer"&gt;https://example.com/products&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;https :&lt;/strong&gt; protocol(tells browser I want to communicate using https)&lt;br&gt;
&lt;strong&gt;example.com :&lt;/strong&gt; Domain name (which humans can understand)&lt;br&gt;
&lt;strong&gt;/products :&lt;/strong&gt; This tells server which resource you are requesting.&lt;/p&gt;

&lt;p&gt;But computer communicate over networks using Ip addresses, not human- friendly domain name. Here DNS comes in.....🕺&lt;/p&gt;

&lt;p&gt;DNS (Domain name system) is a phonebook of the internet it converts human-readable domain name (example.com ) to Ip address which computers can understands.&lt;/p&gt;

&lt;p&gt;Now how the browser reaches to the server? here TCP walks in...🤷‍♀️&lt;/p&gt;

&lt;p&gt;TCP establish a connection between client(browser) and server&lt;/p&gt;

&lt;p&gt;But but...we are using https (the communication needs to be protected right) so TLS comes in &lt;/p&gt;

&lt;p&gt;TLS provides : Encryption, server authentication and data integrity&lt;/p&gt;

&lt;p&gt;Now browser sends an http request telling the server what it wants &lt;br&gt;
for example : Get/products&lt;/p&gt;

&lt;p&gt;After that, request reaches to server where backend identifies a appropriate endpoint and processes the request.&lt;/p&gt;

&lt;p&gt;If request needs data, the backend communicates with database to read or modify it.&lt;/p&gt;

&lt;p&gt;The backend sends HTTP response back to the browser. The response may contain HTML, JSON, images, or other data depending on the request.&lt;/p&gt;

&lt;p&gt;Finally, the browser processes the response and displays the webpage or uses the returned data.&lt;/p&gt;

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

&lt;p&gt;URL → DNS → IP → Connection → HTTP Request → Backend → Database → Response → Browser&lt;/p&gt;

</description>
      <category>backend</category>
      <category>serverless</category>
      <category>programming</category>
    </item>
    <item>
      <title>Arraylist in java recap 🎏</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Sat, 22 Aug 2026 16:04:02 +0000</pubDate>
      <link>https://dev.to/sona_08/arraylist-in-java-recap-11po</link>
      <guid>https://dev.to/sona_08/arraylist-in-java-recap-11po</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%2Fofu18kfru7d7t2r9zv3j.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%2Fofu18kfru7d7t2r9zv3j.png" alt=" " width="416" height="680"&gt;&lt;/a&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%2Fjxpci0ggt33wwz7suww0.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%2Fjxpci0ggt33wwz7suww0.png" alt=" " width="408" height="672"&gt;&lt;/a&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%2F5537ijczha90efkh2apu.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%2F5537ijczha90efkh2apu.png" alt=" " width="408" height="676"&gt;&lt;/a&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%2F402192fa4u3jem5r02y3.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%2F402192fa4u3jem5r02y3.png" alt=" " width="408" height="620"&gt;&lt;/a&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%2Frlxr6nteutka5b4zpkx4.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%2Frlxr6nteutka5b4zpkx4.png" alt=" " width="416" height="624"&gt;&lt;/a&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%2F7am69jxlyc3sxoa8g1s1.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%2F7am69jxlyc3sxoa8g1s1.png" alt=" " width="404" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>How JVM handles exception</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Fri, 12 Jun 2026 10:28:34 +0000</pubDate>
      <link>https://dev.to/sona_08/how-jvm-handles-exception-2l1i</link>
      <guid>https://dev.to/sona_08/how-jvm-handles-exception-2l1i</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.amazonaws.com%2Fuploads%2Farticles%2Ftqcf07tad6zrrjtsr5u4.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%2Ftqcf07tad6zrrjtsr5u4.png" alt=" " width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>backenddevelopment</category>
      <category>software</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>@RequestParam vs @RequestBody</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Wed, 22 Apr 2026 03:58:41 +0000</pubDate>
      <link>https://dev.to/sona_08/requestparam-vs-requestbody-3mbj</link>
      <guid>https://dev.to/sona_08/requestparam-vs-requestbody-3mbj</guid>
      <description>&lt;p&gt;&lt;strong&gt;1) @RequestParam&lt;/strong&gt;&lt;br&gt;
Extracts small values from the URL (query string).&lt;/p&gt;

&lt;p&gt;Eg: &lt;/p&gt;

&lt;p&gt;@GetMapping("/search")&lt;br&gt;
public String searchUser(@RequestParam String name) {&lt;br&gt;
    return "Searching for " + name;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Call: *&lt;/em&gt;&lt;br&gt;
GET /search?name=sonali&lt;/p&gt;

&lt;p&gt;name=sonali → comes from URL&lt;br&gt;
No JSON involved&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use?&lt;/strong&gt;&lt;br&gt;
Use @RequestParam when:&lt;br&gt;
• Filtering / searching&lt;br&gt;
• Pagination (page=1&amp;amp;size=10)&lt;br&gt;
• Sorting (sort=name)&lt;br&gt;
• Simple values only&lt;/p&gt;

&lt;p&gt;If you're sending multiple fields, @RequestParam becomes &lt;strong&gt;messy:&lt;/strong&gt;&lt;br&gt;
/users?name=sonali&amp;amp;email=&lt;a href="mailto:a@gmail.com"&gt;a@gmail.com&lt;/a&gt;&amp;amp;age=21&lt;br&gt;
That’s a bad API design beyond small cases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2)@RequestBody&lt;/strong&gt;&lt;br&gt;
Converts JSON request body → Java object.&lt;br&gt;
@PostMapping("/users")&lt;br&gt;
public User createUser(@RequestBody User user) {&lt;br&gt;
    return user;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Call: POST /users&lt;br&gt;
Body:&lt;br&gt;
{&lt;br&gt;
  "name": "Sonali",&lt;br&gt;
  "email": "&lt;a href="mailto:sonali@gmail.com"&gt;sonali@gmail.com&lt;/a&gt;"&lt;br&gt;
}&lt;br&gt;
JSON → mapped to User object&lt;br&gt;
Happens automatically via Spring&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use @RequestBody when:&lt;/p&gt;

&lt;p&gt;Creating data (POST)&lt;br&gt;
Updating data (PUT)&lt;br&gt;
Sending structured data (objects)&lt;/p&gt;

&lt;p&gt;Combine both (real-world usage)&lt;br&gt;
@PostMapping("/users")&lt;br&gt;
public String createUser(&lt;br&gt;
        @RequestParam String role,&lt;br&gt;
        @RequestBody User user) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return user.getName() + " is " + role;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Call:POST /users?role=admin&lt;br&gt;
Body:&lt;br&gt;
{&lt;br&gt;
  "name": "Sonali",&lt;br&gt;
  "email": "&lt;a href="mailto:a@gmail.com"&gt;a@gmail.com&lt;/a&gt;"&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>api</category>
      <category>backend</category>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>chapter 2 : structure of JWT</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Wed, 01 Apr 2026 08:25:16 +0000</pubDate>
      <link>https://dev.to/sona_08/chapter-2-structure-of-jwt-4bg3</link>
      <guid>https://dev.to/sona_08/chapter-2-structure-of-jwt-4bg3</guid>
      <description>&lt;p&gt;Every JWT has 3 parts: Header, payload and signature&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%2Fve2nq9e2vo60sa4v15vr.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%2Fve2nq9e2vo60sa4v15vr.png" alt=" " width="536" height="344"&gt;&lt;/a&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.amazonaws.com%2Fuploads%2Farticles%2F7ds1xkl74cg8xgrur63t.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%2F7ds1xkl74cg8xgrur63t.png" alt=" " width="580" height="427"&gt;&lt;/a&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.amazonaws.com%2Fuploads%2Farticles%2Ffaan7k8yi27zxz9pkx63.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%2Ffaan7k8yi27zxz9pkx63.png" alt=" " width="476" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example :&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%2Fffo7q2oh5bm5ruq56slq.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%2Fffo7q2oh5bm5ruq56slq.png" alt=" " width="621" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Common mistake&lt;/p&gt;

&lt;p&gt;❌ “JWT is encrypted”&lt;br&gt;
→ Wrong&lt;/p&gt;

&lt;p&gt;✅ JWT is encoded + signed, not encrypted (by default)&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>security</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>JWT (JSON Web Token)</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Sun, 29 Mar 2026 14:50:23 +0000</pubDate>
      <link>https://dev.to/sona_08/jwt-json-web-token-4hh4</link>
      <guid>https://dev.to/sona_08/jwt-json-web-token-4hh4</guid>
      <description>&lt;p&gt;lets divide into chapter :&lt;br&gt;
chapter 1 : What JWT actually is?&lt;br&gt;
chapter 2 : structure of JWT&lt;br&gt;
chapter 3 : JWT Flow&lt;br&gt;
chapter 4 : creating JWT in SpringBoot&lt;br&gt;
chapter 5 : JWT + RBAC Integration&lt;br&gt;
chapter 6 : Common mistakes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CHAPTER 1 — What JWT actually is?&lt;/strong&gt;&lt;br&gt;
JSON Web Token is a signed token used to verify user identity without storing session data on the server.&lt;/p&gt;

&lt;p&gt;Strip it down&lt;br&gt;
JWT is just:&lt;br&gt;
&lt;strong&gt;A string&lt;br&gt;
That contains user data&lt;br&gt;
And is digitally signed&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.amazonaws.com%2Fuploads%2Farticles%2Fghdlxvv7satdr1taesv7.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%2Fghdlxvv7satdr1taesv7.png" alt=" " width="681" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What problem it solves&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Without JWT: Server stores sessions → memory heavy&lt;/p&gt;

&lt;p&gt;With JWT: Client stores token → server stays stateless&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analogy (lock this in your head)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JWT = college ID card&lt;br&gt;
You carry it&lt;br&gt;
College doesn’t check database every second&lt;br&gt;
They just verify ID&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Key idea (don’t forget)&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JWT does NOT store user&lt;br&gt;
JWT carries user info&lt;/p&gt;

&lt;p&gt;stay updated for chapter 2&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering java 8 (Lambda expression &amp; functional interface) - day 2</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Sun, 01 Feb 2026 15:55:26 +0000</pubDate>
      <link>https://dev.to/sona_08/mastering-java-8-day-1-27k7</link>
      <guid>https://dev.to/sona_08/mastering-java-8-day-1-27k7</guid>
      <description>&lt;p&gt;As a developer, I'm always looking for ways to write cleaner, more efficient, and more readable code. One of the most significant leaps in Java's evolution towards this goal came with Java 8: Lambda Expressions and Functional Interfaces.&lt;/p&gt;

&lt;p&gt;Initially, these concepts can feel a bit abstract. But after diving deep, I've realized they're powerful tools that simplify common programming patterns. Let me walk you through what I've learned, breaking down the core anatomy and the most essential types.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Lambda Expression?&lt;/strong&gt; The "Anonymous Function"&lt;br&gt;
At its heart, a Lambda Expression is a concise way to represent an anonymous function – a function without a name. Think of it as a small, self-contained piece of code that you can pass around and execute. Its primary goal is to reduce boilerplate code and allow you to treat "code as data."&lt;/p&gt;

&lt;p&gt;The basic anatomy of a lambda expression is surprisingly simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(parameters) -&amp;gt; { body of the logic }&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's break down each part:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(parameters):&lt;/strong&gt; The input arguments for your code.&lt;/p&gt;

&lt;p&gt;If there's only one parameter, you can omit the parentheses (e.g., s -&amp;gt; ...).&lt;/p&gt;

&lt;p&gt;If there are no parameters, you use empty parentheses (e.g., () -&amp;gt; ...).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt; (The Arrow Token):&lt;/strong&gt; This is the crucial separator. It connects the input parameters to the logic you want to execute. It literally means "goes to" or "executes."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;{ body of the logic }:&lt;/strong&gt; This is where your code lives.&lt;/p&gt;

&lt;p&gt;If the body consists of a single expression, you can omit the curly braces {} and the return keyword (the result is implicitly returned).&lt;/p&gt;

&lt;p&gt;If the body contains multiple statements, you must use curly braces and explicitly return a value if the lambda is expected to produce one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Old Way vs. Lambda Way&lt;/strong&gt;&lt;br&gt;
To truly appreciate lambdas, let's see them in action. Imagine you want to add an action listener to a button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before Java 8 (Anonymous Inner Class):&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.amazonaws.com%2Fuploads%2Farticles%2F8hsf5n47gtehc6erlana.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%2F8hsf5n47gtehc6erlana.png" alt=" " width="645" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Lambda Expression (Clean and Concise):&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.amazonaws.com%2Fuploads%2Farticles%2Feyezcsi09dj2zqqfhkvy.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%2Feyezcsi09dj2zqqfhkvy.png" alt=" " width="762" height="124"&gt;&lt;/a&gt;&lt;br&gt;
Look at that difference! The lambda expression drastically cuts down on the ceremonial code, focusing purely on the action we want to perform.&lt;/p&gt;

&lt;p&gt;The "Home" for Lambdas: &lt;strong&gt;Functional Interfaces&lt;/strong&gt;&lt;br&gt;
Lambdas don't just float freely; they need a "home." This home is a Functional Interface.&lt;/p&gt;

&lt;p&gt;A Functional Interface is any interface that has exactly one abstract method. It can have multiple default or static methods, but only one that needs to be implemented.&lt;/p&gt;

&lt;p&gt;Common examples built into Java include Runnable, Callable, and Comparator. To make our lives easier, Java 8 also introduced the java.util.function package, which provides several ready-to-use functional interfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Big Four:&lt;/strong&gt; Essential Functional Interfaces&lt;br&gt;
These four interfaces from java.util.function are your daily drivers when working with lambdas:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Predicate (The Tester)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt; Takes one input of type T and returns a boolean result. Ideal for filtering or testing conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstract Method:&lt;/strong&gt; boolean test(T t)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Checking if a number is even.&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%2Fixpehcvo6ryuztuuna7j.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%2Fixpehcvo6ryuztuuna7j.png" alt=" " width="627" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.Function (The Transformer)&lt;/strong&gt;&lt;br&gt;
Purpose: Takes one input of type T and returns one result of type R. Great for mapping one type to another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstract Method:&lt;/strong&gt; R apply(T t)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Converting a String to its length (an Integer).&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%2Fq7jie9zpe09mdtn54pr1.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%2Fq7jie9zpe09mdtn54pr1.png" alt=" " width="621" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. BiFunction (The Combiner)&lt;/strong&gt;&lt;br&gt;
Purpose: Takes two inputs (of types T and U) and returns one result of type R. Useful for combining values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstract Method:&lt;/strong&gt; R apply(T t, U u)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Adding two integers.&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%2F0t4w1vw6kx2vyttzho1f.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%2F0t4w1vw6kx2vyttzho1f.png" alt=" " width="800" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Consumer (The Doer)&lt;/strong&gt;&lt;br&gt;
Purpose: Takes one input of type T but returns no result (void). It "consumes" the input to perform an action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstract Method:&lt;/strong&gt; void accept(T t)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Printing a message to the console.&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%2Fgv40humsdkbpxu370jra.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%2Fgv40humsdkbpxu370jra.png" alt=" " width="800" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus: The Supplier (The Provider)&lt;/strong&gt;&lt;br&gt;
While not one of the "Big Four," the Supplier is equally important:&lt;/p&gt;

&lt;p&gt;Purpose: Takes no inputs and returns one result of type T. It "supplies" a value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstract Method:&lt;/strong&gt; T get()&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Generating a random number.&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%2F7sagrbtj4er0uzznyge6.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%2F7sagrbtj4er0uzznyge6.png" alt=" " width="756" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Bother with Lambdas?&lt;/strong&gt;&lt;br&gt;
The benefits are clear:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concise Code:&lt;/strong&gt; Less boilerplate, more focus on business logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Readability:&lt;/strong&gt; Often reads more like plain English, especially with Streams.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functional Programming:&lt;/strong&gt; Enables a more functional style of programming in Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stream API Integration:&lt;/strong&gt; Lambdas are the backbone of the powerful Java Stream API, allowing for elegant data processing.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Mastering java 8( Stream API) - day 1</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Mon, 15 Dec 2025 08:39:03 +0000</pubDate>
      <link>https://dev.to/sona_08/java-8-stream-api-1k73</link>
      <guid>https://dev.to/sona_08/java-8-stream-api-1k73</guid>
      <description>&lt;p&gt;Java 8 introduced stream API which allows developer to process collections of data in functional and declarative way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : unlike collections, a stream does not store the data it only      process it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Features of Stream API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.Declarative : Write concise and readable code using functional style.&lt;br&gt;
2.Lazy Evaluation : Operations are executed only when &lt;br&gt;
needed (terminal operation).&lt;br&gt;
3.Parallel Execution : Supports parallel streams to leverage multi-core processors.&lt;br&gt;
4.Reusable Operations : Supports chaining of operations like map(), filter(), sorted().&lt;br&gt;
5.No Storage : Streams don’t store data; they only process it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.How Stream works internally?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.Create a stream : From collections, arrays or static methods.&lt;br&gt;
2.Apply intermediate operations : Transform data (eg.filter(), map(), sorter() ).&lt;br&gt;
3.Apply Terminal Operation : Produce a result (e.g., forEach(), collect(), reduce()).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Creation of streams&lt;/strong&gt;&lt;br&gt;
Streams creation can be done in multiple ways:&lt;/p&gt;

&lt;p&gt;1.From a Collection : Create a stream directly from a List, Set or any Collection using stream()&lt;br&gt;
2.From an Array : Use Arrays.stream(array) to convert an array into a stream.&lt;br&gt;
3.Using Stream.of() : Create a stream from a fixed set of values using Stream.of()&lt;br&gt;
4.Infinite Stream : Generate an unbounded sequence using Stream.iterate() or Stream.generate()&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%2Fienjxg6bes8kgafluw07.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%2Fienjxg6bes8kgafluw07.png" alt=" " width="800" height="586"&gt;&lt;/a&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.amazonaws.com%2Fuploads%2Farticles%2Fk3zxiyxj5nvzrh2p3b5c.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%2Fk3zxiyxj5nvzrh2p3b5c.png" alt=" " width="422" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intermediate operations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Intermediate operations transform a stream into another stream. Some common intermediate operations include:&lt;/p&gt;

&lt;p&gt;filter(): Filters elements based on a specified condition.&lt;br&gt;
map(): Transforms each element in a stream to another value.&lt;br&gt;
Sorted(): Sorts the elements of a stream.&lt;br&gt;
Distinct(): Remove duplicates.&lt;br&gt;
Skip(): Skip first n elements.&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%2F7poyx5ppn5bxpp89p7xb.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%2F7poyx5ppn5bxpp89p7xb.png" alt=" " width="800" height="395"&gt;&lt;/a&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.amazonaws.com%2Fuploads%2Farticles%2F3674bj6c3we6rsaksyuw.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%2F3674bj6c3we6rsaksyuw.png" alt=" " width="578" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of streams&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Sequential Stream&lt;/strong&gt;&lt;br&gt;
Processes elements one by one in a single thread.&lt;br&gt;
Created by default when you call stream().&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%2Fnm01nz02a638f49je75g.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%2Fnm01nz02a638f49je75g.png" alt=" " width="800" height="275"&gt;&lt;/a&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.amazonaws.com%2Fuploads%2Farticles%2Fmxjdtnxgizo0864ltzxi.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%2Fmxjdtnxgizo0864ltzxi.png" alt=" " width="392" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.Parallel Streams&lt;/strong&gt;&lt;br&gt;
Parallel Streams are the type of streams that can perform operations concurrently on multiple threads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.infinite Streams&lt;/strong&gt;&lt;br&gt;
Streams can also generate unbounded sequences. Use limit() to avoid infinite execution.&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%2Fma09xvyv0gr95a9q7toa.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%2Fma09xvyv0gr95a9q7toa.png" alt=" " width="594" height="281"&gt;&lt;/a&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.amazonaws.com%2Fuploads%2Farticles%2Fuamp9fena4m4w4sduxyi.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%2Fuamp9fena4m4w4sduxyi.png" alt=" " width="401" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>java</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>why there were a need of collection framework in java?</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Wed, 23 Jul 2025 19:40:48 +0000</pubDate>
      <link>https://dev.to/sona_08/why-there-were-a-need-of-collection-framework-in-java-18f9</link>
      <guid>https://dev.to/sona_08/why-there-were-a-need-of-collection-framework-in-java-18f9</guid>
      <description>&lt;p&gt;The Collection Framework, introduced in Java 1.2, is a unified architecture to store, manipulate, and process data.&lt;/p&gt;

&lt;p&gt;Before Java 1.2, Java had only arrays and some basic data structures like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;vector&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hashtable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;stack&lt;br&gt;
&lt;strong&gt;But they had limitations:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2F8vf45c0zxuc997o8srbm.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%2F8vf45c0zxuc997o8srbm.png" alt=" " width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;What is Java Collection Framework?&lt;/strong&gt;&lt;br&gt;
The Collection Framework, introduced in Java 1.2, is a unified architecture to store, manipulate, and process data.&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%2Fcidt4b89rwvg2rlaut96.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%2Fcidt4b89rwvg2rlaut96.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🧠 &lt;strong&gt;Example Comparison Without Collections (using array):&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.amazonaws.com%2Fuploads%2Farticles%2F7bni54jo3hccclobmcdx.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%2F7bni54jo3hccclobmcdx.png" alt=" " width="600" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Collections:&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.amazonaws.com%2Fuploads%2Farticles%2F83id8hadopxb02nd8u2j.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%2F83id8hadopxb02nd8u2j.png" alt=" " width="624" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎯 Summary&lt;/strong&gt;&lt;br&gt;
✅ The Java Collection Framework was created to make life easier by giving us powerful, reusable, flexible, and consistent tools for working with groups of objects.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>what is Hoisting in javascript</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Mon, 14 Jul 2025 08:56:31 +0000</pubDate>
      <link>https://dev.to/sona_08/what-is-hoisting-in-javascript-36m</link>
      <guid>https://dev.to/sona_08/what-is-hoisting-in-javascript-36m</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hoisting is not about physically moving code to the top , but rather about how javascript allocates memory for variables and functions during memory creation phase&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you can call function before its declaration in the code because entire function is available in code from start.&lt;/li&gt;
&lt;/ul&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%2Fk8bd1abd4wgu4ml64qrs.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%2Fk8bd1abd4wgu4ml64qrs.png" alt=" " width="427" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;But function expression can't be hoisted&lt;/li&gt;
&lt;/ul&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%2Fva6vafcdgsez24t429oe.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%2Fva6vafcdgsez24t429oe.png" alt=" " width="531" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;but trying to access variable before its declaration will result in "undefined"&lt;/li&gt;
&lt;/ul&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%2Fnr46rjeuars5b0gzkpjx.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%2Fnr46rjeuars5b0gzkpjx.png" alt=" " width="559" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;what javascript sees?&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.amazonaws.com%2Fuploads%2Farticles%2Ferh3g9wp3j565j8obv7j.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%2Ferh3g9wp3j565j8obv7j.png" alt=" " width="498" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q) why it gives us a impression that declarations are move to top of their scope but its actually not ?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;because only declaration is processed before any code is executed not a initialization.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>DECODING...java word by word</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Tue, 01 Jul 2025 18:26:10 +0000</pubDate>
      <link>https://dev.to/sona_08/decodingjava-word-by-word-3jff</link>
      <guid>https://dev.to/sona_08/decodingjava-word-by-word-3jff</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.amazonaws.com%2Fuploads%2Farticles%2F5o3t1xij56y4micj8wfb.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%2F5o3t1xij56y4micj8wfb.png" alt=" " width="592" height="124"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔹 System&lt;/strong&gt;&lt;br&gt;
A built-in class in Java that belongs to the package java.lang.&lt;/p&gt;

&lt;p&gt;It contains useful tools for interacting with the system — like input/output, error handling, etc.&lt;/p&gt;

&lt;p&gt;It has a special member called out that helps send output to the screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔹 out&lt;/strong&gt;&lt;br&gt;
A static object inside the System class.&lt;/p&gt;

&lt;p&gt;It represents the standard output stream — usually your terminal or console.&lt;/p&gt;

&lt;p&gt;It is of type PrintStream.&lt;/p&gt;

&lt;p&gt;💡 Imagine out as Java’s speaker 📢 — whatever you send here gets spoken (printed) to your screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔹 println&lt;/strong&gt;&lt;br&gt;
A method of PrintStream class (which out is an object of).&lt;/p&gt;

&lt;p&gt;println stands for print line.&lt;/p&gt;

&lt;p&gt;It prints the message and then moves to the next line (like pressing Enter).&lt;/p&gt;

&lt;p&gt;💡 If print() is like typing on the same line, println() presses Enter after printing.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>iconic lines...of java</title>
      <dc:creator>Sonali Gupta</dc:creator>
      <pubDate>Tue, 01 Jul 2025 18:18:53 +0000</pubDate>
      <link>https://dev.to/sona_08/iconic-lines-29ik</link>
      <guid>https://dev.to/sona_08/iconic-lines-29ik</guid>
      <description>&lt;p&gt;✔️ public – open to everyone (even JVM)&lt;br&gt;&lt;br&gt;
✔️ static – can run without creating an object&lt;br&gt;&lt;br&gt;
✔️ void – doesn’t return anything&lt;br&gt;&lt;br&gt;
✔️ main – starting point of every Java program&lt;br&gt;&lt;br&gt;
✔️ String[] args – takes command-line input if passed&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔹 Can we remove String[] args from main in Java?&lt;/strong&gt;&lt;br&gt;
Technically — NO, you should not remove it.&lt;br&gt;
The correct signature that the JVM looks for is:&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%2Fzfb1s4oofs3hl45tqcq2.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%2Fzfb1s4oofs3hl45tqcq2.png" alt=" " width="745" height="118"&gt;&lt;/a&gt;&lt;br&gt;
This is the standard method signature that the JVM recognizes to start your Java program.&lt;/p&gt;

&lt;p&gt;❌ If you remove it like this:&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%2Fgpfgojng8npiq61eydm3.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%2Fgpfgojng8npiq61eydm3.png" alt=" " width="743" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧨 What will happen?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ It will compile successfully (no syntax error).&lt;/p&gt;

&lt;p&gt;❌ But when you run it using:&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%2Ff6lg355mj1cvmchll73g.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%2Ff6lg355mj1cvmchll73g.png" alt=" " width="543" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Why does JVM expect String[] args?&lt;br&gt;
JVM needs to pass command-line arguments, even if you don’t use them.&lt;/p&gt;

&lt;p&gt;That’s why the method must be defined with that exact signature.&lt;/p&gt;

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