This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes java io package Interview question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java io package Interview question." Watch "java io package Interview question." New topic
Author

java io package Interview question.

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

Hi all Rancher,

Today I faced a question in my Java/J2EE interview question.
The question is:-

Suppose we have two text file named a.txt and b.txt




Then what logic should use here if we imagine that the a.txt file has removed some data and b.txt has also removed some data at the time of File Written.

SO please tell me that in actual the interviewer what was asking from me?
Really I didn't get this concept.

Thanks in advanced!
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2173
    
  47
Then what logic should use here

Logic to do what? For example did the interviewer ask you how to determine what had been removed from each file or how to merge the files or something else altogether.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7552
    
  18

Rd Dari wrote:Suppose we have two text file named a.txt and b.txt

Rd Dari,

Please DontWriteLongLines. It makes your thread difficult to read, and in this case doesn't help at all:
I still have no idea what your "diagram" is supposed to represent.

Why don't you simply give us the interview question exactly as it was given to you.

And don't take offense at any answers: many of us here are NOT great fans of interview questioners.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

Hello Winston and Tony,

Thanks for reply.

Still I am not able to understand that what was the question and what is answer of that. He wrote it on the projector it like a table and asked me what core java logic should use here to find a File is written two files something like this.

Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7552
    
  18

Rd Dari wrote:Still I am not able to understand that what was the question and what is answer of that.

Well, I hate to say, but neither do I; and unless you can explain it a bit better, you may be out of luck.

There are two possibilities that I can think of:
  • He wanted to know if you knew about the diff (←click) algorithm.
    If that's the case, there's a big difference between knowing it exists, and what it does, and writing one yourself
    (I certainly wouldn't want to; and I've been doing Java for a long time).
  • This was some sort of question about synchronization.

  • But without more information I'm afraid I can't help you.

    Winston
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: java io package Interview question.
     
    Similar Threads
    read one file to write multiple files
    Wrong Values Retrieved through Hibernate
    how to delete an object from heap ?
    Best data storage method
    No difference between FileWritter and BufferedWritter