what are the rules to assign a variable in a java programming
Answers
Answered by
16
the rules for assigning a variable are :-
1.the variable should always begin with an alphabet or an underscore.
2. the variable name cannot include spaces.
3. the name cannot include keywords
4. They are case sensitive. Hence small and capital A have different meanings
please mark brainliest answer
Answered by
5
SOME RULES ARE-
1.DONT USE ANY RESERVED KEYWORD AS A VARIABLE . IT CAN BE VAGUE BECOZ JAVA IS A RESERVED LANGUAGE AND ALSO CASE SENSITIVE.
2.THE VALUE WHILE ASSIGNING A VARIABLE MUST NOT CHANGE .
3.ALSO THE VARIABLE NAME IS IF TWO AND SEPERATE THEM ONLY BY UNDERSCORE (_).FOR EXAMPLE-WELCOME_INDIA
HOPE IT HELPED
WELL!!! NOT FORCING U TO MARK AS BRAINLIEST ....BUT STILL IF U LIKED U CAN MARK!:-)
Similar questions
Business Studies,
7 months ago
Science,
7 months ago
Chemistry,
1 year ago
Math,
1 year ago
Math,
1 year ago