By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,034 Members | 822 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,034 IT Pros & Developers. It's quick & easy.

Java Application

P: 9
Can you write a java application that calculates the value of the following expressions
a+=b/c%d++ and bx<<=8

The range of values for a=5, b=5, c=3, and d=2
bx values are -1,0,1,2,3,7,16
Dec 10 '06 #1
Share this Question
Share on Google+
7 Replies


DeMan
100+
P: 1,806
yes .
Dec 10 '06 #2

10K+
P: 13,264
Can you write a java application that calculates the value of the following expressions
a+=b/c%d++ and bx<<=8

The range of values for a=5, b=5, c=3, and d=2
bx values are -1,0,1,2,3,7,16
You need to show some of your own effort first before people can start helping you out.
Dec 11 '06 #3

P: 1
You need to show some of your own effort first before people can start helping you out.

Hello, I need the same help. I got to write a java application a+=b/c%d++
a=5, b=4, c=3, and d=2 and bx<<=8

I can send you what I have been working with if you want me to. Thanks
Jan 26 '07 #4

Expert 100+
P: 1,510
Hello, I need the same help. I got to write a java application a+=b/c%d++
a=5, b=4, c=3, and d=2 and bx<<=8

I can send you what I have been working with if you want me to. Thanks
post the code you have been working on then we can try to help
Jan 27 '07 #5

10K+
P: 13,264
Hello, I need the same help. I got to write a java application a+=b/c%d++
a=5, b=4, c=3, and d=2 and bx<<=8

I can send you what I have been working with if you want me to. Thanks
Yes, please send the program that you have written.
Jan 29 '07 #6

P: 36
Can you write a java application that calculates the value of the following expressions
a+=b/c%d++ and bx<<=8

The range of values for a=5, b=5, c=3, and d=2
bx values are -1,0,1,2,3,7,16

I think the value of a will be 5 ??right???
but I don't know what does he mean and want bat the expression "bx<<=8"
Jan 29 '07 #7

hirak1984
100+
P: 316
here is a sample code
Expand|Select|Wrap|Line Numbers
  1. public class MM {
  2. public  static void main(String args[])
  3. {
  4.     int a=5,b=5,c=3,d=2;
  5.     int bx[]={-1,0,1,2,3,7,16};
  6.     System.out.println(a+=b/c%d++ );
  7.     for(int i=0;i<7;i++)
  8.     System.out.println(bx[i]<<=8);
  9. }
  10. }
and here is the sample outputs:
Expand|Select|Wrap|Line Numbers
  1. 6
  2. -256
  3.  
  4. 256
  5. 512
  6. 768
  7. 1792
  8. 4096
anybody please tell me if i am wrong .
Jan 30 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.