Hello guys,
I'm totally new to Java and I seek some help with this thing.
I know it is too easy for you, but it's not the same for me as I'm playing with Java for 2 months only.
I have this part of the code:
public boolean setPercentages(int A, int B) { A = console.nextInt(); B = console.nextInt(); if (A + B == 100) { return true; } else { return false; }
I want to correct this code so that if the integers sum equals 100, then it returns "true" as well as the method assigns them to courseworkPercentage and examPercentage respectively, otherwise the program
must return false.
I'm confused now and I can not think a simple solution.
Could you help me?
Peter