<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SHESHAREDDY on Medium]]></title>
        <description><![CDATA[Stories by SHESHAREDDY on Medium]]></description>
        <link>https://medium.com/@sheshareddyvi?source=rss-924e08df1d5e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bQW16TSQ6Y_vnRtM49Flkg.jpeg</url>
            <title>Stories by SHESHAREDDY on Medium</title>
            <link>https://medium.com/@sheshareddyvi?source=rss-924e08df1d5e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:44:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sheshareddyvi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HTTP Status Codes]]></title>
            <link>https://medium.com/@sheshareddyvi/http-status-codes-49e5d162168c?source=rss-924e08df1d5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/49e5d162168c</guid>
            <category><![CDATA[http-status-code]]></category>
            <dc:creator><![CDATA[SHESHAREDDY]]></dc:creator>
            <pubDate>Thu, 20 Mar 2025 13:32:34 GMT</pubDate>
            <atom:updated>2025-03-20T13:32:34.971Z</atom:updated>
            <content:encoded><![CDATA[<p>Successful :</p><pre>200 OK<br>201 created<br>204 No Content</pre><p>Redirection :</p><pre>301 moved permanently<br>302 Found (temporarily)</pre><p>Client Error :</p><pre>400 Bad Request<br>401 Unauthorized<br>403 Forbidden<br>404 Not Found</pre><p>Server Error :</p><pre>500 Internal Server Error<br>501 Not Implemented<br>502 Bad Gateway<br>503 Service Unavaialble<br>504 Gateway TimeOut</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49e5d162168c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Javascript instructions ( Strict, Hoisting)]]></title>
            <link>https://medium.com/@sheshareddyvi/javascript-instructions-46ebb6c957a5?source=rss-924e08df1d5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/46ebb6c957a5</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[SHESHAREDDY]]></dc:creator>
            <pubDate>Fri, 14 Mar 2025 14:56:05 GMT</pubDate>
            <atom:updated>2025-03-14T15:37:13.346Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“use strict”<br></strong><em>The </em><em>&quot;use strict&quot;; directive in JavaScript helps catch common coding mistakes and enforces a stricter set of rules, preventing the use of undeclared variables and other bad practices.</em></p><p>Without “use strict”, JavaScript allows undeclared variables:</p><pre><br>x = 10; // No error (in non-strict mode)<br>console.log(x); // Output: 10<br><br></pre><p>With &quot;use strict&quot;, an error is thrown:</p><pre>&quot;use strict&quot;;<br>x = 10; // ❌ ReferenceError: x is not defined<br>console.log(x);</pre><p><strong>Hoisting<br><em>Hoisting</em></strong><em> is JavaScript’s default behavior of moving variable and function </em><strong><em>declarations</em></strong><em> to the top of their scope </em><strong><em>before code execution</em></strong><em>. This means you can use a function or variable before declaring it.</em></p><p>Hoisting on <strong>var, let, const :</strong></p><pre>// Hoisting with var (Variables)<br><br><br>// When you declare a variable using var, JavaScript hoists the declaration but not its initialization.<br>console.log(x); // ✅ Output: undefined (hoisted, but not assigned)<br>var x = 10;<br>console.log(x); // ✅ Output: 10<br><br><br>// Internally, JavaScript treats it like this:<br>var x;  // Declaration is hoisted<br>console.log(x); // undefined<br>x = 10; // Initialization happens here<br>console.log(x); // 10<br><br>//Hoisting with let and const<br><br>/* Unlike var, let and const are also hoisted, but they are not initialized.<br> Accessing them before declaration results in a ReferenceError. */<br><br>console.log(y); // ❌ ReferenceError: Cannot access &#39;y&#39; before initialization<br>let y = 20;<br>console.log(y); // ✅ Output: 20<br><br>🔹 Explanation:<br><br>let and const exist in a &quot;Temporal Dead Zone&quot; until they are initialized.<br>Accessing them before declaration results in an error.</pre><blockquote><strong><em>Hoisting on functions :</em> </strong><br><em>Function declarations are fully hoisted, meaning you can call them before defining them.</em></blockquote><pre>sayHello(); // ✅ Works! Output: &quot;Hello, World!&quot;<br><br>function sayHello() {<br>    console.log(&quot;Hello, World!&quot;);<br>}<br><br>// Function Expressions are NOT Hoisted<br><br>greet(); // ❌ TypeError: greet is not a function<br>var greet = function() {<br>    console.log(&quot;Hi!&quot;);<br>};</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46ebb6c957a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Javascript keywords]]></title>
            <link>https://medium.com/@sheshareddyvi/javascript-keywords-f85996df9cf0?source=rss-924e08df1d5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f85996df9cf0</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[SHESHAREDDY]]></dc:creator>
            <pubDate>Fri, 14 Mar 2025 11:32:41 GMT</pubDate>
            <atom:updated>2025-03-14T12:00:36.682Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>defer</strong>: <em>scripts annotated with defer will execute after body parsing or all HTML elements are parsed.<br>If multiple scripts were present with defer keywords, those would execute using the top-to-bottom approach</em>.<br><em>non </em><strong><em>defer</em></strong><em> scripts will execute first as a top-down approach manner.</em></p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Defer Example&lt;/title&gt;<br>    &lt;script src=&quot;script.js&quot; defer&gt;&lt;/script&gt;<br>    &lt;script src=&quot;script1.js&quot; defer&gt;&lt;/script&gt;<br>    &lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt; // this will execute first<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;h1&gt;Hello, World!&lt;/h1&gt;<br>    &lt;p id=&quot;demo&quot;&gt;JavaScript will modify this text.&lt;/p&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>// script.js<br>document.addEventListener(&quot;DOMContentLoaded&quot;, () =&gt; {<br>    console.log(&quot;DOM is fully loaded and parsed.&quot;);<br>    <br>    // Accessing an element without issues<br>    document.getElementById(&quot;demo&quot;).textContent = &quot;Text changed by JavaScript!&quot;;<br>});<br><br>// scripts1.js<br>document.addEventListener(&quot;DOMContentLoaded&quot;, () =&gt; {<br>    console.log(&quot;DOM is fully loaded and parsed.&quot;);<br>    <br>    // Accessing an element without issues<br>    document.getElementById(&quot;demo&quot;).textContent = &quot;Text changed by Script2!&quot;;<br>});</pre><p><strong>typeof</strong>: it will return the data type of a particular variable</p><pre>var x;<br>console.log( typeof x) // it will return undefined<br>x = 10;<br>console.log( typeof x) // it will return number<br>x = null;<br>console.log( typeof x) // it will return object<br></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f85996df9cf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Create Immutable Class in Java]]></title>
            <link>https://medium.com/@sheshareddyvi/how-to-create-immutable-class-in-java-fcaae004d355?source=rss-924e08df1d5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcaae004d355</guid>
            <category><![CDATA[advanced-java-feature]]></category>
            <category><![CDATA[codeing-practice]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[SHESHAREDDY]]></dc:creator>
            <pubDate>Mon, 10 Mar 2025 13:19:02 GMT</pubDate>
            <atom:updated>2025-03-10T13:19:02.750Z</atom:updated>
            <content:encoded><![CDATA[<p>Each class will have fields (variables) &amp; methods (operations).</p><pre>import java.util.HashMap;<br>import java.util.Map;<br><br>public final class ImmutablePerson {<br>    private final String name;<br>    private final int age;<br>    private final Map&lt;String, String&gt; address; // Mutable object (needs a deep copy)<br><br>    // Constructor to initialize values<br>    public ImmutablePerson(String name, int age, Map&lt;String, String&gt; address) {<br>        this.name = name;<br>        this.age = age;<br>        this.address = new HashMap&lt;&gt;(address); // Deep copy to prevent modification<br>    }<br><br>    // Getter methods (no setters)<br>    public String getName() {<br>        return name;<br>    }<br><br>    public int getAge() {<br>        return age;<br>    }<br><br>    // Return a copy of the mutable object to prevent modification<br>    public Map&lt;String, String&gt; getAddress() {<br>        return new HashMap&lt;&gt;(address);<br>    }<br><br>    // toString method for better readability<br>    @Override<br>    public String toString() {<br>        return &quot;ImmutablePerson{name=&#39;&quot; + name + &quot;&#39;, age=&quot; + age + &quot;, address=&quot; + address + &quot;}&quot;;<br>    }<br>}</pre><p>On Above code <strong>name, age, address</strong> ( class variables)</p><p>getName(), getAge(), getAddress() (class methods or actions)</p><pre>/* final keyword will be enable this class won&#39;t be extends by any other classes<br>   by doing this no other class will overRide or access the behaviour of ImmutablePerson class data and actions<br>*/<br>final class ImmutablePerson <br>/*<br>  by adding private to a field or varible that will become invisable in other class to access<br>  ImmutablePerson ob = new ImmutablePerson()<br>  ob.name // this will throw error.<br>  <br>  final is keyword once we initialized field data that won&#39;t be change further<br>*/<br>private final String name;<br><br>/* <br>  must have public constuctor so that we will initialize class fields when Object is creating.<br>  once fields initialized in constructor we can&#39;t modify those fileds.<br>*/<br>// Constructor to initialize values<br>    public ImmutablePerson(String name, int age, Map&lt;String, String&gt; address) {<br>        this.name = name;<br>        this.age = age;<br>        this.address = new HashMap&lt;&gt;(address); // Deep copy to prevent modification<br>    }<br>// don&#39;t create setter methods to initialize respective fields all data should initialize in constructor only<br><br>/* a class may contain mutable Objects ( values we can change) so to avaoid data <br>change on those objects send deep copy of that Object.*/<br>// Return a copy of the mutable object to prevent modification<br>    public Map&lt;String, String&gt; getAddress() {<br>        return new HashMap&lt;&gt;(address);<br>    }</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcaae004d355" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>