Why is the variables String and Boolean capitalized? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why is the variables String and Boolean capitalized?

Java syntax

27th May 2018, 7:41 AM
Luther Conley
6 Answers
+ 20
Because they are classes, not primitives. Integer is the wrapper class of int's, etc...
27th May 2018, 7:47 AM
Valen.H. ~
Valen.H. ~ - avatar
27th May 2018, 10:45 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 3
Each primitive datatype has a wrapper class, which need to be distinguished from the datatype itself
27th May 2018, 7:55 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
The answer is these variables are not numbers variables, but treated as strings. The place in memory number variables and string variables are treated differently by compiler. Again the software designers create the rules for compilng the selected language. Sometime we as humans forget intelligent electronics devices only understand 0's and 1"s. All computer programs no matter the language are reduced to machine language by compiler!. The circuits in the electronics devices use Logic such as OR, AND, NAND, OR, NORD FLIP-FLOPS, CPUs Registers, etc. to community with humans. Most of these things no longer concern most programmers today. Memories of computers today are inexpensive!
27th May 2018, 8:06 AM
Luther Conley
0
I have posted my opinion on Strings already!!
27th May 2018, 9:03 AM
Luther Conley
0
Ask someone that designs compiler. My previous statement pointed to designers that are over sixty years of age. The stacks and smaller memories means the programmers programmed mostly in Assembler language, which means the programmers push and pop registers. They used 1/1000 the memory used today by programmers.
29th May 2018, 4:51 AM
Luther Conley