โ Back to Interfaces
Question 600
Void Method and State in an Interface
Void Method and State in an Interface
The interfaceICounterdeclares aValueproperty and avoid Increment()method. CompleteIncrementso it adds 1 to the private field_value. Do NOT write aMainmethod. After the tester callsIncrement()three times, the program prints: 3
Expected Output:
3
Topics:
Interfaces
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.