Results 1 to 5 of 5

Thread: Quick Question

  1. #1
    mDennis10 is offline Member
    Join Date
    Jul 2011
    Posts
    76
    Rep Power
    0

    Default Quick Question

    I got a quiz in class and there is a question that i got wrong and i am curious about what the answer for the question is. The question is:

    Consider the following program.
    Java Code:
    public class HelloWorld
    {
        public static void main (String agrs[])
        {
             System.out.println ("Hello World")
        }
    }
    The missing semicolon in the fifth line of this code is a syntax error. It will be caught by the ________.
    a. compiler c. assembler
    b. editor d. interpreter

    The first question i asked the teacher was if this was at runtime he said no. The question was referring to when you are typing your code in eclipse or netbeans and miss a semicolon and then the line gets alighted to indicate that there is a error and what is responsible for that. I put the editor and i think my answer was correct because it would be at runtime that this check would be done otherwise. Can anyone tell me what is the answer and why.

  2. #2
    jammas615 is offline Senior Member
    Join Date
    Jul 2011
    Location
    Melbourne, Victoria, Australia
    Posts
    155
    Rep Power
    3

    Default Re: Quick Question

    Well if you were talking about when your typing code in Eclipse or Net Beans, then the answer should be b.editor because those Java IDE's usually check your code for those kind of thinks while you type. But if you weren't using an IDE then the compiler would pick it up.
    Bit of a pointless question if you ask me.

  3. #3
    mDennis10 is offline Member
    Join Date
    Jul 2011
    Posts
    76
    Rep Power
    0

    Default Re: Quick Question

    yeah i know but that question stop me from storing a perfect mark

  4. #4
    jammas615 is offline Senior Member
    Join Date
    Jul 2011
    Location
    Melbourne, Victoria, Australia
    Posts
    155
    Rep Power
    3

    Default Re: Quick Question

    Maybe you should tell your teacher how bad his questions are, because that kind of thing is not required knowledge, it more common sense than anything else.

  5. #5
    mDennis10 is offline Member
    Join Date
    Jul 2011
    Posts
    76
    Rep Power
    0

    Default Re: Quick Question

    Quote Originally Posted by jammas615 View Post
    Maybe you should tell your teacher how bad his questions are, because that kind of thing is not required knowledge, it more common sense than anything else.
    tell me about it!

Similar Threads

  1. quick question
    By biggerthanblue in forum New To Java
    Replies: 2
    Last Post: 04-10-2011, 04:33 AM
  2. Quick question
    By Thumper in forum New To Java
    Replies: 10
    Last Post: 11-07-2010, 10:06 PM
  3. Quick question
    By sAntA199 in forum New To Java
    Replies: 2
    Last Post: 12-09-2009, 03:01 AM
  4. One last quick question
    By jigglywiggly in forum New To Java
    Replies: 7
    Last Post: 01-26-2009, 08:53 AM
  5. Quick Question
    By Spenc in forum New To Java
    Replies: 3
    Last Post: 09-22-2008, 02:26 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
  •