Chapter 3 - Values and Data Types - Solutions For Class 10 ICSE Logix Kips Computer Applications With BlueJ Java - KnowledgeBoat
Chapter 3 - Values and Data Types - Solutions For Class 10 ICSE Logix Kips Computer Applications With BlueJ Java - KnowledgeBoat
Question 4
Question 5
1. Token ✓
2. Identifier
3. Keyword
4. Method
Question 6
1. Keyword
2. Identifier
3. Operator
4. Procedure ✓
Question 7
Question 8
1. _room
2. $PayAmount
3. 10thClass ✓
4. nullValue
Question 9
1. 0
2. 0float
3. 0f
4. 0.0f ✓
Question 10
1. true
2. false ✓
3. null
4. void
Question 11
1. 2222
2. 22222
3. 222 22 ✓
4. 222
Question 12
1. '\n'
2. "n" ✓
3. 'n'
4. All of these
Question 13
1. ; ✓
2. .
3. ,
4. All of these
Question 14
1. boolean
2. short
3. float
4. class ✓
Question 15
1. 32 bits
2. 64 bits ✓
3. 48 bits
4. Long data type is not supported in
Java.
Question 16
1. 1 bit
2. 16 bits
3. 8 bits ✓
4. Boolean data type does not take any
space in memory.
Question 17
1. //
2. /* */
3. \
4. Both A and B ✓
Question 18
1. const
2. constant
3. static
4. final ✓
Question 19
1. 65-90 ✓
2. 66-91
3. 97-122
4. 98-123
Question 20
1. array
2. interface
3. class
4. boolean ✓
Question 1
Java supports the use of the ASCII
character set only.
False
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Question 9
Question 10
Question 11
Question 12
Question 13
Question 14
Assignment Questions
Question 1
Answer
Question 2
Answer
Answer
(3 + 6 * 7) / 3 + 2
⇒ (3 + 42) / 3 + 2
⇒ 45 / 3 + 2
⇒ 45 / 3 + 2
⇒ 15 + 2
⇒ 17
Question 4
Answer
Question 5
Answer
Question 6
Answer
Question 7
Answer
Question 8
Answer
Question 9
i. ten
ii. "Hello"
iii. 5678
iv. Coffee
v. $dollar
vi. 4Variables
vii. _var
Answer
Question 10
Answer
Question 11
Answer
Token Identifier
Identifiers are
fundamental
Each individual building blocks of
component of a the program and
programming are used to name
statement is different
referred to as a components of a
token. program such as
variables, methods
and objects.
Tokens in Java
Identifier is a type
are categorised
of token in Java.
into 5 types —
Token Identifier
Keywords,
Identifiers,
Literals,
Punctuators,
Operators.
Answer
Keyword Identifier
Keywords are
reserved by
An identifier must not
the compiler
be a Keyword.
for its own
use.
Answer
Character
String Constant
Constant
written by
enclosing a set of
enclosing a
characters within
character within a
a pair of double
pair of single
quotes.
quotes.
Character
String Constants
Constants are
are assigned to
assigned to
variables of type
variables of type
String.
char.
Answer
Float Constants
Integer Constants represent
represent whole fractional
number values numbers like
like 2, -16, 18246, 3.14159, -14.08,
24041973, etc. 42.0, 675.238,
etc.
Integer Constants
Float Constants
are assigned to
are assigned to
variables of data
variables of data
type — byte,
type — float,
short, int, long,
double
char
Question 12
Answer
Question 13
Answer
Question 14
Answer
Question 15
Answer
byte 1
short 2
int 4
long 8
float 4
double 8
char 2
boolean 1
Question 16
Answer
Question 17
What is variable initialisation in Java?
What are the default values of the
following type of variables? short, int, long,
float, double, and char.
Answer
short 0
int 0
long 0L
float 0.0f
double 0.0d
char '\u0000'
Question 18
Answer
int xCoordinate = 0;
int yCoordinate = 0;
OR
Question 19
Answer
Question 20
Answer
Question 21
Answer
Question 22
Answer
Question 23
Answer
Question 24
Answer
Question 25
char x, y;
x = 'y';
System.out.println(x);
y = 'z';
System.out.println(y);
x = y;
System.out.println(x);
Answer
Video Explanations