- 2
Lesson 6.1 error in the answer
There is a problem: It was taught: int x = 6 + 3; But the Answer is: int var = 5 I consider this wrong because the "X" is missing But the Answer must be: int x var = 5 "int" is a command to enter the subject cannot disappear x = the correction is requested to the technical team of sololearn, Thanks ... Note: Please return my five (5) PDUs
2 Answers
+ 4
Mario Julian Ramon Montoya
There is nothing wrong. int x = 6 + 3; is an example to declare variable x of type integer.
So in question there is Integer value given and a variable var is given so you have to fill the blank with data type and given value 5.
Remember 5 is a numeric value so its data type would be int.
You need to learn again about variable and data types
https://www.sololearn.com/learning/2139/
If you didn't understand it doesn't mean that question is wrong. You have to clear about concepts.
+ 2
Do you mean the 6.1 in the Java course? I don't see an error there.
Why do you think there should be an x? The variable in the quiz is called "var" not "x"...