+ 4
Why in java the s in String is capital but for other variables it is small.
24 Answers
+ 13
Classes are capitalized, primitives lower cased.
String is a class, so it starts with a capital.
+ 9
The primitive datatypes like int, double, float...
Explanation and full list:
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
+ 6
To learn more look for sections on "Data Structures" in various courses.
+ 5
It is a symbol for an array, a list of elements. Individual elements are called indices. So you could have an array of Strings ["my", "name", "is", "Joe"] and you could manipulate it by calling elements by index. The first element is called the zero index.
+ 5
Think of an array as a container with a number of small compartments.
+ 5
each compartment holds a number, or a string.
+ 5
or even a character.
+ 5
By declaring an array you arrange your data into compartments your program can access, analyze, or modify.
+ 4
what are primitives ?
+ 4
Primitiveย types are the most basic data types available within theย Javaย language. There are 8: boolean , byte , char , short , int , long , float and double . These types serve as the building blocks of data manipulation inย Java. Such types serve only one purpose โ containing pure, simple values of a kind.
+ 4
But first play with small arrays, 4 or 5 elements.
+ 4
There are many times than one learns new things here before in lessons.
+ 3
Ok I'll try a little more. Arrays and similar structures like ArrayLists and dictionaries are a central, critical part of programming. They let you work on sets of data including very large sets like tracking cars for a Department of Motor Vehicles or tracking health data or something like air quality in lots of different places.
+ 1
primitives are not capitalized: int, short, boolean, long, char, float, double, byte.
But classes, such as String, Integer and Boolean, are capitalized, by convention.
+ 1
what is the meaning of this symbol [ ]
+ 1
i learn now this things thanks very much
+ 1
okk
+ 1
because String is class
+ 1
because in Java everything is considered as an object or primitive type. String in java is a class not a primitive type so it starts with capital 's'. for primitive types we use small alphabets as first alphabet of it's name.
0
"String" is inbuilt class in java and all inbuilt class names in java start with capital letter