Mark the following declarations as correct/incorrect
string ‘student’; float Double; int double; double username char ‘a’;
confused variable name assignment... string ‘student’; //incorrect. String not string. cannot use '' in variable name. String student; //suggested correction float Double; //valid. but confusing and not recommended because double is a reserved keyword and capitalized variables are generally used for class names. float average; //suggest a more practical name. int double; //incorrect. double is a reserved keyword and must not be used as variable name. double username //incorrect. it is not properly terminated with a semicolon ";" double username; //suggested correction //char ‘a’; //incorrect. cannot use '' in variable name. char a; //suggested correction
but you still try to be diligent to think and show your opinion
Try to run it and the compiler will tell you if they are not valid. You can just start a new Java code bit on Sololearn for that. As far as I can tell only 1 line is valid (although it is not encouraged).
Hi! it is interesting to see what your opinion on this matter is. share?
It's an assignment and I'm not completely sure about my answers
How do I generate a list with <N> unique elements randomly selected from another (already existing) list?
Given three integer matrices A(m*n),B(m*n) and C(m*n) . Print the one with more zero elements. beside code
I'm coding this for hours & can't make the value of the 5 random numbers round off to 2 decimal places like in the examples
Overloading + operator
( NEED HELP ) Halloween candy