Hi all,
I would say I'm pretty new to this but could someone explain the basics about data types, more specifically Integers, characters, boolean, string and floating-point numbers.
Many thanks!
Hi all,
I would say I'm pretty new to this but could someone explain the basics about data types, more specifically Integers, characters, boolean, string and floating-point numbers.
Many thanks!
For which programming language? For Java, you can find a good introduction and overview in the lessons Primitive Data Types and Numbers and Strings of Sun's Java tutorials.
No doubt someone will provide a good run down of these types however you could simply read this:-
The Primitive data type on Wikipedia seems to be a good starting point.
Types or datatypes say what kind of information You are able to store in variable.
It is like You will assume that You have in You pocket wallet with datatype money, thus You are able store money there but not keys.
Datatypes You provided:
Integer can store whole numbers: 5 12937 1298273
can't store number with fractional part: 123.43 234.534634643 12452352.1235
can't store strings: "hello" "nice to meet You"
floating point can store whole number and this with fractional part: 5 12937 1298273 123.43 234.534634643 12452352.1235
can't store strings: "hello" "nice to meet You"
Characters can store single chars: "a" "n" "d"
can't store whole strings: "hello" "nice to meet You"
Boolean can store logical values, logical value answers the question if something is: True False
Physically booleans can be represented in different way: True could be 1 or any value except 0 and False can be 0 (like in C like languages)