- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Which of the following ways to create an object of the Sample class given below will work correctly?

class Sample
{
    int i;
    Single j;
    double k;
    public Sample (int ii, Single jj, double kk)
    {
        i = ii;
        j = jj;
        k = kk;
    } 
}

1.Sample s1 = new Sample();

2.Sample s1 = new Sample(10);

3.Sample s2 = new Sample(10, 1.2f);

4.Sample s3 = new Sample(10, 1.2f, 2.4);

Posted Date:-2021-02-24 11:05:30


More MCQS Questions and answers

Search