COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
types of operators
|
|
types of functions
|
|
types of data types
|
|
types of programming languages
|
Detailed explanation-1: -Data types are divided into two groups: Primitive data types-includes byte, short, int, long, float, double, boolean and char. Non-primitive data types-such as String, Arrays and Classes (you will learn more about these in a later chapter)
Detailed explanation-2: -The INTEGER data type stores whole numbers that range from-2, 147, 483, 647 to 2, 147, 483, 647 for 9 or 10 digits of precision. The number 2, 147, 483, 648 is a reserved value and cannot be used.
Detailed explanation-3: -int − Used to store an integer value. char − Used to store a single character. float − Used to store decimal numbers with single precision. double − Used to store decimal numbers with double precision.
Detailed explanation-4: -Most commonly used data types in Java are int (integer), char (character), float (number having decimal), double (number having decimal), String (collection of characters) and boolean (true or false).