Are constants declared the same way as variables? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Are constants declared the same way as variables?

30th Aug 2017, 4:57 PM
Yuko
Yuko - avatar
5 Respostas
+ 7
constants are declared by using the keyword "final" e.g. final int x = 5; here the value of x remains constant throughout the code
30th Aug 2017, 5:06 PM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 6
@valery...I'm not any GodšŸ˜‚šŸ˜‚šŸ˜‚.....stop kidding and by the way...you can put the beer relative to itself i.e. anywhere you likešŸ˜‰šŸ˜‰šŸ˜‰
31st Aug 2017, 12:20 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 3
The time for challenges is pressed:-((( I don't have time to calculate:-((( Who faced this problem? Or the higher the level, the less the time???
31st Aug 2017, 7:25 AM
ValšŸÆ
ValšŸÆ - avatar
+ 2
In php define("MYVAR", 3,14159265), where MYVAR is a name and 3,14 is a value; echo MYVAR, no $ sign:-) How are u doing, ChiragGod? Where to put the beer? Relative to u or your cat, dog:-D? Yeah, relative to mešŸ˜
30th Aug 2017, 10:17 PM
ValšŸÆ
ValšŸÆ - avatar
0
what are you talking about? O_o
31st Aug 2017, 2:32 AM
Yuko
Yuko - avatar