<?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: Amit Mishra</title>
    <description>The latest articles on DEV Community by Amit Mishra (@amymishra11).</description>
    <link>https://dev.to/amymishra11</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F423569%2Fc8c2024c-35b7-4c9d-a167-9a9fd3d87db3.jpg</url>
      <title>DEV Community: Amit Mishra</title>
      <link>https://dev.to/amymishra11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amymishra11"/>
    <language>en</language>
    <item>
      <title>Why Java's Automatic Memory Management Makes it a Powerful Language: Everything you need to know</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Sat, 14 Jan 2023 17:58:08 +0000</pubDate>
      <link>https://dev.to/amymishra11/why-javas-automatic-memory-management-makes-it-a-powerful-language-everything-you-need-to-know-2kc7</link>
      <guid>https://dev.to/amymishra11/why-javas-automatic-memory-management-makes-it-a-powerful-language-everything-you-need-to-know-2kc7</guid>
      <description>&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2020/07/jdk-jre-jvm.html" rel="noopener noreferrer"&gt;Java's automatic memory management&lt;/a&gt;, also known as garbage collection, is a powerful feature that makes it easy for developers to write code without worrying about freeing up memory. In many other programming languages, developers are responsible for manually allocating and freeing memory, which can lead to errors and memory leaks if not done properly. With Java's automatic memory management, the &lt;a href="https://www.javaoneworld.com/2020/07/jdk-jre-jvm.html" rel="noopener noreferrer"&gt;Java Virtual Machine (JVM)&lt;/a&gt; takes care of allocating and freeing memory, which greatly simplifies the process of writing code.&lt;/p&gt;

&lt;p&gt;One of the key benefits of automatic memory management is that it helps to prevent memory leaks, which occur when a program holds onto a memory that is no longer needed. Memory leaks can cause a program to consume an increasing amount of memory over time, eventually leading to the program crashing or freezing. With automatic memory management, the JVM periodically checks for objects that are no longer in use and frees up the associated memory, helping to prevent memory leaks.&lt;/p&gt;

&lt;p&gt;Another benefit of automatic memory management is that it can improve the performance of a program. When a program manually manages memory, it can be time-consuming and resource-intensive to repeatedly allocate and free memory. With automatic memory management, the JVM can make more efficient use of memory and reduce the amount of time and resources required to manage memory.&lt;/p&gt;

&lt;p&gt;Java's automatic memory management also makes it easier to write concurrent code, because it eliminates the need to manually synchronize access to memory. This allows multiple threads to safely access the same memory without having to worry about conflicts.&lt;/p&gt;

&lt;p&gt;In conclusion, Java's automatic memory management is a powerful feature that simplifies the process of writing code, improves the performance and stability of a program, and makes it easier to write concurrent code. It helps developers focus on the logic and functionality of their program rather than worrying about memory management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Java's Automatic Memory Management works:&lt;/strong&gt;&lt;br&gt;
The JVM periodically checks for objects that are no longer in use and frees up the associated memory.&lt;/p&gt;

&lt;p&gt;The JVM uses a technique called "&lt;strong&gt;garbage collection&lt;/strong&gt;" to identify and remove objects that are no longer needed by a program. The JVM maintains a heap of memory, which is where objects are created and stored. When an object is no longer being used by a program, it becomes eligible for garbage collection.&lt;/p&gt;

&lt;p&gt;To identify eligible objects, the JVM uses a technique called "&lt;strong&gt;mark and sweep.&lt;/strong&gt;" The JVM first marks all objects that are currently in use by a program. It then sweeps through the heap and frees up any objects that are not marked.&lt;/p&gt;

&lt;p&gt;There are several different algorithms that the JVM can use to perform garbage collection, such as the mark-and-sweep algorithm, the mark-and-compact algorithm, and the concurrent mark-and-sweep algorithm. The JVM's garbage collector also uses a technique called "compacting" to defragment the heap and reduce fragmentation, which improves memory usage and performance.&lt;/p&gt;

