Run and check the below code public class Bug { String message; static int bugsGenerated;
Fantastic news! We've Found the answer you've been seeking!
Question:
Run and check the below code
public class Bug {
String message;
static int bugsGenerated;
public Bug() {
String message = "Unknown cause";
}
public Bug(String cause) {
this.message = cause;
bugsGenerated++;
}
public void solved() {
bugsGenerated--;
}
public static boolean bugFree() {
boolean bugFree = bugsGenerated == 0;
if (bugFree = true) {
return true;
}
else {
return false;
}
}
public String getMessage() {
return this.message;
}
public static int bugCount() {
return bugsGenerated;
}
}
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date: