[Off-topic] sirganon:
ok first of all...you just destroyed all my confidence haha. thats a good thing though because i know there were much better ways of writing a tic-tac-toe game and im glad i got to see one way. i have added your code to my program and fiddled with it to see just what is going on (i didnt quite catch some of the logic at first) but now i am understanding it pretty well. im still unsure about the playerturn^=3; because ive never come across that before and i dont understand how the ^= is working but i will figure it out.

i am however having a problem getting the result = 1 to register and have the program declare a winner. i did a System.out.println(result); after all three of the scanning phases and i can get them to equal 1 or 2. then i have an if statement:

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

if(result == 0 && moves >=9){
display(firstarray);
System.out.println("Cats Game, nobody wins.");
System.exit(0);
}

i am apparently not putting it in the right place because the game doesnt ever stop even though result doesnt equal 0 anymore. any help with this problem?

heres the new code to see what im talking about:

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[]={"",""};

int result;
int i;
result=0;
int moves=0;
int x,y;

System.out.println("Chris' 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(result == 0 || moves != 9){

display(firstarray);

int choice = input.nextInt();

if(choice>0 && choice<10)	//if choice is 1-9, continue, otherwise do else
{
choice-=1;	//choice 1-9 subtract 1 is 0-8
x=choice%3;	//x = the remainder of 'choice' / 3
y=choice/3;	//y = the whole number of 'choice' / 3

if(secondarray[y][x]!=0)	//if the cell [y][x] in secondarray doesnt = 0, chooose another cell, otherwise do else
System.out.println("Cell occupied, pick another");
else
{
secondarray[y][x] = playerturn;	//playerturn = secondarray[y][x] = 1 or 2
firstarray[y][x] = (playerturn==1) ? "X" : "O";	//if playerturn = 1 place an X otherwise place an O
playerturn^=3;	//switch playerturn from 1 to 2 or from 2 to 1
moves++;	//moves + 1 = moves
}
}
else{
System.out.println("Number out of range.");
}

for(i=0;i<3;i++)
{
// Row (i) and column (i)
result |= (secondarray[i][0] & secondarray[i][1] & secondarray[i][2]) | (secondarray[0][i] & secondarray[1][i] & secondarray[2][i]);
}
System.out.println(result);
// Diagonal top left -> bottom right
result |= (secondarray[0][0] & secondarray[1][1] & secondarray[2][2]);
System.out.println(result);
// Diagonal top right -> bottom left
result |= (secondarray[0][2] & secondarray[1][1] & secondarray[2][0]);
System.out.println(result);

}

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

if(result == 0 && moves >=9){
display(firstarray);
System.out.println("Cats Game, nobody wins.");
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 did change the while loop arguments so that will get it to stop after 9 turns at least. im thinking i may just have the if statement in the wrong place

thanks again for your help btw and sorry if its a little difficult to read because of not being tabbed correctly