CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

12
Return to list New
Author: carsein

java: help me...

[Copy link]
Post time 14-3-2009 11:56 PM | Show all posts
pehal lak jadi gini... hambek ko.. homework.. paham kan tulisan aku atas ni

alasan malas nak ubah balik
Reply

Use magic Report


ADVERTISEMENT


 Author| Post time 15-3-2009 12:13 AM | Show all posts

Reply #19 ana_una's post

terpakse suke
Reply

Use magic Report

 Author| Post time 15-3-2009 12:15 AM | Show all posts

Reply #20 kmkd's post

omg
tp betul la pemahaman ko..output tu nak write dlm notepad
Reply

Use magic Report

Post time 15-3-2009 07:37 AM | Show all posts
java -cp . MyClass > result


selalu orag guna cara manual ni..

kalau yang auto, kene buat method
FileOutputStream <-- saerch la.. aku pun tak pernah guna
Reply

Use magic Report

 Author| Post time 15-3-2009 07:10 PM | Show all posts

Reply #24 kmkd's post

oo ni kene buat otomatik...ok thanx 4 da guide..
nnt try cari
Reply

Use magic Report

Post time 15-3-2009 11:28 PM | Show all posts

Balas #25 carsein\ catat

kalau tahu tu ajar la sini.. aku pun nak tahu gak
Reply

Use magic Report

Follow Us
 Author| Post time 15-3-2009 11:49 PM | Show all posts

Reply #26 kmkd's post


adakah aku ditipu
aku br pinjam buku td...nnt dah jumpe aku kasitau code die
Reply

Use magic Report

Post time 16-3-2009 12:27 AM | Show all posts

Balas #27 carsein\ catat

tak la.. mana ada aku tipu.. aku ambik dari java api tu..

masalah nya aku tak pernah guna.. so aku suh ko cari..

pastu ajar aku
Reply

Use magic Report


ADVERTISEMENT


 Author| Post time 17-3-2009 12:06 AM | Show all posts
Hm tak berjaya r..
tak tau camne nak call output tu ke File..
Setakat nak tulis kat console n then write to file to reti la
Reply

Use magic Report

Post time 18-3-2009 01:20 PM | Show all posts
tak jadi ke? emm sebab yang aku baca dan tanya member aku memag betul dah tu..

try baca sini

http://codingforums.com/showthread.php?t=79995
Reply

Use magic Report

 Author| Post time 22-3-2009 07:37 AM | Show all posts
ops sori...lambat reply..dah jadi dah
aku guna FileWriter jek...ok ni code die

public class WriteFile
{
    private String m_filename = "";
    private BufferedWriter m_out = null;
   
    public WriteFile(String fileName){
        m_filename = fileName;
    }

    public void openFile() throws IOException{
        try{
            //Create file
            FileWriter fstream = new FileWriter(m_filename,true);
            m_out = new BufferedWriter(fstream);
        }catch(IOException){
            System.err.println("Error: " + e.getMessage());
            throw e;
        }
    }

    public void closeFile() throws IOException{
        try{
            m_out.flush();
            m_out.close();
        }catch(IOException){
            System.err.println("Error: " + e.getMessage());
            throw e;
        }m_out = null;
    }

    public void writeToFile(String text) throws IOException{
        try{
            m_out.write(text);
        }catch(IOException){
            System.err.println("Error: " + e.getMessage());
            throw e;
        }
    }
}
Reply

Use magic Report

 Author| Post time 22-3-2009 07:41 AM | Show all posts
Ni soalan ni mayb mudah untuk korang..tp for newbie cam aku...
camne nak panggil value bagi variable dari void method dari lain2 class ek..
kena guna setter and getter ker??
Reply

Use magic Report

Post time 22-3-2009 09:46 PM | Show all posts

Balas #32 carsein\ catat

betul dah tu rasanya.. set get

p/s: congratz sebab dah jumpa solution
Reply

Use magic Report

 Author| Post time 25-3-2009 12:26 AM | Show all posts

Reply #33 kmkd's post

thanx
kalo ade pape aku post lagi kat cni..
Reply

Use magic Report

Post time 2-4-2009 10:31 AM | Show all posts
Salam...
Aku nk mintak tlg...
Dlm Coding java biasa, Boleh ke kite link kn button tu ke page yg lain??
Or yg function tu dlm JSP sajer???
Thanks in advance
Reply

Use magic Report

Post time 2-4-2009 06:47 PM | Show all posts

Balas #35 ctmufizano\ catat

button ke page lain?
maksud?

kalau swing.... ko kene ada interface lain la rasanya kot
Reply

Use magic Report


ADVERTISEMENT


 Author| Post time 3-4-2009 03:31 AM | Show all posts

Reply #35 ctmufizano's post

tak berapa clear la soalan..
linkkan button ke page lain?
Reply

Use magic Report

Post time 3-4-2009 09:28 AM | Show all posts

Balas #37 carsein\ catat

entah.. maybe maksud dia.. dia buat satu interface lepas tu nak ke interface lain kot..
Reply

Use magic Report

Post time 3-4-2009 03:57 PM | Show all posts
Originally posted by kmkd at 3-4-2009 09:28
entah.. maybe maksud dia.. dia buat satu interface lepas tu nak ke interface lain kot..


ha... lebih kurang macam tu la????
Kire mcm link dr interface ke interface lain..

p/s:- sorry sbb x soklan x clear
Reply

Use magic Report

12
Return to list New
You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

10-1-2025 05:27 AM GMT+8 , Processed in 0.198406 second(s), 27 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list