When are _ and $ used in Java ? List their uses to support your answer .
Happy Republic Day
pls help me out ...
Answers
Answered by
1
The underscore ( _ ) and the dollar sign ( $ ) are mostly used in naming of identifiers.
They are the only special characters allowed in naming of an identifier.
Though underscore can also be used to put break between numbers for better readability.
For Example -
String data$ = "Something";
int prime_number = 13;
Also,
long number = 1_00_00_000;
Similar questions