Exercises
Change the following program to use compound assignments
Type: Posts; User: ohad
Exercises
Change the following program to use compound assignments
i post it cuz its homework and i don't understand it
sorry but i don't know what u mean i am new to java if u can explain more detail it will be great thanks.
class BicycleDemo {
public static void main(String[] args) {
// Create two different
// Bicycle objects
Bicycle bike1 = new Bicycle();
Bicycle bike2 = new...
hi i am new to java and i find it a bit hard for me to understand object oriented and binary Operator Result
maybe a video will help.
~ Bitwise unary NOT
& Bitwise AND
| Bitwise OR
int a = 1;
int b = 2;
int c;
int d;
c = ++b;//3
d = a++;//2
c++;//4
System.out.println("a = " + a);
System.out.println("b = " + b);
System.out.println("c = " + c);
so what the result of c = c + a * b;
--- Update ---
what the result of c = c + a * b;
ok but how i do it a*b is 2 and then how do i do c=c&6
public class NewClass4 {
public static void main(String[] args) {
int a = 1;
int b = 2;
int c = 3;
a += 5;
b *= 4;
c += a * b;
c %= 6;
System.out.println("a = " + a);