Java Progaramming
Question 1: For constructor overloading, each constructor must differ in ___________ and __________
Number of arguments and type of arguments Number of arguments and return type Return type and type of arguments Return type and definition
Object s3, syntax error Only object s1 and s2 will be created Program runs and all objects are created Program will give compile time error
s1 then s2 then s3 s3 then s2 then s1 s2 then s3 then s1 none of the above
2 3 4 5
class student{ public: int student(){} }; class student{ public: void student (){} }; class student{ public: student{}{} }; class student{ public: student(){} };
A() B() C() Recursion
Class Constructor New Trigger
Number of score out of 7 = Score in percentage =