Frequently Asked Java Program 02: Reverse A Number | 3 Ways of Reverse a Number

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • Topic: Reverse a Number ( 3 Different ways)
    #########################
    Udemy Courses:
    #########################
    Manual Testing+Agile with Jira Tool
    ************************************
    ► shorturl.at/xNXZ4
    Selenium with Java+Cucumber
    ********************************
    ► shorturl.at/aIKMW
    Selenium with Python & PyTest
    ********************************
    ► shorturl.at/ELW09
    Selenium with python using Robot framework
    ****************************************
    ► shorturl.at/bcDPZ
    API Testing(Postman, RestAssured & SoapUI)
    *****************************************
    ► shorturl.at/uAWY7
    Web & API Automation using Cypress with Javascript
    ********************************************
    ► rb.gy/4uum2n
    Playwright with Javascript
    **************************
    ► shorturl.at/gALZ1
    Jmeter-Performance Testing
    ************************
    ► rb.gy/ocj7r2
    SDET Essencials(Full Stack QA)
    *************************
    ► rb.gy/hlnf2v
    Appium-Mobile Automation Testing
    ************************************
    ► rb.gy/wmzv64
    Java Collections
    *****************
    ► bit.ly/3S66ezE
    Python Programming
    *********************
    ► urlis.net/gdsf...
    Cucumber BDD Framework
    ***************************
    ► bit.ly/3F7d69r
    Protractor with Javascript
    ***************************
    ► urlis.net/4udd...
    ####################################
    CZcams Playlists:
    ####################################
    Manual Testing & Agile
    ***********************
    ► bit.ly/3ujvaYa
    ► bit.ly/3OYzxQj
    SQL
    *************************
    ► bit.ly/3R6XjeG
    ► bit.ly/3nE0a1s
    ► bit.ly/3IeKuuJ
    linux & Shell Scripting
    **********************
    ► bit.ly/3up1Z6a
    ► bit.ly/3nzvGxx
    Java
    **********************
    ► bit.ly/3R9QfOs
    ► bit.ly/3AoRMKM
    ► bit.ly/3IbTTDn
    ► bit.ly/3ybXInv
    ► bit.ly/3yCoHdw
    Selenium With Java+Cucumber
    ********************************
    ► bit.ly/3P2FMm4
    ► bit.ly/3yhiIt4
    ► bit.ly/3uokzet
    ► bit.ly/3a7XIND
    ► bit.ly/3umN2S9
    ► bit.ly/3aar7GW
    ► bit.ly/3y9kD2S
    ► bit.ly/3uhLskn
    Python
    ********************************
    ► bit.ly/3agNgU0
    ► bit.ly/3NJNnoy
    ► bit.ly/2CTQ4mR
    ► bit.ly/3OIYWh1
    Selenium With Python,Pytest&Behave
    ***************************************
    ► bit.ly/3OHHoC9
    ► bit.ly/3IeNLdv
    ► bit.ly/2J4tPeT
    ► bit.ly/3ydSkAq
    Selenium With Python Using Robert Framework
    (Web&API Testing)
    *************************************************
    ► bit.ly/3nUvlpr
    ► bit.ly/3nUvE3z
    API Testing (Postman,SoapUi,&Rest Assured)
    **********************************************
    ► bit.ly/3OXacWY
    ► bit.ly/3yh0UhE
    ► bit.ly/3nC9DWQ
    ► bit.ly/3yGfhNS
    ► bit.ly/3OJa11H
    ► bit.ly/3P2slCC
    Mobile App Testing Appium
    ****************************
    ► bit.ly/3Al49HG
    Performance Testing Jmeter
    *******************************
    ► bit.ly/3nz4fE7
    Maven,Jenkins,Git,Github,CI/CD
    *******************************
    ► bit.ly/3P16HPj
    ► bit.ly/3yhlUVA
    ► bit.ly/3afYfwT
    ► bit.ly/3yGzweG
    ► bit.ly/3yF73Ws
    ► bit.ly/3NCOmH7
    SQL,DB Testing&ETL,Bigdata
    *******************************
    ► bit.ly/3NKOcNY
    ► bit.ly/3OVpDyI
    ► bit.ly/3NEvUy0
    ► bit.ly/3IryxlT
    ► bit.ly/3RkWBLh
    JavaScript Based Automation Tools
    ********************************
    ► bit.ly/3nUx51X
    ► bit.ly/3AqI6Q0
    ► bit.ly/3yeurbT
    ► bit.ly/3ujzpTK
    Selector Hub Tools
    ********************
    ►rb.gy/h3h424
    GraphQL
    ******************
    ► rb.gy/sj3gys
    Cypress API Testing
    ********************
    ► shorturl.at/fjKPX
    Cypress Web Testing
    **********************
    ► shorturl.at/agjlK
    Playwright with Javascipt
    **************************
    ► shorturl.at/adSTY
    #JavaNumberReversal
    #ReverseNumber
    #JavaProgramming
    #CodeReversal
    #JavaTips
    #NumberManipulation
    #ProgrammingHelp
    #JavaBeginner
    #CodingChallenge
    #Java101
    #CodingCommunity
    #LearnJava
    #JavaTricks
    #CodeSnippets
    #ReverseInteger
    #JavaDevelopment
    #ProgrammingQuestions
    #Algorithm
    #JavaAlgorithms
    #CodingProblems
    #CodingSolutions
    #TechInterview
    #CodingSkills
    #JavaHelp
    #ReverseDigits
    #JavaLearning
    #ProgrammingLogic
    #JavaProblems
    #JavaCode
    #CodeExamples
    #ReverseAlgorithm
    #JavaCommunity
    #CodingTutorials
    #ReverseNumberLogic
    #JavaChallenge
    #SoftwareDevelopment
    #ProblemSolving
    #ProgrammingLanguages
    #JavaCodeSnippet
    #ReverseNumberFunction
    #JavaPuzzle
    #ProgrammingJourney
    #JavaCoders
    #JavaPractice
    #CodeReview
    #AlgorithmDesign
    #JavaMentorship
    #JavaDev
    #ProgrammingProblems
    #JavaCodingTips

