COMPUTER PROGRAMMING FUNDAMENTALS
PROGRAMMING LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Integer
|
|
Float
|
|
Decimal
|
|
String
|
Detailed explanation-1: -Primitive Data Types: int, long, char, byte, short, boolean, etc. Non-Primitive Data Types: Array, Class, String, Interface.
Detailed explanation-2: -In JavaScript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods or properties. There are 7 primitive data types: string. number. bigint.
Detailed explanation-3: -Non-Primitive data types refer to objects and hence they are called reference types. Examples of non-primitive types include Strings, Arrays, Classes, Interface, etc.
Detailed explanation-4: -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-5: -The string data type is a non-primitive data type but it is predefined in java, some people also call it a special ninth primitive data type. This solves the case where a char cannot store multiple characters, a string data type is used to store the sequence of characters.