Question: 1 -
Which of the following can be operands of arithmetic operators?
-
Characters
-
Both Numeric & Characters
-
Numeric
-
Boolean
Answer:
Both Numeric & Characters
Solution:
The operand of arithmetic operators can be any of numeric or character type, But not boolean.
The operand of arithmetic operators can be any of numeric or character type, But not boolean.
Question: 2 -
Decrement operator, −−, decreases the value of variable by what number?
-
3
-
2
-
1
-
4
Answer:
1
Solution not available.
Question: 3 -
Which of these statements are incorrect?
-
Assignment operators are more efficiently implemented by Java run-time system than their equivalent long forms
-
Assignment operators run faster than their equivalent long forms
-
Assignment operators can be used only with numeric and character data type
-
None of the mentioned
Answer:
None of the mentioned
Solution not available.
Question: 4 -
Can 8 byte long data type be automatically type cast to 4 byte float data type?
-
can not say
-
TRUE
-
FALSE
-
Can be true or false
Answer:
TRUE
Solution:
Both data types have different memory representation that is why 8-byte integral data type can be stored to 4-byte floating point data type.
Both data types have different memory representation that is why 8-byte integral data type can be stored to 4-byte floating point data type.
Question: 5 -
Modulus operator, %, can be applied to which of these?
-
None of the mentioned
-
Both Integers and floating - point numbers
-
Floating - point numbers
-
Integers
Answer:
Both Integers and floating - point numbers
Solution:
Modulus operator can be applied to both integers and floating point numbers.
Modulus operator can be applied to both integers and floating point numbers.