Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 08-01-2017, 03:00 AM   #1
sonakshibhathi
Registered User
 
Join Date: Jul 2017
Posts: 10
How to reverse an integer in Java?

Hi friends,
How to reverse an integer in Java?
please suggest to know..
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
sonakshibhathi is offline   Reply With Quote

Old 08-02-2017, 04:53 AM   #2
jackkodell12
Registered User
 
Join Date: Aug 2013
Posts: 103
Modding (%) the input int by 10 will extract off the rightmost digit. example: (1234 % 10) = 4.
Multiplying an integer by 10 will "push it left" exposing a zero to the right of that number, example: (5 * 10) = 50.
Dividing an integer by 10 will remove the rightmost digit. (
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jackkodell12 is offline   Reply With Quote
Old 03-18-2019, 03:38 AM   #3
adityadev
Registered User
 
Join Date: Jul 2017
Posts: 86
Java program to reverse a number. import java.util.Scanner; class ReverseNumber. { public static void main(String args[]) { int n, reverse = 0; System. out. println("Enter an integer to reverse"); Scanner in = new Scanner(System. in);
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
adityadev is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Jobs In Pune: A Career and Growth Perspective arshi1586 Java 1 01-19-2017 03:59 PM
Have you ever wondered what is inside a java class file? cianfie Java 6 01-28-2015 11:09 PM
Do you know about Reverse SEO? christyronaldo1 General Discussion 7 12-23-2013 05:14 AM
The conclusion provided by the Black Hat Java Script andrebreton2121 Search Engine Optimization 6 10-17-2012 11:06 PM


All times are GMT -7. The time now is 02:02 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.