Ask Question
27 August, 09:52

Write a class named Acc2 containing: An instance variable named sum of type integer, initialized to 0. A method named getSum that returns the value of sum.

+2
Answers (1)
  1. 27 August, 11:41
    0
    public class Acc2{

    private int sum = 0;

    public int getSum () {

    return sum;

    }

    }

    Explanation:

    see answer
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a class named Acc2 containing: An instance variable named sum of type integer, initialized to 0. A method named getSum that returns ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers