answersLogoWhite

0

No.

int my variable; <- not a valid declaration

Java naming conventions say that you should use capital letters to differentiate words in a variable name.

int myVariable; <- valid!

Note that you can use the _ (underscore) character, as well, though some people suggest avoiding this.

int my_variable; <- also valid!

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
RossRoss
Every question is just a happy little opportunity.
Chat with Ross
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: Can variable names can have spaces between them?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is there allowed to be spaces in HTML coding?

There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.There can be spaces between the words, but not in the middle of a word.


How and why are variable names used in programming to process data?

Variable names are used so the code is readable. When the code is compiled to machine languages, it no longer uses the variable names to understand it's operations...sometimes variable names are kept as metadata to help debug but the computer does not need them to execute the program...they are for us so we can easily understand what we are doing.


In a DOS batch file how do you copy a local variable to a global variable?

1. Start line with an ENDLOCAL command. 2. Add an ampersand and a SET global = local variable. 3. Repeat step 2 for additional variables. Notes: Works vice versa with the SETLOCAL command. Works in nested arrangements of SETLOCAL and ENDLOCAL. Local and global variables can have same names. Spaces are permitted after a SETLOCAL or ENDLOCAL but might get added to a variable's value if put after a SET command so recommend avoiding spaces before the second and subsequent ampersands. Spaces are permitted but not required after the ampersand and before a SET command. The first line of this example shows where spaces are allowed, the last line shows where spaces can be omitted. SETLOCAL &amp; SET LTEMP=%TEMP%&amp; SET PATH=%PATH% SET LPATH=C:\BAT;%PATH% SET L1=valueL1 SET P1=valueP1 ENDLOCAL&amp;SET G1=%L1%&amp;SET P1=%P1%&amp;SET PATH=%LPATH%


How do you make a on peace sign HTML?

&amp; #9774 ; all together..No spaces between "&amp;" and #9774..No spaces in between #9774 and ";" &amp;#9774;


WAP to show the difference between a variable and static variable?

difference between constant and static variables in java