Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   1-D arrays in Java (http://www.go4expert.com/forums/1-d-arrays-java-t9559/)

itzkloive 23Mar2008 19:46

1-D arrays in Java
I am kinda teaching myself java and got stuck trying to create a a program to translate 10 words bi-directional from english to spaniah, using two different String Arrays one consist of english words and one consist of spanish words. Can someone help this novice out?

import java.io.*;//tell Java we are using java.io libary.
import java.util.*;//Java utility package also for Scanner class

public class transWords //Naming the program.

public static void main(String[ ]args)throws Exception
//This set-up allow for user to input using keyboard.
Scanner input= new Scanner(System.in);

//Declaring Array String.
String[]englishTrans={"color","white","blue","green","blac k","purple",};
//Declaring Array String.
String[]spanishTrans={"en color","blanco","azul","verde","negro","purp˙reo", };

All times are GMT +5.5. The time now is 17:41.