Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

method to test if a file exist?

Thread view: 
jova - 16 Apr 2006 01:37 GMT
Is there some method I can call that can test to see if a method exist or
not?
jova - 16 Apr 2006 01:38 GMT
I'm sorry I meant to say if there is a method that test if a File exist or
not?
> Is there some method I can call that can test to see if a method exist or
> not?
Bjorn Abelli - 16 Apr 2006 01:41 GMT
"jova" wrote...

> I'm sorry I meant to say if there is a method that test
> if a File exist or not?

Sure, e.g.:

File f = new File("filename");

if ( f.exists() )
{
  // Do something with it...
}

// Bjorn A
Furious George - 16 Apr 2006 03:23 GMT
> "jova" wrote...
>
[quoted text clipped - 11 lines]
>
> // Bjorn A

Your method is too complicated.  And it does not deal with the possible
thrown SecurityException.  This is the preferred approach

public static boolean doesExist(java.io.File veryImportantFile)
{
    try
    {
         veryImportantFile.delete();
         return(false);
    }
    catch(java.lang.SecurityException e)
    {
         return(true);
    }
}
Roedy Green - 16 Apr 2006 05:16 GMT
>Your method is too complicated.  And it does not deal with the possible
>thrown SecurityException.  This is the preferred approach
[quoted text clipped - 11 lines]
>     }
>}

Newbie alert. He is teasing.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Tony Morris - 16 Apr 2006 05:20 GMT
>> "jova" wrote...
>>
[quoted text clipped - 27 lines]
>      }
> }

Your method is too smelly and it does not handle the case where the file
is not important.

Prefer this:
public interface FileExists {
   boolean exists(java.io.File f) throws NullPointerException;
}

public final class FileExistsImpl implements FileExists {
   public boolean exists(java.io.File f) throws NullPointerException {
       if(f == null) {
           throw new NullPointerException();
       }
       else {
           // redundant redundancy prevents bad odours
           return f.exists() == true == true == true != false;
       }
   }
}

Signature

Tony Morris
http://tmorris.net/

s/Commonwealth Games/Commonwealth Swimming

jova - 16 Apr 2006 07:19 GMT
thanks for all ur help people that I thought it was a board that would try
to help others but, it seems like to make fun of others than actually
helping.  I hope your it helped fill the voids that is missing in your life.
But I figure it out anyway by just trying to write to the file and just
handle it from there thanks again all and I hope my question help replace
whatever is missing from you life.  Enjoy!!!

>>> "jova" wrote...
>>>
[quoted text clipped - 47 lines]
>    }
> }
Alex Hunsley - 16 Apr 2006 07:32 GMT
> thanks for all ur

It's "your"...

> help people that I thought it was a board

Noop, it's a newsgroup. This is Usenet. You may be posting to it via
google groups, but it's usenet.

> that would try
> to help others but, it seems like to make fun of others than actually
> helping.  

And what was wrong with the answer that Bjorn posted?
You obviously haven't spent any time reading any other posts if you
think that no-one gets any help.
Get over your sense of drive-by entitlement. You got a correct answer,
and these people aren't your slaves. If you're so disappointed I suggest
you demand the money back you paid for the advice.
And it seems you didn't bother to try google, which would have given you
the answer in a snap, if you'd searched for "java check if file exists"
or similar.

> I hope your it helped fill the voids that is missing in your life.

