Cheating Network
 
 

Go Back   Cheating Network > Programming > General
Reload this Page Java question



General

This is a discussion about Java question within the General section, where you will General Talk of Programming



Reply
 
LinkBack Thread Tools Display Modes
Old 11-06-2008, 06:48 PM   #1 (permalink)
Senior Member
 
noxify's Avatar
 
Join Date: Jan 2008
Posts: 485
Reputation: 32
noxify is on a distinguished road

cBay Rating:
Send a message via AIM to noxify Send a message via MSN to noxify
Default Java question

How do I grab a digit of a number? For example, I need to grab the first digit for a program I'm making, lets say the number is 542, I need the 2. How do I grab the 2 as a new int?
__________________
noxify is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 11-06-2008, 07:21 PM   #2 (permalink)
Noob Helper
 
Join Date: Dec 2007
Posts: 458
Reputation: 153
grapplinghook has a spectacular aura aboutgrapplinghook has a spectacular aura about

cBay Rating:
Send a message via AIM to grapplinghook Send a message via MSN to grapplinghook Send a message via Yahoo to grapplinghook
Default

you can use modulus division:

int digit = 542 % 10;


or you can convert it to a string then get the digit you want then convert it back to an int.
__________________
For all of my bots, click here

Quote:
Originally Posted by bigpapidh View Post
lmao, I gave my Mom's CC # to a dancing moose once, she wasnt happy.
Quote:
Originally Posted by bigpapidh View Post
there was this dancing moose pop up that asked for a CC #, I did what anyone would do and found someone elses CC and gave it to him, man it was a dancing moose couldnt resist.
grapplinghook is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
java, question


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

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java or c++? zero Chit Chat 10 10-26-2008 07:02 PM
Java Programming Teacher....at 16 Ryutso Chit Chat 19 09-18-2008 04:20 PM
Java Programming Slashmolder General 15 09-04-2008 08:29 AM




Powered by vBulletin
Copyright © 2000-2008 Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.