&lt;p&gt;The JVM's garbage collector also uses a technique called "&lt;strong&gt;compacting&lt;/strong&gt;" to defragment the heap and reduce fragmentation, which improves memory usage and performance.&lt;br&gt;
In conclusion, Java's automatic memory management makes the program more stable and efficient by freeing up memory that is no longer being used. The JVM periodically checks for objects that are no longer in use and frees up the associated memory using different algorithms such as mark-and-sweep, mark-and-compact, and concurrent mark-and-sweep. Additionally, heap fragmentation is reduced using compaction. This way, it eliminates the need for developers to manually allocate and free memory, which can lead to errors and memory leaks if not done properly and makes it easier to write concurrent code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Different steps performed by JVM for Memory Management:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Java Virtual Machine (JVM) uses several methods and actions to perform memory management. These include:&lt;br&gt;
&lt;strong&gt;Garbage Collection:&lt;/strong&gt; This is the main method used by the JVM to manage memory automatically. The JVM periodically checks for objects that are no longer in use and frees up the associated memory. The JVM uses different algorithms to perform garbage collection, such as the mark-and-sweep algorithm, the mark-and-compact algorithm, and the concurrent mark-and-sweep algorithm.&lt;br&gt;
&lt;strong&gt;Memory Allocation:&lt;/strong&gt; The JVM uses memory allocation to assign memory to new objects. The JVM uses different algorithms to perform memory allocation, such as the buddy system algorithm, the first-fit algorithm, and the best-fit algorithm.&lt;br&gt;
&lt;strong&gt;Object Reachability:&lt;/strong&gt; The JVM uses object reachability to determine whether an object is still in use or can be garbage collected. An object is considered reachable if it can be accessed by the program or if it is reachable through a chain of other reachable objects.&lt;br&gt;
&lt;strong&gt;Compacting:&lt;/strong&gt; The &lt;a href="https://www.javaoneworld.com/2020/07/jdk-jre-jvm.html" rel="noopener noreferrer"&gt;JVM&lt;/a&gt; uses compaction to defragment the heap and reduce fragmentation. This improves memory usage and performance by reducing the amount of unused space in the heap.&lt;br&gt;
&lt;strong&gt;Memory Tuning:&lt;/strong&gt; The JVM uses memory tuning to optimize memory usage and performance. Memory tuning involves adjusting various parameters, such as the size of the heap, the size of the stack, and the garbage collection algorithm used.&lt;br&gt;
&lt;strong&gt;Memory Profiling:&lt;/strong&gt; The JVM uses memory profiling to monitor the memory usage of a program and identify potential memory leaks or other issues. Memory profiling can be used to track the number of objects created and the amount of memory used by a program over time.&lt;/p&gt;

&lt;p&gt;All of these methods and actions are used together by the JVM to perform automatic memory management in a way that is efficient, stable and optimized for the program's needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What type of task and algorithm JVM performs for Automatic Memory Management:&lt;/strong&gt;&lt;br&gt;
The &lt;a href="https://www.javaoneworld.com/2023/01/why-javas-automatic-memory-management.html" rel="noopener noreferrer"&gt;Java Virtual Machine (JVM)&lt;/a&gt; performs several tasks to manage memory automatically in Java. One of the main tasks is to identify and remove objects that are no longer needed by a program, also known as garbage collection. The &lt;a href="https://www.javaoneworld.com/2020/07/jdk-jre-jvm.html" rel="noopener noreferrer"&gt;JVM&lt;/a&gt; uses different algorithms to perform this task.&lt;br&gt;
Mark-and-Sweep Algorithm: In this algorithm, the JVM first marks all the objects that are currently in use by a program. It then sweeps through the heap and frees up any objects that are not marked. This algorithm is simple and easy to implement, but it can cause the program to pause, or "stop the world," during garbage collection, which can affect performance.&lt;br&gt;
&lt;strong&gt;Mark-and-Compact Algorithm:&lt;/strong&gt; This algorithm is similar to the mark-and-sweep algorithm, but it also compacts the heap after sweeping to reduce fragmentation. This improves memory usage and performance, but it can also cause the program to pause during garbage collection.&lt;br&gt;
&lt;strong&gt;Concurrent Mark-and-Sweep Algorithm:&lt;/strong&gt; This algorithm performs garbage collection concurrently with the program, which means that the program can continue to run while garbage collection is taking place. This can help to reduce the impact of garbage collection on performance, but it can be more complex to implement.&lt;br&gt;
&lt;strong&gt;Generational Garbage Collection:&lt;/strong&gt; This is a variation of the mark-and-sweep algorithm, it uses the assumption that most objects die young, and divides the heap into two parts, one which is called Eden and the other called Old Gen. Eden is used for new objects and the old gen is where long-lived objects are kept. The garbage collection algorithm checks and frees up the Eden space more frequently than the Old Gen space.&lt;/p&gt;