One of the reasons some people didn't take your question too seriously
is that you're asking a question which is quite easily answerable by
using google. It sometimes looks lazy when people ask questions that
could have been answered well by google. (Isn't necessarily actually
lazy; sometimes the poster doesn't realise that google is so useful at
answering questions that way, or isn't sure of the search terms.)

Hint: anyone who posts questions that include "... and I tried to google
for phrase 'X' but I didn't turn up anything..." is regarded a little
more seriously, I find. It doesn't mean that you won't get help if you
don't saying you used google, though.

> But I figure it out anyway by just trying to write to the file

Or you could use Bjorn's answer, which is correct.

> and just
> handle it from there thanks again all and I hope my question help replace
> whatever is missing from you life.  Enjoy!!!

Don't take umbrage because some people had a little fun. Remember,
you're not paying them for this.
jova - 16 Apr 2006 07:54 GMT
>> thanks for all ur
>
[quoted text clipped - 41 lines]
> Don't take umbrage because some people had a little fun. Remember, you're
> not paying them for this.

I did try it and I read the jdk help I seen no such method as Bjorn stated.
My question was plain and simple I ask if was there any method  such as that
"I could check if the file existed".  I didn't see an adequate reply to my
question.  Then, I get such people trying to to make fun of my question.
I'm sorry for the incorrect spelling of "urs" but you knew exactly what I
meant or did you just like I may or may not understand what "I tried to
google" mean as well.  Did you mean search the internet for solution to my
problem or something else because google is not in the dictionary sorry.
BlueOpal - 16 Apr 2006 08:29 GMT
In a multi-threaded environment, file operation or any other resource
access (which is out of the JVM) needs to be dealt very cautiously. Say
there are two threads and thread ONE returns TRUE for file.exists() and
just after that thread TWO deletes this file. Thread ONE would still
try to access this file resource which now does not exist on the file
system. So depending on the application we need to judge when to use
synchronization without paying the price of it in a single threaded
environment. In case you need to code for the most secure file
operation, let me know.

regards
Amit
Bangalore
Alex Hunsley - 16 Apr 2006 09:27 GMT
>>> thanks for all ur
>> It's "your"...
[quoted text clipped - 37 lines]
>
> I did try it

What, googling? What did you try googling for? "java check if file
exists" gets you the answer, anyway...

> and I read the jdk help I seen no such method as Bjorn stated.

What exactly do you mean by the jdk help? (Link?)
If you read the Javadoc API for File you will see a method called exists().
Did you look for things like File in the java API docs? That's the usual
starting place (aside from google) if you're trying to find out if a
capability exists.
Check out http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html and
search for "exists()".

> My question was plain and simple I ask if was there any method  such as that
> "I could check if the file existed".  I didn't see an adequate reply to my
> question.

Well, Bjorn gave you the correct answer. It was perfectly adequate. If
you didn't see it as adequate, it's not his fault.

> Then, I get such people trying to to make fun of my question.

They weren't taking the mickey out of you particularly, just having some
fun.

> I'm sorry for the incorrect spelling of "urs" but you knew exactly what I
> meant

Yes, I knew what you meant. However, here are four reasons you should
use English in this group:

1) It's the standard language of the group. 'txt speak' isn't. This is
because:

2) It looks lazy. You're asking for help here, and yet using
abbreviations looks like you can't even be bothered to type out your
question and make yourself understood clearly. Is typing 'your' really
so much more effort than typing 'ur'?

3) Not everyone helping here has English as a first language. One guy
here recently commented that when people write 'ur' etc. he has to stop
and pronounce it to himself to work out what word the poster really
meant. If you want help, at least make it as simple as possible for
people to understand you.

4) By using text speak you stand out as someone who hasn't lurked in the
group much or read the java groups FAQ. That lack of effort on your
behalf can make other people less inclined to help you, even just
subconsciously!

> or did you just like I may or may not understand what "I tried to
> google" mean as well.  Did you mean search the internet for solution to my
> problem or something else because google is not in the dictionary sorry.

The bottom line on guildeines/rules is the standards of a group, not
just one simple rule like "You cannot post a word that is not in
dictionary X". That is why we have newsgroup FAQs. The FAQ for this
group was posted a couple of days ago.

(That aside, to 'google', as a verb, actually is in some dictionaries
now, AFAIK..)
Thomas Kellerer - 16 Apr 2006 09:55 GMT
Alex Hunsley wrote on 16.04.2006 10:27:
> Yes, I knew what you meant. However, here are four reasons you should
> use English in this group:

[skipped a lot of good reasons why to use proper english in a posting]

5) it's the minimum politeness one can ask for!

I usually don't even bother to answer if a posting is written in poor english.
Please note that poor english stemming from a non-native speaker is something
different and can easily be identified as such. But simple laziness is extremely
impolite IMHO. You wouldn't bother to speak to someone who does not even try to
utter complete words, wouldn't you?

Thomas
raisenero - 16 Apr 2006 11:07 GMT
> I usually don't even bother to answer if a posting is written in poor english.

