
-----------------------------------
.hack
Thu Oct 07, 2004 8:57 am

Java Phone Book (winnar)
-----------------------------------
Hey guys,m you may remember mef rom last year. I'm back in the Grade 12 Java course at my school.

Unfortunately we are using the shittay ready to java compiler from HSA.

Anyways I made a phonebook type thing. Its quite basic. Its simply just a few arrays to store names, phone numbers, cell numbers, addresses and e-mail addresses. I got sick of losing everyones phone numbers and being to lazy to get up from the comp to get a phonebook.

Anyways. This should be released soon, except I am having a problem with outputting my arrays into a text or dat file. I read the examples in the "Introduction to programming in Java" by holtsoft and they don't specify very much.

My main concern is being able to output the text file in a certian directory, All it explains in the book is naming the file, but I didn't see much about placing it into a certain dfirectory, say if I wanted to make an installer later for it.

Is this even possible in Java?

-----------------------------------
Dan
Thu Oct 07, 2004 1:11 pm


-----------------------------------
anything is posable in java ;) (tho that is in java, not neceraly RTP)

It whould be helpfull to see your code but have you just tryed adding the dir info to the file name?

-----------------------------------
.hack
Thu Oct 14, 2004 8:39 am


-----------------------------------
I can't complete the prog until I learn how to I/O from and to A file. But due to our Ghetto school hiring a math teacher to teach Programming I have been stumped ofr a limited time. Also, my Arrays won't overwrite >.<

Check the code for when you enter a buddy into the phone book and its all Names
// The "Phonebook" class.
import java.awt.*;
import hsa.Console;

public class Phonebook
{
    static Console c;           // The output console

    public static void main (String[] args)
    {
        c = new Console ();
        //ARRAYS
        String Names[];
        Names = new String [31];
        String Address[];
        Address = new String [31];
        String CellNum[];
        CellNum = new String [31];
        String Num[];
        Num = new String [31];
        String Email[];
        Email = new String [31];
        String Comment[];
        Comment = new String [31];


        //VARS
        int command;
        int arraynum;
        String YN;
        int iextra;
        iextra = 1;


        //Program

        for (int p = 1 ; p 