1.

Correct way of defining constructor of the given class as and when objects of classes are created is:
maths s1 = new maths(); maths s2 = new maths(5, 5.4f);
 a) public maths(int pp, single tt) { p = pp; t = tt; } b) sample s; c) public sample() { p = 0; t = 0.0f; } public sample(int pp, single tt) { p = pp; t = tt; } d) s = new sample();  

A. A
B. B
C. C
D. D
Answer» B. B


Discussion

No Comment Found