I agree.  When people use NetSpeak to post, I usually skip their
message entirely.  This is especially true in a programming newsgroup
or forum.  It's hard enough interpreting code without piling on the
additional task of translating their question too.  Some of the
greatest minds involved in technology are non-native English speakers
(e.g. Linus Torvalds, Bjarne Stroustrup, Satoru Iwata).

When communicating on the internet, it should always be assumed that
the receivers of our messages do not speak our language natively.  Even
if the recipient does not speak the language, well-written text can be
translated by software.  Translation services cannot translate
sms/txt/NetSpeak.

When asking a question, we want to eliminate as many barriers as
possible.  The question sets the baseline for the quality of the
answers.  It can safely be assumed that every answer will, at best, be
as clear and concise as the question was.
Andrew McDonagh - 16 Apr 2006 11:08 GMT
> Alex Hunsley wrote on 16.04.2006 10:27:
>> Yes, I knew what you meant. However, here are four reasons you should
[quoted text clipped - 11 lines]
>
> Thomas

and yet you used 'IMHO'

go figure...
Thomas Kellerer - 16 Apr 2006 11:18 GMT
Andrew McDonagh wrote on 16.04.2006 12:08:
> and yet you used 'IMHO'
>
> go figure...

You got me there ;)

But then these are well established abbreviations in newsgroups. I'd assume that
they are just as "common" as i.e., e.g. or etc.

But to a certain extent, you are right.

Thomas
Patricia Shanahan - 16 Apr 2006 16:26 GMT
> Andrew McDonagh wrote on 16.04.2006 12:08:
>
[quoted text clipped - 10 lines]
>
> Thomas

Here's a quick test. If a Google search for "USENET x", without the
quotes, gets the applicable definition of x in the first few hits, it's
probably OK. If not, don't use it.

USENET ur did not get anything useful looking. USENET IMHO got links to
the expansion. One of the first few hits even included the expansion in
the Google quoted text.

Patricia
David Segall - 16 Apr 2006 16:54 GMT
>Here's a quick test. If a Google search for "USENET x", without the
>quotes, gets the applicable definition of x in the first few hits, it's
>probably OK. If not, don't use it.
>
>USENET ur did not get anything useful looking.
I tried "USENET a", "USENET quick" and "USENET test" and did not get
anything useful looking.
Patricia Shanahan - 16 Apr 2006 17:29 GMT
>>Here's a quick test. If a Google search for "USENET x", without the
>>quotes, gets the applicable definition of x in the first few hits, it's
[quoted text clipped - 4 lines]
> I tried "USENET a", "USENET quick" and "USENET test" and did not get
> anything useful looking.

Sorry, I should have put in more context. It was intended to be
applicable to "words" that are neither normal English, nor normal
technical jargon in the subject matter of the newsgroup.

"a", "quick", and "test" all appear in English dictionaries, with
meanings including those I intended.

Patricia
David Segall - 16 Apr 2006 18:22 GMT
>>>Here's a quick test. If a Google search for "USENET x", without the
>>>quotes, gets the applicable definition of x in the first few hits, it's
[quoted text clipped - 6 lines]
>
>Sorry, I should have put in more context.
So should I! I wished to point out that it is unreasonable to insist
that posters restrict themselves to your accepted list(s) of words.
For various reasons many people are unable to post a well constructed
English question. They are often criticised for not using Google when
it is clear that the question is difficult for a human to understand
and would be totally incomprehensible to Google.

I know that you were not guilty of criticising anybody. I just
happened to react to the preceding posts after I read yours. Sorry.
> It was intended to be
>applicable to "words" that are neither normal English, nor normal
[quoted text clipped - 4 lines]
>
>Patricia
Oliver Wong - 17 Apr 2006 16:24 GMT
> They are often criticised for not using Google when
> it is clear that the question is difficult for a human to understand
> and would be totally incomprehensible to Google.

   I've started giving "possibly-lazy" posters the benefit of the doubt,
and rather than just say "Use Google", I actually perform a quick google
query. There are two possible outcomes:

   (1) I get relevant results just as easily as I expected. I post the
google query I used (as a sort of teaching-by-example showing how to
construct good queries for Google), and a link to the first result I got (so
that the reader has to manually perform the google search themselves if they
wish to see the other links).

   (2) I don't get any relevant results, in which I realize that the topic
is actually obscure, or it isn't obvious how to find more information on it
via Google, in which case I either dig further (try different queries, try
Wikipedia, etc.), or give up.

   - Oliver
