Can I use String variable name as a alphanumeric variable name? also can we decleare a line including blank spaces as input? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can I use String variable name as a alphanumeric variable name? also can we decleare a line including blank spaces as input?

ex: String Soup18="I aM aWeSoMe"

18th Aug 2016, 10:28 PM
Souparna Biswas
Souparna Biswas - avatar
2 Answers
+ 1
Anytime you wanna know whether or not you can do something. Try coding it first, then copy/print it to us if there's an error.
19th Aug 2016, 5:49 AM
James
James - avatar
0
yes you can try this public class Program { public static void main(String[] args) { String playing11; playing11="you are in playing11"; System.out.println(playing11); } } prints the string elements.
19th Aug 2016, 3:54 AM
rajat kumar raicha
rajat kumar raicha - avatar