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.
int fnMin(int n1, int n2)
{
return (n1>n2)? n1:n2);
}
कोड लेखन
Advertisements
उत्तर
class Minimum
{
int fnMin(int n1, int n2)
{
return(n1<n2) ? n1:n2;
}
}
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: User-Defined Methods - Exercises [पृष्ठ ९२]