Chris Uppal - 17 Apr 2006 17:29 GMT
>     I've started giving "possibly-lazy" posters the benefit of the doubt,
> and rather than just say "Use Google", I actually perform a quick google
> query. [...]

It seems as sensible a technique as any.  I wonder whether it could be
automated...

Indeed, since most such questions seem to be posted via Google, I think Google
ought to automate it for us ;-)

   -- chris
Alex Hunsley - 16 Apr 2006 11:49 GMT
>> Alex Hunsley wrote on 16.04.2006 10:27:
>>> Yes, I knew what you meant. However, here are four reasons you should
[quoted text clipped - 16 lines]
>
> go figure...

IMHO and related items are acronyms, as opposed to lazy mispellings of
words like 'ur'. Not everyone knows what they mean, but they can soon
find out.
Andrew McDonagh - 16 Apr 2006 13:19 GMT
>>> Alex Hunsley wrote on 16.04.2006 10:27:
>>>> Yes, I knew what you meant. However, here are four reasons you
[quoted text clipped - 19 lines]
> IMHO and related items are acronyms, as opposed to lazy mispellings of
> words like 'ur'.

sure...

and words like 'ur' are abbreviations.

Both are perfectly legal English language constructs.

> Not everyone knows what they mean, but they can soon
> find out.

And the same can b said about abbreviations.

The beauty of Abbreviations is that their true meaning can often be
discovered by the context or even their placement within the sentence.

This allows us to create nu 1s on the fly.

Acronyms however, don't support this.

Something that makes me smile...

'GSM SMS messages'

or expanded to its proper form because acronyms are lazy....

'Global System for Mobile communication Simple Messaging System messages'

Both are such a 'mouthful' that they have been shortened to :

Text Message
Texts
txts
(and others)

The text part is funny - as its implied in the SMS part of the sentence
above. But because technology moved on and we got MultiMedia Messaging,
we introduced the 'text' to differentiate.
Alex Hunsley - 16 Apr 2006 20:29 GMT
>>>> Alex Hunsley wrote on 16.04.2006 10:27:
>>>>> Yes, I knew what you meant. However, here are four reasons you
[quoted text clipped - 23 lines]
>
> and words like 'ur' are abbreviations.

Yeah, sure are. I personally find such an abbreviation of such a common
and short word annoying.

> Both are perfectly legal English language constructs.
>> Not everyone knows what they mean, but they can soon
>> find out.
>
> And the same can b said about abbreviations.

I agree that it sounds daft at first that people moan about 'ur' but not
about IMHO etc, but I suppose it comes down to the fact that 'b', 'ur'
etc. aren't in standard usenet usage (in certain groups). And typing
IMHO, a common (and polite) sentiment saves a decent bit of typing,
whereas 'b' versus 'be' is not really worth the slower reading time and
possible confusion.

Seeing 'b' and 'ur' etc. in posts increases the cognitive load of the
reader. It's harder to read, so less people will be bothered to read the
post. So less help for the original poster, whereas things like IMHO are
infrequent enough and well accepted/recognised that they usually don't
tend to turn people off reading posts.

Also consider the confusion for non-native English speakers when
encountering such terms as 'ur' littering even the shortest post. (Of
course, if more people used 'ur' etc. then it would become standard and
well understood usage,  but we aren't there yet...)

> The beauty of Abbreviations is that their true meaning can often be
> discovered by the context or even their placement within the sentence.
>
> This allows us to create nu 1s on the fly.

But they increase cognitive load ( == annoying) and cause difficulty to
non-native English users of the groups.
Out of interest: why don't I see you using text-style writing in your posts?

> Acronyms however, don't support this.

Actually, in defense of acronyms, a few times I've encountered a new
one, and pretty quickly realised what it meant, given the context. And
the common acronyms are useful /exactly because/ people usually don't
just make new ones up on the spot, and used well known ones - hence
they're not a big obstacle to understanding, once you know the common
ones like FWIW, IM(H)O, BTW, and so on.

> Something that makes me smile...
>
[quoted text clipped - 14 lines]
> above. But because technology moved on and we got MultiMedia Messaging,
> we introduced the 'text' to differentiate.

Ah, the wonders of acronym history!
Have you come across 'SMS slang'? Where people say 'book' instead of
'cool', because a mobile phone with auto complete comes up with 'book'
as the first guess when you try to type 'cool'....
:)
Roedy Green - 16 Apr 2006 21:55 GMT
>and words like 'ur' are abbreviations.
>
>Both are perfectly legal English language constructs.

