Results 1 to 3 of 3
Thread: Help with a program
- 06-16-2009, 08:29 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 2
- Rep Power
- 0
Help with a program
Write a program with two constant values, one with alternating binary ones and zeroes, with a zero in the least-significant digit, and the second, also alternating, with a one in the least-significant digit (hint: It’s easiest to use hexadecimal constants for this). Take these two values and combine them in all possible ways using the bitwise operators, and display the results using Integer.toBinaryString( ).
Repeat Exercise using the ternary operator and a bitwise test to display the ones and zeroes, instead of Integer.toBinaryString( ).
This is a question from TIJ4
I have done the first exercise but unable to do second.I cann't understand it.I couldn't think of anything about it.
Please explain something about the question and how to proceed.
I am new to java.Your help will be appreciated.
- 06-16-2009, 09:01 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,545
- Rep Power
- 11
Also posted at Sun Forums: Java Programming - Help On a Program
-
Similar Threads
-
Execute A program from a Program!
By Moncleared in forum Advanced JavaReplies: 2Last Post: 02-22-2009, 04:17 PM -
Executing a program within a program
By gibsonrocker800 in forum New To JavaReplies: 5Last Post: 05-12-2008, 08:24 AM -
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:40 PM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 09:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks