Page 51 - CA_Blue( J )_Class10
P. 51
8. ………………… is a symbol or sign used to specify a function to be performed in Java programming.
9. ………………… initialization is the assignment of a value to a variable at the time of declaration.
10. The ………………… literals are the numbers with decimal points that may be positive or negative.
11. A ………………… is the name of the memory location.
12. To enclose any relational or mathematical expressions we use ………………….
13. To specifies the size and type of values, we use ………………….
14. The identifier must be different in spelling or case from any ………………….
15. A ………………… is the smallest individual element of a Java program that is meaningful to the compiler.
Answers
1. Dynamic 2. Boolean 3. Implicit 4. Universal Character Encoding Standard 5. Punctuators
6. Boolean 7. Escape sequence 8. Operator 9. static 10. Floating point
11. Variable 12. Parentheses () 13. Data types 14. Keywords 15. Token
C. Answer the following questions:
1. What do you mean by data type?
Ans. A data type is a category that specifies the possible values in a variable or data structure and how those values are stored in the
computer's memory.
2. Define operator.
Ans. An operator is a special symbol that signifies the compiler to perform some specific mathematical or non-mathematical operations
on one or more operands.
3. What is ASCII code?
Ans. ASCII stands for American Standard Code for Information Interchange. It is a character encoding standard for text files on
computers and other devices.
4. What is a primitive data type? Name any two primitive data types.
Ans. Primitive data types are predefined or built-in data types in the Java programming language. These are fundamental or basic data
types. Examples of primitive data types are int and char.
5. Identify the two categories of data types.
Ans. The two categories of data types are primitive and non-primitive.
6. What is the range of char datatype?
Ans. The range of "char" data type is from '\u0000' (or 0) to '\uffff' (or 65,535).
7. The following declaration is of some identifiers:
int a; float b; long c; char d;
Identify the data type of the "dt":
dt = a*10 - b/c * (int)c;
Ans. float
8. Explain the term "type casting".
Ans. Type casting is a process of changing one type value to another type. It is also known as type conversion.
9. What are literals? Give any two examples.
Ans. Literals or constants are values that cannot be changed once assigned. Two examples of literals are:
1. real literal: 3.5 2. String literal: "India"
10. Write one similarity and one difference between long and short data types.
Ans. Similarity: Both data types contain numerical values.
` Difference: The storage capacity of long is larger than the short data type.
long data types short data types
Occupies 64 bits (8 bytes) Occupies 16 bits (2 bytes)
49
Values and Data Types 49

