Variables and Mathematical Operators

Variables and Mathematical Operators

TOTAL POINTS 3
1.Question 1
Consider the following Java statements.

1
2
3
4
int a = 5;
int b = 3;
int c = 4;
c = a + b ;
What is the value of c after these lines execute?
1 point
2.Question 2
Consider the following Java statements.

1
2
3
int a = 1 ;
int b = a + 2 ;
int c = b + b ;
What is the value of c after these lines execute?
1 point
3.Question 3
Consider the following Java statements.

1
2
3
int a = 3 ;
int b = 1 ;
int c = 2 + a * 5 - b ;
What is the value of c after these lines execute?
1 point

تعليقات