package fixtures;
|
|
|
|
import java.util.*;
|
|
|
|
public class Invalid {
|
|
private int x;
|
|
|
|
public Invalid(int x) {
|
|
this.x = x
|
|
}
|
|
|
|
public void show() {
|
|
System.out.println(x)
|
|
}
|
|
|
|
public String broken() {
|
|
String s = "unclosed string;
|
|
return s;
|
|
|
|
public int missingBody()
|
|
|
|
public void badIf() {
|
|
if (x > 0 {
|
|
System.out.println("positive");
|
|
}
|
|
}
|
|
|
|
public void badArray() {
|
|
int[] arr = {1, 2, 3;
|
|
System.out.println(arr[0]);
|
|
}
|
|
|
|
public void missingSemicolon() {
|
|
int a = 5
|
|
int b = 10;
|
|
int c = a + b
|
|
System.out.println(c);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
Invalid obj = new Invalid(42);
|
|
obj.show()
|
|
}
|
|
}
|