Advertisements
Advertisements
प्रश्न
Consider the following program segment and answer the questions below:
class calculate
{
int a;double b;
calculate()
{
a=0;
b=0.0;
}
calculate(int x, double y)
{
a=x;
b=y;
}
void sum()
{
System.out.println(a*b);
}}
Name the type of constructors used in the above program segment.
एक पंक्ति में उत्तर
Advertisements
उत्तर
Default constructor, Parameterized Constructor
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