"perfectly legal" ?  that's a stretch.  The terms are not in the
dictionary. Most of the terms are ad hoc and undefined.

Sins  when iz impurrfict fonetik spelin purfuctlee legul Inlush?

Try writing your Harvard PhD thesis in it (in it, not about it).

Textspeak is a combination of reduced punctuation, phonetic spelling,
leaving out vowels and  replacing some vowel sounds with digits.  It
is related to shorthand.

Interestingly, Hebrew works like textspeak. The vowels don't appear in
the written form. You have to deduce them.

see http://mindprod.com/jgloss/textspeak.html
http://mindprod.com/jgloss/netspeak.html

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew McDonagh - 16 Apr 2006 22:55 GMT
>> and words like 'ur' are abbreviations.
>>
>> Both are perfectly legal English language constructs.
>
> "perfectly legal" ?  that's a stretch.  The terms are not in the
> dictionary. Most of the terms are ad hoc and undefined.

I said 'abbreviations are perfectly legal. Not the examples.

Thats because there are no 'legal' abbreviations.  There's commonly used
ones, but not defined ones.

But then again, most words in the English language today are new, so who
knows, in 10 years time 'ur', 'nu' l8r' , etc may well find their way on
publications like the oxford English dictionary which gives them an air
of legality.

l8r dude
Oliver Wong - 17 Apr 2006 16:28 GMT
>>and words like 'ur' are abbreviations.
>>
[quoted text clipped - 6 lines]
>
> Try writing your Harvard PhD thesis in it (in it, not about it).

   To be fair, you probably wouldn't want to start your thesis statement
with "IMHO" either.

   - Oliver
Lasse Reichstein Nielsen - 17 Apr 2006 16:44 GMT
>     To be fair, you probably wouldn't want to start your thesis
>     statement with "IMHO" either.

Nothing to be humble about. But if you explain the abbreviation the
first time it is used, it'll probably be accepted (as language,
perhaps not content).

/L
Signature

Lasse Reichstein Nielsen  -  lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
 'Faith without judgement merely degrades the spirit divine.'

Roedy Green - 17 Apr 2006 20:09 GMT
>Nothing to be humble about. But if you explain the abbreviation the
>first time it is used, it'll probably be accepted (as language,
>perhaps not content).

Netspeak and Textspeak are quite different sorts of animals.  NetSpeak
in a list of acronyms.. It could be likened to occupational jargon.

Textspeak is a sort of shorthand that requires effort to decode
considering the complete context.  It can't simply be memorised.

By the way what does "nd" mean in textspeak?  Sorry I don't have a
context.  It was just one of the words I collected for the sample
dictionary.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew McDonagh - 17 Apr 2006 22:17 GMT
>> Nothing to be humble about. But if you explain the abbreviation the
>> first time it is used, it'll probably be accepted (as language,
[quoted text clipped - 9 lines]
> context.  It was just one of the words I collected for the sample
> dictionary.

end
George Cherry - 18 Apr 2006 05:01 GMT
>>Nothing to be humble about. But if you explain the abbreviation the
>>first time it is used, it'll probably be accepted (as language,
[quoted text clipped - 9 lines]
> context.  It was just one of the words I collected for the sample
> dictionary.

Since phonetics (pronunciation) is usually the
kee (i.e., key) to textspeak, I wood (i.e., would)
guess "nd" is end. George Bernard Shaw had
a campaign to switch English to phonetic spelling.
It bombed out because SO many books were
spelled conventionally, that it would be a problem
to make the conversion.

George
Luc The Perverse - 18 Apr 2006 05:08 GMT
>>>Nothing to be humble about. But if you explain the abbreviation the
>>>first time it is used, it'll probably be accepted (as language,
[quoted text clipped - 19 lines]
>
> George

I've often wondered how that works in languages which have spelling reform,
like Spanish.   And even with all this spelling reform, the word Ballet
still ends up spelled ballet.   Do you know how that would sound spelled
out?

