package com.codegym.task.task04.task0405;
/*
Setting the number of cats
*/
public class Cat {
private static int catCount = 0;
public static void setCatCount(int catCount) {
//write your code here
this.catCount = catCount;
}
public static void main(String[] args) {
System.out.println(this.catCount);
}
}
I don't understand the problem
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
R S ROHITH KRISHNAN
11 June 2019, 07:13
remove line 18
i hav a doubt can we use this.catCount here??
0
shaan mohd khan QA Automation Engineer at mphasis Ltd
30 January 2019, 05:55
do this in line 13 and remove line 18
Cat.catCount=catCount;
+10
Michael Martin
21 December 2018, 13:11
Where does line 18 come from? There is no requirement to print out the catCount variable.
+1