&lt;p&gt;These are the main algorithms that the JVM can use to perform garbage collection. The &lt;a href="https://www.javaoneworld.com/2020/07/jdk-jre-jvm.html" rel="noopener noreferrer"&gt;JVM's&lt;/a&gt; garbage collector also uses a technique called "compacting" to defragment the heap and reduce fragmentation, which improves memory usage and performance. Additionally, the JVM can also use multiple algorithms in combination, such as the parallel scavenge 👇 and serial old algorithm 👇, to perform garbage collection more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;parallel scavenge and serial old algorithm :&lt;/strong&gt;&lt;br&gt;
Parallel scavenge and serial old algorithm is a combination of two garbage collection algorithms used in the Java Virtual Machine (JVM) to perform automatic memory management.&lt;br&gt;
&lt;strong&gt;Parallel Scavenge:&lt;/strong&gt; This algorithm is used to collect young generation objects. It uses multiple threads to scan and collect new objects. The algorithm is designed to minimize the impact on application performance by running concurrently with the application.&lt;br&gt;
&lt;strong&gt;Serial Old:&lt;/strong&gt; This algorithm is used to collect old-generation objects. It uses a single thread to scan and collect the old objects. The algorithm is designed to be more efficient than a single-threaded mark-and-sweep algorithm and is able to reclaim large amounts of memory quickly and effectively.&lt;/p&gt;

&lt;p&gt;The parallel scavenge algorithm is used to manage the heap space that contains short-lived objects, while the serial old algorithm is used to manage the heap space that contains long-lived objects. By using these two algorithms together, the JVM is able to perform automatic memory management more efficiently, as each algorithm is optimized for its specific task.&lt;/p&gt;

&lt;p&gt;This combination of algorithms is highly efficient, as it can reduce the time taken for the garbage collection cycle by running them concurrently, and also it can also reduce the overall impact of garbage collection on the application's performance. Additionally, this combination of algorithms is also known as the parallel old garbage collector.&lt;/p&gt;




&lt;p&gt;Follow me &lt;a class="mentioned-user" href="https://dev.to/amymishra11"&gt;@amymishra11&lt;/a&gt;  for more.&lt;br&gt;
Thanks for being here.&lt;br&gt;
Happy Coding ✌✌✌&lt;br&gt;
Visit &lt;a href="//www.javaoneworld.com"&gt;www.javaoneworld.com&lt;/a&gt; for more&lt;/p&gt;

</description>
      <category>career</category>
      <category>productivity</category>
      <category>softwareengineering</category>
      <category>programming</category>
    </item>
    <item>
      <title>Beyond the Basics: 10 Uncommon Features That Make Java a Powerful Language</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Fri, 13 Jan 2023 18:17:08 +0000</pubDate>
      <link>https://dev.to/amymishra11/beyond-the-basics-10-uncommon-features-that-make-java-a-powerful-language-1fhm</link>
      <guid>https://dev.to/amymishra11/beyond-the-basics-10-uncommon-features-that-make-java-a-powerful-language-1fhm</guid>
      <description>&lt;p&gt;When anyone talks about java and its features, why choose java,&lt;br&gt;