Komentáře • 170

  • @crazychengu359
    @crazychengu359 Před 4 měsíci +65

    Who are here in 2024!

  • @otakusonline1487
    @otakusonline1487 Před rokem +29

    2 Years later and this video explained perfectly to assist me with my AP CS Class. Thanks man.

  • @iynesh07
    @iynesh07 Před 2 lety +37

    Everything is awesome...
    just a small correction:
    % : This is called remainder operator, which gives the remainder as output.
    as in 123%10 gives 3 as remainder.
    and
    / : this is division operator and gives the value after division.
    as in 123/10 gives 12.3 as answer but if you have taken it as int then it will give 12.

    • @varisha6758
      @varisha6758 Před 2 lety +9

      It divides left-hand operand by right-hand operand and returns remainder and is called as (Modulus) not remainder operator

    • @madhavkiagya
      @madhavkiagya Před rokem +2

      Thanks, I was confused and watched the video 2 times and then read this comment. Now got cleared...
      The creator is using a strategy to increase watch time.

    • @ibbishariff
      @ibbishariff Před rokem +2

      @@madhavkiagya No, the creator is doing a great job. You need to brush up you basics.

    • @madhavkiagya
      @madhavkiagya Před rokem +1

      @@ibbishariff yes, thanks...

  • @kennyi1200
    @kennyi1200 Před 2 lety +12

    I liked here StringBuilder option the most. For 12300 it returns us 00321 but Option1 - Modulus one returns just 321 which is not good. Also, for numbers more than 9-10 digits Option 1 doesn't work but StringBuffer and StringBuilder comes over well . Thanks for the video !

  • @showme13100
    @showme13100 Před rokem +4

    Excellent explanation. Even a nontechnical guy like me can comprehend easily. Thanks a lot, sir

  • @user-dj4qj9ms7t
    @user-dj4qj9ms7t Před 5 měsíci +2

    Thank you for explaining in very easy manner

  • @pavanichella
    @pavanichella Před 2 lety +11

    I always wanted these logics.Guess i found the right channel .Thanks a ton sir!

  • @priyankajadhav6611
    @priyankajadhav6611 Před 7 měsíci +1

    You are best teacher in the world ,yours teaching skills is awesome sir

  • @pawansasane166
    @pawansasane166 Před 20 dny

    Thanks sir.. logic explanation is really simple .. I’m referring your videos for interviews and it really helping me ..

  • @manasipawar7941
    @manasipawar7941 Před 3 lety +37

    But sir , number enter to 1230 this no not reverse 0321 .. Output is 321 so 0 is eliminate so plz suggest logic for last digit 0

    • @rajasekhar3977
      @rajasekhar3977 Před rokem +4

      Use stringBuffer or stringBuilder methods

    • @shankardeepak-pr9bl
      @shankardeepak-pr9bl Před rokem +4

      Int num = 12340;
      int rev = 0 ;
      While(num!=0) {
      rev = (rev*10) + num%10;
      num/=10;
      }
      System.out.println(rev);
      Try this 👍

    • @dh1713
      @dh1713 Před 9 měsíci

      ​@@shankardeepak-pr9blStil removes the zero (:

    • @giriyt
      @giriyt Před 9 měsíci +1

      ​@@shankardeepak-pr9bl not worked

    • @GuganSubramaniam
      @GuganSubramaniam Před 7 měsíci

      Use while(num>=0)

  • @anshuhyderabad
    @anshuhyderabad Před 4 lety +10

    Hello , I think 2nd and 3rd methods are same. I think 3rd one can be like converting number to string and then using charAt method to extract each char and then appending to the sting builder
    int origNum = 123456;
    String stNum = String.valueOf(k);
    StringBuilder revStg = new StringBuilder();
    for (int i = stNum.length()-1; i>=0;i--)
    {
    revStg.append(stNum.charAt(i));
    }
    System.out.println(revStg);
    }
    }

  • @thechitrolekha4352
    @thechitrolekha4352 Před rokem +2

    My exams are nearing and I found this video. This is so useful. Thank you sir

  • @samarthk9366
    @samarthk9366 Před 2 lety +4

    You explained programming very well, easy to understand.. Thank you sir

  • @nayabshaik2282
    @nayabshaik2282 Před rokem +1

    Great thanks you sir ☺. You are simply awesome.. coding med interest leni naaku, meerichhe explanation tho interest vachhestundi.. I am practcing well. Once again Thank you very much sir 🙏

  • @DeepakJindal07
    @DeepakJindal07 Před 4 dny

    int reversed = 0;
    while (num != 0) {
    int digit = num % 10; // Extract the last digit
    reversed = reversed * 10 + digit; // Append digit to reversed number
    num /= 10; // Remove the last digit from original number
    }

  • @subhakar9015
    @subhakar9015 Před 3 lety +2

    package reversestring;
    import java.util.Scanner;
    public class ReverseString {
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("Enter the sentence::");
    String stnce=sc.nextLine();
    System.out.println(new StringBuilder(stnce).reverse());
    }
    }

  • @-SatyajitSahoo-
    @-SatyajitSahoo- Před 6 měsíci +3

    Splendid explaination sir 💯

  • @gauri992
    @gauri992 Před 3 lety +3

    You explain it the best way thanks a lot sir...

  • @vishalbandi6742
    @vishalbandi6742 Před 2 lety +2

    i think we can also reverse integer or string by using FOR loops ...

  • @hemmishra1102
    @hemmishra1102 Před rokem +1

    Thank you, I was looking for such series in hindi.
    Thank you again

  • @beditz1591
    @beditz1591 Před rokem +2

    Respected sir please help
    I came in this video from your Udemy course selenium with java+ cucumber...
    I watched your video until 6(conditional statement & looping statement) and i came here for assignment...i watched your video but here I couldn't understand idk sir plz help me...and try to re upload your video...and why you didn't solve assignment in udamy😥😢

  • @Pavan_Gaekwad
    @Pavan_Gaekwad Před rokem +4

    Such a good explanation , Sir 😊

  • @SFL1484
    @SFL1484 Před 2 lety +1

    WOWWWW.... FINALLY!!!!! Well explained. Great teaching. THANK YOU

  • @prachipatil5996
    @prachipatil5996 Před 3 měsíci +2

    Why rev×10?

  • @nvr7367
    @nvr7367 Před 4 lety +1

    Hi Bro, There is one more way
    public static String reverseNum(int num) {
    String reverseString = "";
    String str = Integer.toString(num);
    char[] chr = str.toCharArray();
    for (int i = 1; i

  • @calsoftdev8722
    @calsoftdev8722 Před 2 lety +1

    your explain is very clear ,it ease to understand

  • @Sandeepchandrabose
    @Sandeepchandrabose Před 3 měsíci

    Sir, first method won't work if we try to reverse *'00111'* right as we will get *37* as output.
    static int reverseNumber(int num) {
    int rev = 0;
    while (num != 0) {
    rev = rev * 10 + num % 10;
    num /= 10;
    }
    return rev;
    }
    System.out.println(reverseNumber(00111));
    Output = 37

  • @whatisinthenameshakespeare0015

    I think the input taken sc.nextInt can result in exception if user enters non number or mixed input... we should handle it in a better way

  • @ashokkadam123
    @ashokkadam123 Před rokem +1

    Very Nice Explaination...Thank You Sir...!!!

  • @vivekayadi9299
    @vivekayadi9299 Před 3 měsíci

    Explanation is excellent but,the xor u said that is not correct it would be bidirectional then if the values are same its 1 otherwise its 0

  • @ramya-s17
    @ramya-s17 Před 2 dny

    without using string buffer and builder
    import java.util.Scanner;
    public class Main
    {
    public String reverse(String sc){
    String rev= "";
    for(int i=sc.length()-1; i>=0;i--){
    rev = rev +sc.charAt(i);
    System.out.println("rev string "+rev);
    }
    return rev;
    }
    public static void main(String[] args) {
    Scanner p = new Scanner(System.in);
    System.out.println("enter a number: ");
    String sc = p.next();
    Main obj = new Main();
    obj.reverse(sc);
    }
    }

  • @Mahi-rh1li
    @Mahi-rh1li Před 5 měsíci

    Sir If we give input as 67890 then 0 is being ignored and output displaying 9876..What logic can we add in order to not ignore zero as well?

  • @busisiwemailula
    @busisiwemailula Před rokem +1

    Thank you so much ❤did this for my assignment

  • @kvelez
    @kvelez Před 11 měsíci +2

    This one was super cool

  • @indgameplaychannel
    @indgameplaychannel Před rokem

    System.out.println("Logic_3");
    System.out.println("Enter Number");
    Scanner sc=new Scanner(System.in);
    int num=sc.nextInt();
    StringBuilder rev;
    //Using String Builder Class
    StringBuilder sbl=new StringBuilder(String.valueOf(num));
    rev=sbl.reverse();
    System.out.println("Reverse number is" + rev); This logic also workng for third logic

  • @asharaju4169
    @asharaju4169 Před 6 měsíci

    Why need to append when using string builder? it also has inbuilt reverse method...so why not use it directly....only that logic i didn't get...somebody please...

  • @akshayar3474
    @akshayar3474 Před 6 měsíci

    thank you sir for this explanation it is really helpful ,i have doubt if we dont use scanner class is there any mistakes

  • @raghu9997
    @raghu9997 Před 9 měsíci +1

    Thank you so much sir 🎉
    Great explanation ❤

  • @sundramyadav5934
    @sundramyadav5934 Před 3 lety +1

    Thank you so much sir for providing very useful videos for free.

  • @vivekpaul8104
    @vivekpaul8104 Před 4 lety +2

    Very neat and clean explanation sir.....keep up👏

  • @aalanagirls7778
    @aalanagirls7778 Před 5 lety +2

    thank you ,please upload more java programs...

    • @Horodgamin
      @Horodgamin Před 4 lety

      See more here:czcams.com/video/BfAJkKDHTQk/video.html

  • @nonegirl112
    @nonegirl112 Před 10 měsíci +1

    Super sir grear teaching

  • @shareefshaik5920
    @shareefshaik5920 Před 4 lety +1

    When there is easy methods string buffer and builder they why to go for algorithm ?

  • @eswarec1422
    @eswarec1422 Před rokem +1

    Perfect Explanation ❤️🙌🏻

  • @sasikumarchunduri6179
    @sasikumarchunduri6179 Před 3 lety +1

    Thank you so much very clear explanation

  • @ajaywankhade5054
    @ajaywankhade5054 Před 7 měsíci +2

    Thank u sir

  • @kummarisudhamani3706
    @kummarisudhamani3706 Před 2 měsíci

    How to identify that logic sir rev=(rev*10)+num/10

  • @yasithnirmalpeiris7196
    @yasithnirmalpeiris7196 Před měsícem

    can we do that using a string concat

  • @rachamallidorasrivignesh4499

    tq sir please make more on aptitude we are waiting for ur classess anna

  • @fitnessgurl1396
    @fitnessgurl1396 Před 2 lety

    oh wow you are superb the way of explanation great sir
    am preparing for gsoc wish it help me

  • @rockgemini
    @rockgemini Před 2 lety +1

    What about reversing a number like 67890 with the algorithm mentioned here? It will not consider 0 and will only print 9876.

    • @poojachandavar1762
      @poojachandavar1762 Před 2 lety

      we can u the recursion method, try this :)
      import java.util.Scanner;
      public class ReverseNumberExample3
      {
      //method for reverse a number
      public static void reverseNumber(int number)
      {
      if (number < 10)
      {
      //prints the same number if the number is less than 10
      System.out.println(number);
      return;
      }
      else
      {
      System.out.print(number % 10);
      reverseNumber(number/10);
      }
      }
      public static void main(String args[])
      {
      System.out.print("Enter the number that you want to reverse: ");
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      System.out.print("The reverse of the given number is: ");
      //method calling
      reverseNumber(num);
      }
      }

  • @shubhamshende9995
    @shubhamshende9995 Před 11 měsíci +1

    Amazing 🎉

  • @korebhagath3976
    @korebhagath3976 Před 2 lety +1

    Sir can we revers float and double values by using string buffer and string builder

  • @NikhilR07
    @NikhilR07 Před rokem +1

    Excellent sir🤗

  • @tedclayton4509
    @tedclayton4509 Před rokem

    How come when I use the same endpoints you're using my program isn't as reactive as yours. In other words as I hover over "rev" I should see 4 and then 43 etc.

  • @maheshreddygade8616
    @maheshreddygade8616 Před 4 lety +6

    That logic got failed if you give a number at last "0" like 890
    output: 98 only

  • @Vijaykumar-be1ne
    @Vijaykumar-be1ne Před 5 lety +1

    Thank you very much sir make more videos related to strings and arrays also

  • @DoItBySuren
    @DoItBySuren Před 4 lety +1

    Best explanation ever.

  • @abhijeetbhatt9772
    @abhijeetbhatt9772 Před 3 lety +1

    for the first approach, it won't work with 230 or no module number. for 230 it will show 32 how can we achieve 032 that with the first method

    • @simrangupta1412
      @simrangupta1412 Před 3 lety +2

      import java.util.Scanner;
      public class ReverseNumber {
      public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      System.out.println("Enter a number");
      String num=sc.next();
      Integer num2 = Integer.parseInt(num);
      int count = 0;
      int count2 = 0;
      char[] s = num.toCharArray();
      for (char s1 : s) {
      if(!String.valueOf(s1).equals("0")){
      break;
      }else {
      count++;
      }
      }
      for(int k=s.length; k > 0; k--) {
      if(!String.valueOf(s[k-1]).equals("0")) {
      break;
      }else {
      count2++;
      }
      }
      //using algorithm
      int rev=0;
      while(num2!=0)
      {
      rev=rev*10 + num2%10;
      num2=num2/10;
      }
      int i = 0;
      String reverse = String.valueOf(rev);
      if(rev == 0) {
      reverse = "";
      }
      while(i

  • @jayalakshmikrishnan1956

    Sir , If i have enetered 121820, with 1st method its showing as 28121, ideally it should be 028121, its stripping the zero here
    please suggest!

  • @redhoodiepro8173
    @redhoodiepro8173 Před rokem +1

    Excellent man

  • @felixgilbert3473
    @felixgilbert3473 Před 3 lety +1

    Thanks you please upload for beginners

  • @manojkuna3962
    @manojkuna3962 Před 2 lety +1

    Thank you sir 🙏

  • @yashumate3404
    @yashumate3404 Před rokem

    Sir direct aisa likh sakhte hai kya??...
    Example 1234 ko reverse Karo bole
    Aur apan ne aisa direct likha toh??
    public class Main {
    public static void main(String[] args) {
    int rev=4321;
    System.out.println("Reverse number is " + rev);
    }
    }
    Aisa karke output 4321 aah raha

  • @chandrashekharb6567
    @chandrashekharb6567 Před 7 měsíci

    Hi Sir , Can you please explain how 1234/10 will be 123
    Is it beacuse we are eliminating the decimal value because we have passed the variable has int =1234

    • @mahimamadhukar4972
      @mahimamadhukar4972 Před 4 měsíci

      Try this
      public class Reverse {
      public static void main(String[] args) {
      int num = 12635;
      String rev = "";
      int rem = 0;
      while(num>=1){
      rem = num%10;
      rev = rev + rem;
      num = num/10;
      }
      System.out.println(rev);
      }

      }

  • @narisap.1038
    @narisap.1038 Před 2 lety +1

    Thank you so much.

  • @aries2aqua
    @aries2aqua Před 2 lety +1

    Thanks so much for this

  • @rumanir
    @rumanir Před 4 lety +3

    please collection videos need for interview

  • @dhirendradubey7374
    @dhirendradubey7374 Před 11 měsíci

    perfect job

  • @user-qm7rb9vp8g
    @user-qm7rb9vp8g Před 6 měsíci +1

    i love you bro, May The Lord of all bless you

  • @balakrishna5786
    @balakrishna5786 Před 2 lety +1

    Super

  • @pakkirareddy1237
    @pakkirareddy1237 Před rokem

    how to enable explanation steps in eclipse sir

  • @swap_s
    @swap_s Před 11 dny

    % is not divided by operator.

  • @SQUADYYT
    @SQUADYYT Před 3 lety +1

    love u sir

  • @neatdesign78
    @neatdesign78 Před 2 lety

    what if the last digit is 0, eg: 120 (I'm getting a wrong answer when the user enter an integer ends with 0)

  • @subrahm
    @subrahm Před 3 lety

    Sir what is the use of append method sir??

  • @human_curiosity1
    @human_curiosity1 Před rokem +1

    Owasome

  • @ShubhamMishra-lo6wz
    @ShubhamMishra-lo6wz Před 3 lety +1

    Sir your StringBuffer approach is wrong as the the output will be a string type not an int type to convert this to int type you need to use below code
    String s = rev.toString();
    int i = Integer.parseInt(s);
    System.out.println(i);
    Thank you

  • @bimaladulalsharma9190
    @bimaladulalsharma9190 Před 4 lety

    Well explained

  • @shiyabandebuche9545
    @shiyabandebuche9545 Před 12 dny

    Screen isn't visible clear

  • @cheremokhothu6596
    @cheremokhothu6596 Před 3 lety

    how do you add space in the middle

  • @nishatislam3495
    @nishatislam3495 Před 3 lety

    thank you very much

  • @zayb007
    @zayb007 Před 2 lety

    Sir can u please explain about append()

  • @aswinirobbi504
    @aswinirobbi504 Před rokem

    i have written like this, is this correct way to write the code.
    int i= 1234;
    while(i!=0) {
    System.out.print(i%10);
    i=i/10;
    }

  • @sadhamhussain1272
    @sadhamhussain1272 Před 2 lety +1

    01234 please tell us how to write program

  • @mdarifhossainchowdhuary1799

    Thanks for your all videos. Can you make some video for DataStructure and Algorithm

  • @ashutoshrai2717
    @ashutoshrai2717 Před 2 lety

    Sir which editor are you using

  • @chanidukarunarathna2126
    @chanidukarunarathna2126 Před 3 lety +1

    Wow

  • @snehalghatage732
    @snehalghatage732 Před rokem

    sir can you take mock interview??? we will pay for that. plz reply

    • @sdetpavan
      @sdetpavan  Před rokem

      I take free mock interviews. You can send your profile to my email ID. I will schedule an interview.

    • @snehalghatage732
      @snehalghatage732 Před rokem

      @@sdetpavan thank you so much

  • @gsuresh1568
    @gsuresh1568 Před rokem

    sir mobileNumber how to Write reverse

  • @saikiranpalugula802
    @saikiranpalugula802 Před 4 lety

    Sir is the below approach valid
    Int num = 1234;
    While(num!=0)
    {
    Int n = num%10;
    num = num/10;
    System.out.print(n);
    }

  • @HallOfMemeYT
    @HallOfMemeYT Před 2 lety

    first approach is totally wrong and shouldnt be in practice , try reversing 100 using this approach , it will give only 1.which is not reverse.instead take a string input and use reverse string approach to reverse a number.Just for the time.

  • @Introvert_Explorer791
    @Introvert_Explorer791 Před 3 lety +1

    some noise sound is coming sir its annoying disturbing ur teaching and me also

  • @imagined7596
    @imagined7596 Před 9 měsíci

    but 10 20 50 can't be reverse.. because the result is 05 02 01

    • @imagined7596
      @imagined7596 Před 9 měsíci

      how the solution that problem sir.. thanks

  • @meyheangnhem-9049
    @meyheangnhem-9049 Před 3 lety

    Hello

  • @rajasekhar8650
    @rajasekhar8650 Před 4 lety +1

    Nageswara rao sir student😂

  • @GanesanDinesh
    @GanesanDinesh Před rokem

    Hi, thanks for your videos
    Could you please check this
    import java.util.Scanner;
    public class ReverseNumber {
    public static void main(String[] args) {
    System.out.println("Please enter the number");
    Scanner sc = new Scanner(System.in);
    String input = sc.nextLine();
    System.out.println("User entered "+ input);
    //Method 1
    StringBuffer sb = new StringBuffer(input);
    System.out.println("Reverse number is " +sb.reverse());
    //Method2
    StringBuilder sbi = new StringBuilder(input);
    System.out.println("Reverse number is " +sbi.reverse());
    }
    }

  • @sodaspicy6137
    @sodaspicy6137 Před 3 lety

    Thank you!