permaculture playing cards*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes numbers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "numbers" Watch "numbers" New topic
Author

numbers

shabbir zakir
Ranch Hand

Joined: Nov 12, 2000
Posts: 183
hi!
how does numbers are represanted in java.for instance how
number 4 is represented.how to convert any number in binary
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3254
    
    2
There is a static method toBinaryString(int) in Integer class. Play with it a little and you'll understand.
-Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Shabbir,
I've some notes on working with binary, hex, and octal numbers at http://webhome.idirect.com/~jgriscti/oper/binhex.html.
Hope they help.
------------------
Jane
The cure for boredom is curiosity.
There is no cure for curiosity.
-- Dorothy Parker


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: numbers
 
Similar Threads
printf wildcards
Explaination for BITWISE OPERATIONS
How would you approach this question...
Random numbers without repeatation
print out random number and state odd/even