Ask Question

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. 17 October, 14:56
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers