Advertisements
Advertisements
प्रश्न
Observe the following code. It may contain Syntax, Logical or runtime errors. Execute it in Java and identify the error, if any. Rewrite the code without the error. Also write the aim of the code.
void fnMax(int n1, int n2)
{
int max = (n1 > n2) ? n1:n2;
return max;
}कोड लेखन
Advertisements
उत्तर
class Maximum
{
int fnMax(int n1, int n2)
{
int max = (n1 > n2) ? n1 : n2;
return max;
}
}
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