what makes Java different from others etc.&lt;br&gt;
For the above type of questions mostly you'll listen to the predefined answers - like &lt;/p&gt;

&lt;p&gt;Platform independence&lt;br&gt;
Object-oriented programming&lt;br&gt;
Large developer community&lt;br&gt;
Robustness&lt;br&gt;
Security&lt;br&gt;
etc.&lt;/p&gt;

&lt;p&gt;Although these are obviously correct, these points play a major role, but apart from that we have lots of other reasons why java is the most powerful language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are Some Beyond the Basics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic proxies:&lt;/strong&gt; Java's support for dynamic proxies makes it easy to create objects that can mimic the behavior of other objects, making it useful for tasks such as mocking and testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Native XML support:&lt;/strong&gt; Java's built-in support for XML through libraries such as JAXB and DOM makes it easy to work with XML data in a Java application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflection:&lt;/strong&gt; Java's built-in reflection API makes it possible to inspect and manipulate classes and objects at runtime, making it useful for tasks such as debugging and code generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Built-in regular expressions:&lt;/strong&gt; Java's built-in support for regular expressions makes it easy to search and manipulate text data in a Java application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Built-in cryptography:&lt;/strong&gt; Java's built-in support for cryptography makes it easy to add security features to a Java application, such as encryption and digital signing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic scripting support:&lt;/strong&gt; Java's built-in support for dynamic scripting languages, such as JavaScript, through libraries like Rhino, makes it easy to add scripting functionality to a Java application.&lt;/p&gt;

&lt;p&gt;Follow the below link to read the complete post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2023/01/why-java-is-most-powerful-language.html"&gt;10 Uncommon Features That Make Java a Powerful Language&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow &lt;a class="mentioned-user" href="https://dev.to/amymishra11"&gt;@amymishra11&lt;/a&gt; for more.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>productivity</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>ChatGPT: 20 Fun Ways to put this Clever AI to work.</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Sat, 31 Dec 2022 18:10:44 +0000</pubDate>
      <link>https://dev.to/amymishra11/chatgpt-20-fun-ways-to-put-this-clever-ai-to-work-o0c</link>
      <guid>https://dev.to/amymishra11/chatgpt-20-fun-ways-to-put-this-clever-ai-to-work-o0c</guid>
      <description>&lt;p&gt;&lt;strong&gt;CHATGPT Your Go-To source for fun and innovation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ChatGPT the AI Companion that offers Endless Entertainment Options.&lt;/p&gt;

&lt;p&gt;Here are 20 ideas for entertaining uses of ChatGPT.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Have ChatGPT help you come up with ideas for things to do or places to go.

Use ChatGPT to create a choose-your-own-adventure style story.
Have ChatGPT play the role of a character in a role-playing game.
Use ChatGPT to generate jokes or puns.
Have ChatGPT help you write a letter or email.
Use ChatGPT to generate ideas for new recipes or meal plans.
Have ChatGPT write a short story or poem.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For more ....&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2022/12/chatgpt-20-fun-ways-to-put-this-clever.html" rel="noopener noreferrer"&gt;ChatGPT 20 Fun Ways to use it&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me for such well written article.&lt;/p&gt;

&lt;p&gt;Happy coding.&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Log4j2 vulnerability</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Thu, 16 Dec 2021 21:58:56 +0000</pubDate>
      <link>https://dev.to/amymishra11/log4j2-vulnerability-47jj</link>
      <guid>https://dev.to/amymishra11/log4j2-vulnerability-47jj</guid>
      <description>&lt;p&gt;No one leaving the battle ground, neither developer nor hacker 😂😂.&lt;/p&gt;

