<?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: hemantyadav2804</title>
    <description>The latest articles on DEV Community by hemantyadav2804 (@hemantyadav2804).</description>
    <link>https://dev.to/hemantyadav2804</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%2F3480882%2Fc7b0c42c-3fec-42c6-bc40-d2079e1fca4e.jpeg</url>
      <title>DEV Community: hemantyadav2804</title>
      <link>https://dev.to/hemantyadav2804</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hemantyadav2804"/>
    <language>en</language>
    <item>
      <title>Reversing a Number using Java</title>
      <dc:creator>hemantyadav2804</dc:creator>
      <pubDate>Fri, 03 Oct 2025 07:59:39 +0000</pubDate>
      <link>https://dev.to/hemantyadav2804/reversing-a-number-using-java-19ga</link>
      <guid>https://dev.to/hemantyadav2804/reversing-a-number-using-java-19ga</guid>
      <description>&lt;h2&gt;
  
  
  FAQ's on Java Series by Hemant Yadav - 01
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;Hello everyone, I am Starting a practice question series which can help you to enhance the logical thinking as well as to get hands on java  *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Question 01- Reverse a Number&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.Scanner;

public class ReverseNumber {

    public static void main(String[] args) {

        int a; //variable declaration

        a=123;  //variable initialization  hard code value

        Scanner sc=new Scanner(System.in);            
        System.out.println("Please enter a number");  //123     3
        int num=sc.nextInt();
        int rev=0;
        int rem;
        while(num&amp;gt;0)
        {
            rem=num%10; 
            rev=rev*10+rem;
            num=num/10;
        }

        System.out.println(rev);
    }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HOW IT WORKS ?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Input a number → User enters a number (e.g., 123).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extract last digit → num % 10 gives the remainder (last digit). Example: 123 % 10 = 3.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build reversed number → rev = rev * 10 + rem. At first, &lt;br&gt;
rev = 0 * 10 + 3 = 3.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove last digit → num = num / 10. Example: 123 / 10 = 12.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat until num becomes 0.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Iteration steps for input 123:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 1 → rem = 3, rev = 3, num = 12&lt;/p&gt;

&lt;p&gt;Step 2 → rem = 2, rev = 32, num = 1&lt;/p&gt;

&lt;p&gt;Step 3 → rem = 1, rev = 321, num = 0&lt;/p&gt;

&lt;p&gt;Output result → Print reversed number (321).&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction to Java Programming</title>
      <dc:creator>hemantyadav2804</dc:creator>
      <pubDate>Fri, 19 Sep 2025 06:27:07 +0000</pubDate>
      <link>https://dev.to/hemantyadav2804/introduction-to-java-programming-22h</link>
      <guid>https://dev.to/hemantyadav2804/introduction-to-java-programming-22h</guid>
      <description>&lt;p&gt;&lt;em&gt;Java is one of the most popular and widely used programming languages in the world. Known for its flexibility, security, and platform independence, Java has become the backbone of countless applications across industries.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Java?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Java is a high-level, object-oriented programming language developed by Sun Microsystems in 1995 (now owned by Oracle). Its core philosophy is "Write Once, Run Anywhere," meaning that Java applications can run on any device that has the Java Virtual Machine (JVM), regardless of the underlying operating system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features of Java&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Platform Independent: Code written in Java runs seamlessly on different operating systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object-Oriented: Encourages modular programming with concepts like classes, objects, inheritance, and polymorphism.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secure and Robust: Java provides strong memory management and built-in security features. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simple and Familiar: Its syntax is similar to C++ but simplified to avoid complex features.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multithreaded: Allows simultaneous execution of multiple parts of a program.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Applications of Java&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Web Applications: Java is widely used in server-side development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mobile Applications: The foundation of Android app development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise Solutions: Used by banks, insurance, and large corporations for stable and scalable systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud Computing: Powers cloud-based services and distributed systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Game Development &amp;amp; IoT: Also finds application in game engines and embedded devices.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why Learn Java?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Huge community support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Abundant learning resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;High demand in the job market.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Foundation for advanced technologies like Spring Boot, Hibernate, and Android.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;_Java has stood the test of time, remaining relevant for over two decades. Whether you are a beginner looking to start your coding journey or a professional aiming to enhance your skills, learning Java opens doors to endless opportunities in the tech industry.&lt;br&gt;
_&lt;/p&gt;

</description>
      <category>java</category>
      <category>developer</category>
    </item>
  </channel>
</rss>
