Accenture Interview Question

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