java opperators | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

java opperators

what is the solution of int result x i am dont understand

4th Feb 2019, 6:56 PM
The_ GarciX
The_ GarciX - avatar
4 Answers
+ 3
We don't understand your question please write clearly?
4th Feb 2019, 7:02 PM
Saad Mughal
Saad Mughal - avatar
+ 4
I'm assuming this is one of the tutorial questions. int x = 2; int y = 5; int result = x+y; // result here equals 7 Java assignes primitive types by there value so what ever value x and y was assigned to these 2 numbers are added together and the new value is then assigned to result When you print result the value of x+y is printed to console.
4th Feb 2019, 11:06 PM
D_Stark - avatar
+ 1
The_ GarciX No problem bro my English is also not to good. Best of luck
8th Feb 2019, 8:04 AM
Saad Mughal
Saad Mughal - avatar
Saad Mughal sorry I'm bad to wrute in english I should write better
7th Feb 2019, 6:54 PM
The_ GarciX
The_ GarciX - avatar