MyClass#,Myclass$,1MyClass, in these which of the invalid class name, give reason | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

MyClass#,Myclass$,1MyClass, in these which of the invalid class name, give reason

5th Aug 2020, 2:01 PM
Firoz Khan
Firoz Khan - avatar
2 ответов
+ 4
Always start the class name with capital letter (this is different from how the variables are named).
5th Aug 2020, 2:37 PM
Rohit
+ 1
Class name and id must not start with number and must not contain any special character. Try a-z , A-Z, _ and number inbetween alphbate or last to alphbates
5th Aug 2020, 2:27 PM
Divya Mohan
Divya Mohan - avatar