This is the code that I currently have for tic tac toe and it works well and I fixed how to keep score, however, I feel like the code is not nice and clean. Is there any way to make the code cleaner.

```
import java.util.Scanner;
import java.io.*;
import java.lang.String;

      public class TicTacToe{
          public static int a;
          public static int b; 
          public static int c;
          public static int d;
          public static int e;
          public static int f;
          public static int g;
          public static int h;
          public static int i;
                    public static boolean Winner(){
                          if(a == 1 && b == 1 && c == 1){
                                     return true;       
                                    } 
                              else if(d == 1 && e == 1 && f == 1){
                                     return true;       
                                    } 
                              else if(g == 1 && h == 1 && i == 1){
                                     return true;      
                                    } 
                              else if(a == 1 && d == 1 && g == 1){
                                     return true;      
                                    } 
                              else if(b == 1 && e == 1 && h == 1){
                                     return true;       
                                    } 
                              else if(c == 1 && f == 1 && i == 1){
                                     return true;      
                                    } 
                              else if(a == 1 && e == 1 && i == 1){
                                     return true;      
                                    } 
                              else if(c == 1 && e == 1 && g == 1){
                                     return true;       
                                    } 
                              else if(a == 2 && b == 2 && c == 2){
                                     return true;       
                                    }
                              else if(d == 2 && e == 2 && f == 2){
                                     return true;      
                                    }
                              else if(g == 2 && h == 2 && i == 2){
                                     return true;
                                    }       
                              else if(a == 2 && d == 2 && g == 2){
                                     return true;   
                                    }    
                              else if(b == 2 && e == 2 && h == 2){
                                     return true; 
                                    }      
                              else if(c == 2 && f == 2 && i == 2){
                                     return true; 
                                    }      
                              else if(a == 2 && e == 2 && i == 2){
                                     return true;    
                                    }  
                              else if(c == 2 && e == 2 && g == 2){
                                     return true;
                                    }       
                                     return false;
                                    }
                public static void main (String args[]){
                        String line1 = "1 | 2 | 3";
                        String line2 = "-------";
                        String line3 = "4 | 5 | 6";
                        String line4 = "-------";
                        String line5 = "7 | 8 | 9";
                        String line6 = "-------";
                               Scanner tic = new Scanner (System.in);
                               Scanner tac =  new Scanner (System.in);

                                    System.out.println("Welcome to a game of Tic Tac Toe");
                                    System.out.println("The game for those who aren't good at anything else.");
                                    System.out.println (line1);
                                    System.out.println (line2);
                                    System.out.println (line3);
                                    System.out.println (line4);
                                    System.out.println (line5);
                                    System.out.println (line6);

                    for (int i=0; i < 7; i++)
                       {

                        System.out.println("First player please choose a number. ");
                        int number = tic.nextInt();

                        if (number == 1){
                        line1 = line1.replace ("1","O");
                        a = 1;
                        }
                        if (number == 2){
                        line1 = line1.replace ("2","O");
                        b = 1;
                        }
                        if (number  == 3){
                        line1 = line1.replace ("3","O");
                        c = 1;
                        }
                        if (number == 4){
                        line3 = line3.replace ("4","O");
                        d = 1;
                        }
                        if (number == 5){
                        line3 = line3.replace ("5","O");
                        e = 1;
                        }
                        if (number == 6){
                        line3 = line3.replace ("6","O");
                        f = 1;
                        }
                        if (number == 7){
                        line5 = line5.replace ("7","O");
                        g = 1;
                        }
                        if (number == 8){
                        line5 = line5.replace ("8","O");
                        h = 1;
                        }
                        if (number == 9){
                        line5 = line5.replace ("9","O");
                        i = 1;
                        }

                            System.out.println(line1);
                            System.out.println(line2);
                            System.out.println(line3);
                            System.out.println(line4);
                            System.out.println(line5);
                                  if(Winner()){
                                  System.out.println("First Player wins.");
                                  System.exit(1);
                                      }
                            if(a != 0 && b != 0 && c != 0 && d != 0 && e != 0 && f != 0 && g != 0 && h != 0 && i != 0){
                                  System.exit(1);
                                      }
                        System.out.println("Second player please choose a number. ");
                        int number2 = tac.nextInt();

                        if (number2 == 1){
                        line1 = line1.replace ("1","X");
                        a = 2;
                         }
                        if (number2 == 2){
                        line1 = line1.replace ("2","X");
                        b = 2;
                         }
                        if (number2  == 3){
                        line1 = line1.replace ("3","X");
                        c = 2;
                         }
                        if (number2 == 4){
                        line3 = line3.replace ("4","X");
                        d = 2;
                         }
                        if (number2 == 5){
                        line3 = line3.replace ("5","X");
                        e = 2;
                         }
                        if (number2 == 6){
                        line3 = line3.replace ("6","X");
                        f = 2;
                         }
                        if (number2 == 7){
                        line5 = line5.replace ("7","X");
                        g = 2;
                         }
                        if (number2 == 8){
                        line5 = line5.replace ("8","X");
                        h = 2;
                         }
                        if (number2 == 9){
                        line5 = line5.replace ("9","X");
                        i = 2;
                         }
                              System.out.println(line1);
                              System.out.println(line2);
                              System.out.println(line3);
                              System.out.println(line4);
                              System.out.println(line5);
                              System.out.println(line6);
                                 if(Winner()){
                                    System.out.println("Second Player wins.");
                                    System.exit(1);
                                       }
                             if(a != 0 && b != 0 && c != 0 && d != 0 && e != 0 && f != 0 && g != 0 && h != 0 && i != 0){
                                    System.exit(1);
      }
     }
    }
   }

```

This works but is there a more efficient way of fixing it?