&lt;p&gt;As soon as developer got some fix immediately the another guy(bad guy) trying to breakdown the fix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2021/12/log4j-vulnerability.html?m=1"&gt;Log4j2 vulnerability&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As per an article &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;log4j security flaw prompting 100 new hacking attempts every minute.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>java</category>
      <category>security</category>
      <category>vulnerability</category>
    </item>
    <item>
      <title>Log4j Vulnerability</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Thu, 16 Dec 2021 21:52:14 +0000</pubDate>
      <link>https://dev.to/amymishra11/log4j-vulnerability-3b4o</link>
      <guid>https://dev.to/amymishra11/log4j-vulnerability-3b4o</guid>
      <description>&lt;p&gt;Summary of the Vulnerability&lt;/p&gt;

&lt;p&gt;On Dec. 9, 2021, a remote code execution (RCE) vulnerability in Apache log4j 2 was recognized as being taken advantage of in nature. Public proof of concept (PoC) code was delivered and the resulting examination uncovered that double-dealing was unbelievably simple to perform. By presenting a uniquely created solicitation to a weak framework, contingent upon how the framework is designed, an aggressor can teach that framework to download and consequently execute a malicious payload. Because of the disclosure of this adventure being so later, there are as yet numerous servers, both on-premises and inside cloud conditions, that presently can't seem to be fixed. In the same way, as other high seriousness RCE takes advantage of, hitherto, enormous checking movement for CVE-2021-44228 has started on the web with the aim of searching out and taking advantage of unpatched frameworks. We enthusiastically prescribe that associations move up to the most recent rendition (2.16.0) of Apache log4j 2 for all frameworks. This form additionally fixes the less extreme vulnerability CVE-2021-45046, found on Dec. 14.&lt;/p&gt;

&lt;p&gt;Well explained article on the log4j2 vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2021/12/log4j-vulnerability.html?m=1"&gt;Log4j2 vulnerability&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Still the team looking into and trying to root cause of this.&lt;/p&gt;

</description>
      <category>java</category>
      <category>vulnerability</category>
      <category>security</category>
    </item>
    <item>
      <title>JDK 18: What to expect in Java 18</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Thu, 02 Dec 2021 20:59:22 +0000</pubDate>
      <link>https://dev.to/amymishra11/jdk-18-what-to-expect-in-java-18-4foe</link>
      <guid>https://dev.to/amymishra11/jdk-18-what-to-expect-in-java-18-4foe</guid>
      <description>&lt;p&gt;*&lt;em&gt;Due in March 2022, Java 18 has attracted recommendations to hatch the vector API, preview pattern matching for switch statements, and embrace UTF-8 as the default character set. *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Due in March 2022, Java 18 keeps on adding highlights, with nine component recommendations being considered for it up until this point, including the deprecation of finalization, a capability that was intended to help avoid resource leaks but has brought with it risks of unconstrained behavior and unpredictable latency.&lt;/p&gt;

&lt;p&gt;The OpenJDK page for Java Development Kit (JDK) 18 records the accompanying elements as authoritatively focusing on JDK 18 as of November 24: a service provider interface, a basic web server, a vector API, code snippets, a reimplementation of core reflection, a UTF-8 charset, the second incubator of a foreign function and memory API, and the second preview of pattern matching for switch statements. Deprecation of finalization is proposed to target JDK 18 in the JDK Enhancement Proposal (JEP) record.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2021/12/jdk-18-what-to-expect-in-java-18.html?m=1"&gt;Upcoming feature Specifics of the JDK 18 proposals includes&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
    </item>
    <item>
      <title>How to force jvm to share same memory pool between two string object? intern() in java.</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Thu, 08 Jul 2021 14:38:28 +0000</pubDate>
      <link>https://dev.to/amymishra11/how-to-force-jvm-to-share-same-memory-pool-between-two-string-object-46g0</link>
      <guid>https://dev.to/amymishra11/how-to-force-jvm-to-share-same-memory-pool-between-two-string-object-46g0</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; String str1 = new String ("javaoneworld"); 
  String str2  = new String ("javaoneworld");

