ExamVeda
Login
Home
This question belongs to Java Program Java Autoboxing
Java Autoboxing
?

Which of the following is good coding practice to determine oddity?
i)
public boolen abc(int num)
{
	return num % 2 == 1;
}

ii)
public boolean xyz(int num)
{
	return (num & 1)!= 0;
 }

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.