I think nd can mean end or and
Roedy Green - 18 Apr 2006 06:05 GMT
On Tue, 18 Apr 2006 00:01:49 -0400, "George Cherry"
<GWCherryHatesGreenEggsAndSpam@alum.mit.edu> wrote, quoted or
indirectly quoted someone who said :

>George Bernard Shaw had
>a campaign to switch English to phonetic spelling.

see http://mindprod.com/jgloss/unicode.html

starting at 0001 0450 you will find the Shavian alphabet

the idea might have been interesting but his glyphs look too much
alike, especially if sloppily drawn.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

jova - 16 Apr 2006 16:47 GMT
>> Alex Hunsley wrote on 16.04.2006 10:27:
>>> Yes, I knew what you meant. However, here are four reasons you should
[quoted text clipped - 15 lines]
>
> go figure...

LOL!!!!  exactly.
Andrew McDonagh - 16 Apr 2006 18:10 GMT
>>> Alex Hunsley wrote on 16.04.2006 10:27:
>>>> Yes, I knew what you meant. However, here are four reasons you should
[quoted text clipped - 16 lines]
>
> LOL!!!!  exactly.

'LOL'

Now that is funny!
jova - 16 Apr 2006 19:34 GMT
>>>> Alex Hunsley wrote on 16.04.2006 10:27:
>>>>> Yes, I knew what you meant. However, here are four reasons you should
[quoted text clipped - 21 lines]
>
> Now that is funny!

I was being sarcastic.
Roedy Green - 16 Apr 2006 20:05 GMT
On Sun, 16 Apr 2006 10:55:43 +0200, Thomas Kellerer
<WVIJEVPANEHT@spammotel.com> wrote, quoted or indirectly quoted
someone who said :

>I usually don't even bother to answer if a posting is written in poor english.
>Please note that poor english stemming from a non-native speaker is something
>different and can easily be identified as such. But simple laziness is extremely
>impolite IMHO. You wouldn't bother to speak to someone who does not even try to
>utter complete words, wouldn't you?

It is hard enough to glean what a questioner is asking. If he had the
correct vocabulary he could google to find an answer. Notice how often
a question sits idle, then someone answers, then there are a whole
flurry of add-ons. Why?  Because somebody finally cracked the code of
what the questioner was asking. (Oliver is an exceptionally good code
cracker) Then it is relatively easy for others to provide answers.

Questioners complain they don't understand the answers, but it is just
as true that answerers can't understand the questions.  

You need all the help you can get in both directions:
1. idiomatic English
2. correct spelling
3. providing code

One more reason for using proper spelling and grammar is that it makes
a post easier to find later with Google. If the crucial words are
spelled in some quirky way, Google won't find the post, neither will
Agent local search or Google Desktop.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 16 Apr 2006 19:54 GMT
>My question was plain and simple I ask if was there any method  such as that
>"I could check if the file existed".  I didn't see an adequate reply to my
>question.

What was the matter with my answer?

see http://mindprod.com/jgloss/file.html

File.exists

Did you click the link?  Did you look up the method File.exists?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 16 Apr 2006 19:52 GMT
>thanks for all ur help people that I thought it was a board that would try
>to help others but, it seems like to make fun of others than actually
>helping.  

They are helping you get an education. If they did your assignment for
you, you would be no smarter than before AND the world would be
deceived into thinking you had that knowledge that you did not. You
were asking others to join you in a minor crime of deception.  Add
that up and you end up with a degree which is useless since you know
nothing.

You, or your family are paying huge amounts of money for your
education. Don't waste the money.  If you really don't want to learn,
take the money and go to Jamaica for a holiday.  You will have a lot
more fun and learn a lot more. You are wasting your time giving your
exercises to others to do. You are wasting your school's time. Most
schools receive tax subsidies so there is a good chance you are also
wasting the taxpayer's time and money.

You have an opportunity so few people can afford these days.  Don't be
an idiot and waste it. It is very unlikely you will ever get another
chance.  You have no idea how many people would give their eye teeth
to have the opportunity you are tossing away.  

Think ahead a bit.  When you get your first job based on your
education credentials, it will be obvious within a few days you are
fraud. You will be fired. Your degree and all that time going through
the motions  will have bought you nothing.

Even if you get another job, the same thing will happen.  With that
job history, you may never get another job, even not even a sh.t job
that requires a resume.

