+ 2

Lab work! Help:)

Task: Write a console program that prints result of bit shift operators for integer variable.

15th Mar 2018, 1:19 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
18 Answers
+ 6
Oh, nice once I visit...) im from Ukraine
16th Mar 2018, 12:33 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 5
Use the '<<' or '>>' or '>>>' operators.
15th Mar 2018, 2:26 PM
Geo
Geo - avatar
+ 5
This exemple will perhaps help you : int start = 10; System.out.println(start); System.out.println(start >> 1); // Divide by 2 System.out.println(start << 1); // Multiply by 2
15th Mar 2018, 2:41 PM
Geo
Geo - avatar
+ 5
Be careful with integer division : 5 / 2 = 2 and not 2.5. You lost the decimal...
15th Mar 2018, 2:53 PM
Geo
Geo - avatar
+ 5
I develop in Java 😉, among others.
15th Mar 2018, 3:07 PM
Geo
Geo - avatar
+ 5
Congrats ☺.
16th Mar 2018, 12:17 PM
Geo
Geo - avatar
+ 5
Belgium. And you ?
16th Mar 2018, 12:30 PM
Geo
Geo - avatar
+ 5
I have never been to Ukraine, sorry 😕. Are you studying computer science ?
16th Mar 2018, 12:38 PM
Geo
Geo - avatar
+ 5
Yes, I study Java)) it is interesting and perspective)
16th Mar 2018, 1:02 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 5
Do you have viber?
16th Mar 2018, 1:02 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 5
No, I am not very connected for a computer scientist 😯. Only Gmail. The Java community is very large. You can find a lot of tutorial on the net. Since how long have you begin with Java?
16th Mar 2018, 1:21 PM
Geo
Geo - avatar
+ 3
Thank you so much))
15th Mar 2018, 2:43 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 3
2.5 it will be double
15th Mar 2018, 2:55 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 3
You look professional in Java)
15th Mar 2018, 2:55 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 3
Geo)) thanks, I done my work
16th Mar 2018, 11:35 AM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 3
Where are you from?
16th Mar 2018, 12:29 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 2
Ooh, it is the most difficult for me..
15th Mar 2018, 2:29 PM
Anastasia Kolesnikova
Anastasia Kolesnikova - avatar
+ 2
hi anastasia
16th Mar 2018, 6:22 PM
mojix
mojix - avatar