System.out.println(str1 == str2); //false but it can be true also 🤔
/*
  * as we initializing str1 and 
str2 with new keyword so they 
will not share the
  * same memory pool
  */

  System.out.println(str1 == str2); //false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;But what if I want true for the above statement?&lt;/p&gt;

&lt;p&gt;How ?&lt;/p&gt;

&lt;p&gt;So the only way to get this is ,if somehow we force jvm to share the same memory pool to both the variable.&lt;/p&gt;

&lt;p&gt;So is it possible?&lt;/p&gt;

&lt;p&gt;Yes absolutely, it's possible, click on below to see how.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  /*
 * using the intern() method we can force both the string to share same memory
 * pool
 */

     str1 = str1.intern();
     str2 = str2.intern();

     System.out.println(str1 == str2); //true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2021/07/java-amazing-interesting-and-cool-tricks.html?m=1"&gt;https://www.javaoneworld.com/2021/07/java-amazing-interesting-and-cool-tricks.html?m=1&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  code #codechallenge﻿﻿
&lt;/h1&gt;

&lt;h1&gt;
  
  
  coders
&lt;/h1&gt;

&lt;h1&gt;
  
  
  coderlife
&lt;/h1&gt;

&lt;h1&gt;
  
  
  CodeIgniter
&lt;/h1&gt;

&lt;h1&gt;
  
  
  java
&lt;/h1&gt;

&lt;h1&gt;
  
  
  javadevelopment
&lt;/h1&gt;

&lt;h1&gt;
  
  
  javadeveloper
&lt;/h1&gt;

&lt;h1&gt;
  
  
  javacode
&lt;/h1&gt;

&lt;h1&gt;
  
  
  javatricks
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Does Java provide something which can clear all the cache at once?👆👆👆👆</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Fri, 18 Jun 2021 05:46:00 +0000</pubDate>
      <link>https://dev.to/amymishra11/does-java-provide-something-which-can-clear-all-the-cache-at-once-2l27</link>
      <guid>https://dev.to/amymishra11/does-java-provide-something-which-can-clear-all-the-cache-at-once-2l27</guid>
      <description>&lt;p&gt;Does Java provide something which can clear all the cache at once?👆👆👆👆❓❓❓&lt;/p&gt;

&lt;p&gt;The answer is NO 👎👎👎😕😕😕.&lt;/p&gt;

&lt;p&gt;Java does not provide any such feature which can clear all the cache at once.👍👍👍👍&lt;/p&gt;

&lt;p&gt;So how do clear all the cache?😞😞😞&lt;br&gt;
Found the Complete post below👇👇👇👌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2021/06/how-to-clear-cache-in-springboot-java.html?m=1"&gt;https://www.javaoneworld.com/2021/06/how-to-clear-cache-in-springboot-java.html?m=1&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  happycoding
&lt;/h1&gt;

&lt;h1&gt;
  
  
  staysafe
&lt;/h1&gt;

&lt;h1&gt;
  
  
  stayCode
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Find odd even using Bitwise operator.</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Mon, 17 May 2021 09:44:05 +0000</pubDate>
      <link>https://dev.to/amymishra11/find-odd-even-using-bitwise-operator-47k1</link>
      <guid>https://dev.to/amymishra11/find-odd-even-using-bitwise-operator-47k1</guid>
      <description>&lt;p&gt;Here we'll use &amp;amp; operator to find thae number is Odd or Even.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class JavaOneWorld {
public static void main(String 
     args[]) {
     int x= 7;

   if((x&amp;amp;1)==0){
     System.out.println("even");
 }else{
    System.out.println("odd");
    }
   }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The idea behind using the &amp;amp; operator !!!!!&lt;/p&gt;

