title: JAVA Variable declaration not allowed here
body: <p>I get an error "Variable declaration not allowed here" and I don't know why, I'm new in java and can't find answer :/
  As it says, I can't make "int" in "if" but is there a way to create it?</p>
  
  <pre><code>import java.io.PrintWriter;
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.util.Scanner;import java.util.Scanner;
   public class test{
    public static void main(String[] args) throws FileNotFoundException{
      File plik = new File("test.txt");
      PrintWriter saver = new PrintWriter("test.txt");
  
       int score = 0;
       System.out.println("Q: What's bigger");
       System.out.println("A: Dog B: Ant");
       Scanner odp = new Scanner(System.in);
       string odpo = odp.nextLine();
  
       if(odpo.equals("a"))
          int score = 1;
       else
           System.out.println("Wrong answer");
  
    }
  }
  </code></pre>