Question: Part 2 Create a class called fun. Add to the class a static integer variable called count. Add a constructor that has count++; Add a
Part 2
Create a class called fun.
Add to the class a static integer variable called count.
Add a constructor that has count++;
Add a function getCount() { return count ; }
Instantiate 4 instance of the class. F1, F2, F3 and F4.
Print out the value of count for each instance.
What do you note about the static variable called count ?
Filename: week6YourNameProgStatic
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
