Panther

Reviews Favorites News Main
Panther

Age/Gender: 20, Male
Location: Danville, VA
Job: school

umm..might update this.. when i get good

Newgrounds Stats

Sign-Up Date:
12/17/99

Level: 8
Aura: Neutral

Rank: Civilian
Blams: 39
Saves: 25
Rank #: 75,176

Whistle Status: Normal

Exp. Points: 558 / 710
Exp. Rank #: 68,281
Voting Pow.: 4.99 votes

BBS Posts: 276 (0.08 per day)
Flash Reviews: 43
Music Reviews: 0
Trophies: 0
Stickers: 0

Panther

Testing

Posted by Panther Jul. 17, 2007 @ 5:47 PM EDT

hello, just testing this for the future, when I actually make games

--------------------------------------
--------------------------------------
------------------------------------
import javax.swing.*;
public class Lab5 {

public static String isOrIsNot, inputWord;
public static String [] wordArray;

public static void main(String[] args) {
wordArray = new String[10];
TextFileInput source = new TextFileInput(args[0]);
int i=0;
while (i<10)
{
wordArray[i] = source.readLine();
i++;
}
while(true)
{

inputWord = JOptionPane.showInputDialog(null,"Ente r a word in all lower case:");
if (inputWord.equals("STOP"))
break;
if (wordIsThere(inputWord,wordArray))
isOrIsNot = "is";
else
isOrIsNot = "is not";

JOptionPane.showMessageDialog(null,"Th e word "+inputWord+" "+
isOrIsNot+" on the list.");
}//while stops here
} //main

public static boolean wordIsThere(String findMe, String[] theList){

int i=0;

if (findMe.equals("STOP"))
System.exit(0);

while (i<7){
if (findMe.equals(theList[i]))
return true;
i++;
}

return false;

}
}
--------------------------------------
--------------------------------------
------------------------------------

import javax.swing.*;
public class Lab4 {

public static String[] wordArray =
{"hello","goodbye","cat","dog","red","
green","sun","moon"};
public static String isOrIsNot, inputWord;

public static void main(String[] args) {
while (true){
inputWord = JOptionPane.showInputDialog(null,"Ente r a word in all lower case:");
if (wordIsThere(inputWord,wordArray))
isOrIsNot = "is";
else
isOrIsNot = "is not";
JOptionPane.showMessageDialog(null,"Th e word "+inputWord+" "+
isOrIsNot+" on the list.");
}//while stops here
} //main
public static boolean wordIsThere(String findMe, String[] theList){

int i=0;

if (findMe.equals("STOP"))
System.exit(0);

while (i<0){
if (findMe.equals(theList[i]))
return true;
i++;
}
return false;

}
}

--------------------------------------
--------------------------------------
------------------------------------

Updated: 09/22/09 12:36 PM 3 comments | Log in to comment! | Share this!