954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

File processing, Random-access Files

hi!...this my code,,,and i knew there"s something wrong with it,,,or maybe something is lacking..would you mind to help me?...i need a very quick response..thanks....Godbless you...


import java.io.*;

public class Samplefile {

public static void main(String args[])
{
File fob1 = new File("dede.txt");
RandomAccessFile rob1 = new RandomAccessFile("Hector.txt","rw");
if exists("dede.txt")
{
System.out.print("meon");
}

}

}

hazelle
Newbie Poster
3 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

And what exactly is your question? All I see is a few unrelated actions.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

nothing wrong with that code, purely going on syntax and grammar...
Of course depending on what you want to achieve there's a lot MISSING from it as it doesn't do much of anything.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You