MCQOPTIONS
Saved Bookmarks
| 1. |
Which of the following is the correct way to define the constructor(s) of the Sample class if we are to create objects as per the C#.NET code snippet given below? |
| A. | public Sample() { i = 0 ; j = 0.0 f; } public Sample ( int ii, Single jj) { i = ii; j = jj; } |
| B. | public Sample (Optional int ii = 0 , Optional Single jj = 0.0 f) { i = ii; j = jj; } |
| C. | public Sample ( int ii, Single jj) { i = ii; j = jj; } |
| D. | Sample s; |
| Answer» B. public Sample (Optional int ii = 0 , Optional Single jj = 0.0 f) { i = ii; j = jj; } | |