&lt;p&gt;As we already know binary works only on 1 and 0.&lt;br&gt;
and a number is either odd or even,&lt;br&gt;
so if a number is even then the last bit of that number must be 0 and if odd then the last bit must be 1.&lt;/p&gt;

&lt;p&gt;i.e.-&lt;/p&gt;

&lt;p&gt;5     odd&lt;br&gt;
101 last bit is 1.&lt;/p&gt;

&lt;p&gt;4 even&lt;/p&gt;

&lt;p&gt;100 last bit is 0.&lt;/p&gt;

&lt;p&gt;so here we have to use this property to find out the odd/even&lt;/p&gt;

&lt;p&gt;Deep dive in this post...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2021/05/find-odd-even-using-bitwise-operator.html?m=1"&gt;https://www.javaoneworld.com/2021/05/find-odd-even-using-bitwise-operator.html?m=1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>codenewbie</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Bitwise or mathematical which operator is best to swap two number?</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Sun, 28 Mar 2021 06:47:22 +0000</pubDate>
      <link>https://dev.to/amymishra11/bitwise-or-mathematical-which-operator-is-best-to-swap-two-number-3koh</link>
      <guid>https://dev.to/amymishra11/bitwise-or-mathematical-which-operator-is-best-to-swap-two-number-3koh</guid>
      <description>&lt;p&gt;Hi dev...share your observations?&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; x = x^y;
 y = x^y;
 x = x^y;


 Or

 temp = x;
 x = y;
 y = temp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Which one is better?&lt;/p&gt;

</description>
      <category>java</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Swap two number using Bitwise operators without using third variable.</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Sun, 28 Mar 2021 06:39:35 +0000</pubDate>
      <link>https://dev.to/amymishra11/swap-two-number-using-bitwise-operators-without-using-third-variable-42n6</link>
      <guid>https://dev.to/amymishra11/swap-two-number-using-bitwise-operators-without-using-third-variable-42n6</guid>
      <description>&lt;p&gt;28 Mar ・1 min read&lt;br&gt;
Bitwise operators are always more efficient than mathematical operators.&lt;/p&gt;

&lt;p&gt;And reason behind this is, Bitwise operators directly work on bits that's why.&lt;/p&gt;

&lt;p&gt;So going with Bitwise operators will be good.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2020/03/swap-two-numbers-using-bitwise-operator.html?m=1"&gt;https://www.javaoneworld.com/2020/03/swap-two-numbers-using-bitwise-operator.html?m=1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Are you using pure Black color for the Text on white background? Stop please.</title>
      <dc:creator>Amit Mishra</dc:creator>
      <pubDate>Wed, 24 Mar 2021 14:28:40 +0000</pubDate>
      <link>https://dev.to/amymishra11/are-you-using-pure-black-color-for-the-text-on-white-background-stop-please-2j7j</link>
      <guid>https://dev.to/amymishra11/are-you-using-pure-black-color-for-the-text-on-white-background-stop-please-2j7j</guid>
      <description>&lt;p&gt;1- Are you going to implement dark theme in your app?&lt;/p&gt;

&lt;p&gt;2- Which text color you should use on white background?&lt;/p&gt;

&lt;p&gt;so for the above both task if you are using pure Black &lt;/p&gt;

&lt;h1&gt;
  
  
  000000 rgb(0, 0, 0)
&lt;/h1&gt;

&lt;p&gt;Stop please.&lt;/p&gt;

&lt;p&gt;Then what?&lt;br&gt;
Here is a beautiful post on different shade of black color, which we can use for the same.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javaoneworld.com/2020/08/best-black-shade-color-code.html?m=1"&gt;https://www.javaoneworld.com/2020/08/best-black-shade-color-code.html?m=1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>design</category>
      <category>html</category>
    </item>
  </channel>
</rss>
