Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33

Thread: Java error discovered?

  1. #26
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java error discovered?

    Quote Originally Posted by Programming_Hobbyist View Post
    Well thanks everyone for the help. Why do you people even post on this forum? Is it the social aspect? It must be the social aspect. Anyway - this is part of my larger project. Now that I can write to file, I can save data to a file, and then retrieve that data. I'm building a project where I can add people, their attributes, and then easily sort them according to attributes, for instance weight, height, eye-color, etc, and then show images of these people according to the sorting criteria.
    And that's fine. But this thread is about a specific error, which you continue to insist is a bug "in Java". It's not, and we've demonstrated that several times over now. But instead of saying "okay, my bad, lesson learned", you continue to shift the blame off of yourself as a programmer, which is why people are continuing to try to point out why your conclusion is flawed.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  2. The Following User Says Thank You to KevinWorkman For This Useful Post:

    curmudgeon (October 25th, 2012)

  3. #27

    Default Re: Java error discovered?

    Quote Originally Posted by KevinWorkman View Post
    And that's fine. But this thread is about a specific error, which you continue to insist is a bug "in Java". It's not, and we've demonstrated that several times over now. But instead of saying "okay, my bad, lesson learned", you continue to shift the blame off of yourself as a programmer, which is why people are continuing to try to point out why your conclusion is flawed.
    I disagree. I think you just have not tested it for yourself. Given that that helloworld already noticed the error with java as well. He didn't call it an error though. I was wrong about try/catch being the source of the error though.

  4. #28
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java error discovered?

    I have tested it for myself. It worked fine. I even posted an example showing you that it worked. All we're asking is that you post the code that you want us to test, and we'll be more than happy to test it. Posting an entire program that contains other logic doesn't really help us, so we've asked several times for an SSCCE. Without that, we have to chalk this up to an error on your part. That's not a personal offense, but hopefully it is a lesson learned: when you see something weird, chances are you're doing something wrong.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #29

    Default Re: Java error discovered?

    Yes but not of the other error, the writing bytes one, the one HelloWorld mentioned. Obviously there's an error with java with THAT one.

  6. #30
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Java error discovered?

    Quote Originally Posted by Programming_Hobbyist View Post
    I disagree. I think you just have not tested it for yourself. Given that that helloworld already noticed the error with java as well. He didn't call it an error though. I was wrong about try/catch being the source of the error though.
    I didn't call it an error in the Java API because that was what was what it was intended to do. I even linked you to the Javadoc for the method which explicitly declares the correct functionality, which we both verified was what happened. Rather the bug was in your code which made assumptions about the Java API which turned out to be incorrect.

  7. #31

    Default Re: Java error discovered?

    You people seem to be obsessed with proving me wrong. In fact, you pointed out the error yourself. The write bytes was only writing 1 line of the code - it shouldn't have been. Since I wasn't including the 3rd field, it should've just been creating a new one.

    I've heard 20 "you're wrongs" so far - even before people have read my argument. Interesting.

  8. #32
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: Java error discovered?

    You seem obsessed with proving everyone else wrong, when you've clearly provided no counter-arguments to the factual information given to you by everyone else. The API states a behaviour, you experienced that behaviour, it is not an error. Please get more practice in reading the Java API, as you're obviously struggling at the moment.
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

  9. The Following User Says Thank You to newbie For This Useful Post:

    curmudgeon (October 26th, 2012)

  10. #33
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java error discovered?

    Quote Originally Posted by Programming_Hobbyist View Post
    You people seem to be obsessed with proving me wrong. In fact, you pointed out the error yourself. The write bytes was only writing 1 line of the code - it shouldn't have been. Since I wasn't including the 3rd field, it should've just been creating a new one.

    I've heard 20 "you're wrongs" so far - even before people have read my argument. Interesting.
    We are trying to help you understand what's going on in your code, since you have a pretty big misunderstanding of how things work. But you keep saying "there's a bug in Java" without actually showing us what you're talking about. Show us what you're talking about, and we'll be more than happy to help you understand what's going on.

    It's pretty clear that what happened was you made a programming error or didn't understand the API you were using. That's okay, but it's not a bug in Java. Like I said back in my first reply, resorting to blaming the language or a compiler or a tool instead of yourself is a pretty common novice mistake, and *that* is what we're trying to help you understand.

    But if all you want to do is bicker, I can lock this thread. I'd much rather you post the code you're talking about so we can help you understand what's going on, but it's up to you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: July 2nd, 2012, 09:11 PM
  2. Java Error cannot be applied to (java.lang.String), phone book entry program.
    By iceyferrara in forum What's Wrong With My Code?
    Replies: 5
    Last Post: September 23rd, 2011, 06:32 AM
  3. [SOLVED] Java run time error: 'java.lang.NullPointerException"
    By ChandanSharma in forum What's Wrong With My Code?
    Replies: 9
    Last Post: June 20th, 2011, 11:53 AM
  4. A Java Error
    By Shyamz1 in forum Java Theory & Questions
    Replies: 9
    Last Post: October 7th, 2010, 07:56 AM
  5. Is it possible to load classes at runtime that are discovered from a directory
    By mydarkpassenger in forum Java Theory & Questions
    Replies: 11
    Last Post: June 10th, 2010, 10:33 AM