Ask Question
15 September, 01:51

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.

+1
Answers (1)
  1. 15 September, 03:06
    0
    public class Acc2{

    private int sum = 0;

    public int getSum () {

    return sum;

    }

    }

    Explanation:

    see answer
Know the Answer?
Not Sure About the Answer?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers