[Off-topic] sirganon:
ive been learning java for about 2-3 weeks now. ive been using youtube videos posted by thenewboston. i dont think its the best tutorials out there but i am learning some things. the proof is in this tic-tac-toe program ive written in two hours:

package mttt;

import java.util.Scanner;

public class Main {
public static void main(String[] args){
int playerturn = 1;
boolean winner = false;
String firstarray[][]={{"1","2","3"},{"4","5","6"},{"7","8","9"}};
int secondarray[][]={{0,0,0},{0,0,0},{0,0,0}};
String playerarray[]={"",""};

System.out.println("Sirganon's Tic-Tac-Toe Game");
System.out.println();
Scanner input = new Scanner(System.in);
System.out.println("Enter Player1's name: ");
String Player1 = input.nextLine();
playerarray[0] = Player1;
System.out.println("Enter Player2's name: ");
String Player2 = input.nextLine();
playerarray[1] = Player2;
System.out.println(playerarray[0] + " is X");
System.out.println(playerarray[1] + " is O");

while(winner == false){

display(firstarray);

System.out.println(playerarray[playerturn-1] +"'s turn.");
int choice = input.nextInt();

switch (choice){
case 1:
if(secondarray[0][0] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[0][0] = "X";
playerturn = 2;
secondarray[0][0] = 4;
}else{
firstarray[0][0] = "O";
playerturn = 1;
secondarray[0][0] = 5;
}
break;
case 2:
if(secondarray[0][1] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[0][1] = "X";
playerturn = 2;
secondarray[0][1] = 4;
}else{
firstarray[0][1] = "O";
playerturn = 1;
secondarray[0][1] = 5;
}
break;
case 3:
if(secondarray[0][2] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[0][2] = "X";
playerturn = 2;
secondarray[0][2] = 4;
}else{
firstarray[0][2] = "O";
playerturn = 1;
secondarray[0][2] = 5;
}
break;
case 4:
if(secondarray[1][0] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[1][0] = "X";
playerturn = 2;
secondarray[1][0] = 4;
}else{
firstarray[1][0] = "O";
playerturn = 1;
secondarray[1][0] = 5;
}
break;
case 5:
if(secondarray[1][1] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[1][1] = "X";
playerturn = 2;
secondarray[1][1] = 4;
}else{
firstarray[1][1] = "O";
playerturn = 1;
secondarray[1][1] = 5;
}
break;
case 6:
if(secondarray[1][2] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[1][2] = "X";
playerturn = 2;
secondarray[1][2] = 4;
}else{
firstarray[1][2] = "O";
playerturn = 1;
secondarray[1][2] = 5;
}
break;
case 7:
if(secondarray[2][0] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[2][0] = "X";
playerturn = 2;
secondarray[2][0] = 4;
}else{
firstarray[2][0] = "O";
playerturn = 1;
secondarray[2][0] = 5;
}
break;
case 8:
if(secondarray[2][1] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[2][1] = "X";
playerturn = 2;
secondarray[2][1] = 4;
}else{
firstarray[2][1] = "O";
playerturn = 1;
secondarray[2][1] = 5;
}
break;
case 9:
if(secondarray[2][2] != 0){
System.out.println("Choose another number.");
}else if(playerturn == 1){
firstarray[2][2] = "X";
playerturn = 2;
secondarray[2][2] = 4;
}else{
firstarray[2][2] = "O";
playerturn = 1;
secondarray[2][2] = 5;
}
break;
default:
System.out.println("Choose another number.");
break;
}

if(secondarray[0][0]+secondarray[0][1]+secondarray[0][2] == 12 ||
secondarray[1][0]+secondarray[1][1]+secondarray[1][2] == 12 ||
secondarray[2][0]+secondarray[2][1]+secondarray[2][2] == 12 ||
secondarray[0][0]+secondarray[1][0]+secondarray[2][0] == 12 ||
secondarray[0][1]+secondarray[1][1]+secondarray[2][1] == 12 ||
secondarray[0][2]+secondarray[1][2]+secondarray[2][2] == 12 ||
secondarray[0][0]+secondarray[1][1]+secondarray[2][2] == 12 ||
secondarray[0][2]+secondarray[1][1]+secondarray[2][0] == 12){
winner = true;
display(firstarray);
System.out.println(playerarray[0] + " is the winner!!!");
}else if(secondarray[0][0]+secondarray[0][1]+secondarray[0][2] == 15 ||
secondarray[1][0]+secondarray[1][1]+secondarray[1][2] == 15 ||
secondarray[2][0]+secondarray[2][1]+secondarray[2][2] == 15 ||
secondarray[0][0]+secondarray[1][0]+secondarray[2][0] == 15 ||
secondarray[0][1]+secondarray[1][1]+secondarray[2][1] == 15 ||
secondarray[0][2]+secondarray[1][2]+secondarray[2][2] == 15 ||
secondarray[0][0]+secondarray[1][1]+secondarray[2][2] == 15 ||
secondarray[0][2]+secondarray[1][1]+secondarray[2][0] == 15){
winner = true;
display(firstarray);
System.out.println(playerarray[1] + " is the winner!!!");
}else{
System.out.print("");
}

if(secondarray[0][0] != 0 && secondarray[0][1] != 0 &&
secondarray[0][2] != 0 && secondarray[1][0] != 0 &&
secondarray[1][1] != 0 && secondarray[1][2] != 0 &&
secondarray[2][0] != 0 && secondarray[2][1] != 0 &&
secondarray[2][2] != 0 && winner != true){
display(firstarray);
System.out.println("Cat's Game, no winner.");
System.exit(0);
}
}

}

public static void display(String x[][]){
for(int row=0; row<x.length; row++){

for(int column=0; column<x[row].length; column++){

System.out.print(x[row][column]+" ");
}
System.out.println();
}
}
}

i feel pretty good for getting that done in only two hours from learning from just youtube videos. im wondering if there is a better more efficient way of writing this part of the code:

if(secondarray[0][0]+secondarray[0][1]+secondarray[0][2] == 12 ||
secondarray[1][0]+secondarray[1][1]+secondarray[1][2] == 12 ||
secondarray[2][0]+secondarray[2][1]+secondarray[2][2] == 12 ||
secondarray[0][0]+secondarray[1][0]+secondarray[2][0] == 12 ||
secondarray[0][1]+secondarray[1][1]+secondarray[2][1] == 12 ||
secondarray[0][2]+secondarray[1][2]+secondarray[2][2] == 12 ||
secondarray[0][0]+secondarray[1][1]+secondarray[2][2] == 12 ||
secondarray[0][2]+secondarray[1][1]+secondarray[2][0] == 12){

if anyone could give me any advice i would definitely appreciate it. ive been told i can use a for-loop for it but im not sure how to implement it. (i know my code is indented kinda weird on here but it looks normal in my IDE)