Accenture interview question

Write a Java code and sum of odd and even numbers in groups