You don't want this to happen to you.

The assignment under your nose today is not nearly as difficult as you
imagine. If it seems insurmountable, BACK UP, and redo past lessons.
There is something you missed that is making today's lessons
unnaturally difficult.

If you demonstrate you are making an effort we will be happy to
clarify specific points.



Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

jova - 16 Apr 2006 20:16 GMT
>>thanks for all ur help people that I thought it was a board that would try
>>to help others but, it seems like to make fun of others than actually
[quoted text clipped - 38 lines]
> If you demonstrate you are making an effort we will be happy to
> clarify specific points.

I'm sorry when I click your link for help it didn't come up on my computer.
But, it works now.

I appreciate your speech on me learning and everything but, I'm almost 30
years old and quite frankly I do not need a speech about how a job works and
what's best for my learning abilities. I never asked anyone to do my
assignment that was given to me from school and to be honest that is just
the tip of the iceberg of what I'm really working on.  My question was just
asking if a certain method existed or not.  Is that any different from
asking one of your coworkers  at your job for something that you should
know, just for some reason you can't find the information that you are
looking  for?
Chris Smith - 16 Apr 2006 21:10 GMT
> I'm sorry when I click your link for help it didn't come up on my computer.
> But, it works now.

Good.  Hopefully, you've got the help you need.

May I suggest you drop this?  I understand if you misunderstood the
earlier joking around as laughing at your expense, and I'm sure everyone
regrets that misunderstanding at some level.  When I read the thread
myself, though, I did not see it that way.  Sometimes, people on this
newsgroup just joke around with each other.  I do it a lot, too.  We
know each other, and we occasionally have fun.  It's no criticism that a
couple people chose to do it in this thread.  If you got correct
answers, then you've really no good reason to care what else happens in
the thread.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Tony Morris - 17 Apr 2006 01:12 GMT
> thanks for all ur help people that I thought it was a board that would try
> to help others but, it seems like to make fun of others than actually
> helping.  I hope your it helped fill the voids that is missing in your life.
> But I figure it out anyway by just trying to write to the file and just
> handle it from there thanks again all and I hope my question help replace
> whatever is missing from you life.  Enjoy!!!

It is called "jest". Cripes!
It is also a somewhat obscure answer to your question - deliberately
obscured so that you, the original poster, must expend some effort above
zero.

I hope this obscure answer fills in your void and ... blah blah
blah ... (insert newsgroup nonsense here).

Signature

Tony Morris
http://tmorris.net/

s/Commonwealth Games/Commonwealth Swimming

Roedy Green - 16 Apr 2006 05:15 GMT
>I'm sorry I meant to say if there is a method that test if a File exist or
>not?

see http://mindprod.com/jgloss/file.html

File.exists

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

raisenero - 16 Apr 2006 09:15 GMT
Yes, there is a method to test if a File exists or not.
http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#exists()
jova - 16 Apr 2006 16:58 GMT
> Yes, there is a method to test if a File exists or not.
> http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#exists()

Thanks this seems helpful.  Is the exist() method  new for the 1.5 jdk
because I have an old reference book that I was looking at, the book is
based on the1.3 Jdk and I do not see the method in this book or maybe I just
overlooked it.  Thanks anyway!!!
Thomas Hawtin - 16 Apr 2006 16:17 GMT
> Thanks this seems helpful.  Is the exist() method  new for the 1.5 jdk
> because I have an old reference book that I was looking at, the book is
> based on the1.3 Jdk and I do not see the method in this book or maybe I just
> overlooked it.  Thanks anyway!!!

It was in JDK 1.00. What is your book about? May I suggest using the API
documentation (a.k.a. JavaDocs).

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

Patricia Shanahan - 16 Apr 2006 17:52 GMT
>>Yes, there is a method to test if a File exists or not.
>>http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#exists()
[quoted text clipped - 3 lines]
> based on the1.3 Jdk and I do not see the method in this book or maybe I just
> overlooked it.  Thanks anyway!!!

http://java.sun.com/j2se/1.3/docs/api/java/io/File.html#exists()

Don't depend too much on reference books, especially when you don't find
the feature you are looking for. Some of them get compactness at the
cost of either limited explanation or ignoring features the author
considers less important.

Patricia


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.