Question: 1 -
Which of the following can be operands of arithmetic operators?
-
Both Numeric & Characters
-
Numeric
-
Characters
-
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 -
Modulus operator, %, can be applied to which of these?
-
Both Integers and floating - point numbers
-
None of the mentioned
-
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.
Question: 3 -
Can 8 byte long data type be automatically type cast to 4 byte float data type?
-
can not say
-
TRUE
-
Can be true or false
-
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: 4 -
Decrement operator, −−, decreases the value of variable by what number?
-
1
-
4
-
2
-
3
Answer:
1
Solution not available.
Question: 5 -
Which of these statements are incorrect?
-
Assignment operators are more efficiently implemented by Java run-time system than their equivalent long forms
-
None of the mentioned
-
Assignment operators run faster than their equivalent long forms
-
Assignment operators can be used only with numeric and character data type
Answer:
None of the mentioned