MCQs > IT & Programming > JSharp - J# > You have defined a static method to divide two integers: 1 public static int divide(int a,int b) throws Exception 2 { 3 if(b==0) 4 throw new Exception('Invalid Value for denominator'); 5 else 6 return (a/b); 7 } Which of the following statements is correct?

JSharp - J# MCQs

You have defined a static method to divide two integers:

1        public static int divide(int a,int b) throws Exception
2        {
3                if(b==0)
4                        throw new Exception("Invalid Value for denominator");
5                else
6                        return (a/b);
7        }

Which of the following statements is correct?

Answer

Correct Answer: The method syntax is correct

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JSharp - J# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More JSharp - J# MCQ Questions

search

JSharp - J# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it