OOPs Interview Question and Answers
26. |
What is called unboxing? |
|
A technique which converts the object type back to its value type is called unboxing.
|
|
|
27. |
What is the use of out keyword? |
|
- Output parameters are used to pass results back to the calling method.
- It is achieved by declaring the parameters with an "Out" keyword.
- It does not create new storage location
|
|
|
28. |
Define Interface. |
|
- Interfaces are syntactically similar to abstract classes.
- However, in an interface, no method can include a body.
- The interface provides no implementation; it specifies what must be done, but not how.
|
|
|
29. |
List any four over loadable operators. |
|
-
Binary rithmetic → +, -, *, /, %
-
Binary Bitwise → &, |, ^, <<, >>
-
Unary Arithmetic → +, -, ++, --
-
Unary Bitwise → true, false, !, ~
-
Logical operators → ==, !=, >=, <=,>
|
|
|
30. |
Define Jagged Array. |
|
- A Jagged array is an array of arrays in which the length of each array can differ.
-
A Jagged array can be used to create a table in which the lengths of the rows are not same.
-
Jagged array are declared by using sets of square brackets to indicate each dimension.
|
|
|
123456789101112
Page 6 of 12