Results 1 to 7 of 7
  1. #1
    fresh83 is offline Member
    Join Date
    Dec 2009
    Posts
    55
    Rep Power
    0

    Default Wtf mate? ....prob a very simple problem

    Alright so i found the best book in the world to learn java from , everything is clicking and making sense at a rapid rate but, i just tried cutting and pasting one of there example projects and its giving me a shit load of errors that make no sense to me.

    Yfrog Image : yfrog.com/45screenhunter01jul010813g

  2. #2
    fresh83 is offline Member
    Join Date
    Dec 2009
    Posts
    55
    Rep Power
    0

    Default

    it seems that doc java just insists on me re typing the code EXACTLY the same way ..and then it works...why is this.

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,411
    Rep Power
    25

    Default

    the code EXACTLY
    That's the nature of computers. No imagination. Can't read your mind.
    They do exactly what you tell them to do.

    Perhaps you should wait for the next generation of computers with the mind readers.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by fresh83 View Post
    i just tried cutting and pasting one of there example projects and its giving me a shit load of errors that make no sense to me.
    Cutting and pasting unrelated code and reassembling it again is not the way to program; it seldom (or never) works that way. Start by writing very small programs that exercise one aspect of the programming language; then try another one and finally a bigger one until you have understood all the aspects of the language you were working with. There are script kiddies enough in this world and they cause a lot of damage. Don't become one of them.

    kind regards,

    Jos

  5. #5
    dlorde is offline Senior Member
    Join Date
    Jun 2008
    Posts
    339
    Rep Power
    7

    Default

    When you cut and paste code from the web, you'll often find that certain characters that look OK in the browser are not correct for Java code when you paste them. Single and double quotes, and spaces are common problems.

    Try replacing all quote and space characters with the equivalent quote and space characters typed from your keyboard - it sounds daft, but it often works.

    Better still, read the code, try to understand it, then write your own.

  6. #6
    mangstadt is offline Member
    Join Date
    Jun 2010
    Location
    USA
    Posts
    19
    Rep Power
    0

    Default

    Quote Originally Posted by dlorde View Post
    Single and double quotes, and spaces are common problems.
    Yep, looking at the screenshot, it looks like the double quotes need to be replaced.

  7. #7
    Join Date
    Feb 2009
    Posts
    15
    Rep Power
    0

    Default

    Just a little tip for your future coding, organize it. By this I mean:

    public void.......
    {
    code....;
    }

    so on and so forth, it makes it so much easier to find errors and re-read later.
    Last edited by thehighlander12; 07-02-2010 at 10:16 PM.

Similar Threads

  1. Very simple problem
    By Andyj in forum Java Certification
    Replies: 3
    Last Post: 09-17-2010, 06:49 AM
  2. I have a simple problem
    By o0oNorao0o in forum JCreator
    Replies: 20
    Last Post: 12-25-2009, 08:32 PM
  3. simple line problem / for loop problem
    By helpisontheway in forum New To Java
    Replies: 1
    Last Post: 11-17-2009, 06:12 AM
  4. simple GUI problem
    By McChill in forum New To Java
    Replies: 4
    Last Post: 04-03-2009, 03:13 AM
  5. Simple IO problem
    By aamp in forum New To Java
    Replies: 2
    Last Post: 12-01-2008, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •