Why my code is wrong? Please help, cose a lot is wrong and I havent idea why.
package pl.codegym.task.task15.task1529;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Praktyka z blokami statycznymi
*/
public class Solution {
public static void main(String[] args) {
}
static {
Object result;
reset();
}
public static CanFly result;
public static void reset() {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
String s = reader.readLine();
if (s.equals("helikopter")) {
result = new Helicopter();
} if (s.equals("samolot")) {
int n = Integer.parseInt(reader.readLine());
result = new Plane(n);
}
reader.close();
} catch (Exception e) {
}
}
}