compile problem
-
Hi, Consider the following class:
class A{ private int i; private int j=8; private int k; { int i =j; } public Test1a(int k) { this.k=k } }
... program is not complie why? -
Hi, Consider the following class:
class A{ private int i; private int j=8; private int k; { int i =j; } public Test1a(int k) { this.k=k } }
... program is not complie why?Because you missed a semicolon after
this.k=k
?Regards, mav -- Black holes are the places where God divided by 0...
-
Because you missed a semicolon after
this.k=k
?Regards, mav -- Black holes are the places where God divided by 0...
this.k=k;
......... nowI AM WORKING ON "PLOTTER ROBOT"(FYP).
-
Hi, Consider the following class:
class A{ private int i; private int j=8; private int k; { int i =j; } public Test1a(int k) { this.k=k } }
... program is not complie why? -
this.k=k;
......... nowI AM WORKING ON "PLOTTER ROBOT"(FYP).
Just curious: But didn't the compiler tell you that there was a missing semi-colon? If not what did it say?
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog
-
it is my exam's question
I AM WORKING ON "PLOTTER ROBOT"(FYP).
-
Just curious: But didn't the compiler tell you that there was a missing semi-colon? If not what did it say?
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog
Argghhhh - it was an examination question. Really, do we want numpties like this unleashed on the workforce if they can't spot something simple like this?
Deja View - the feeling that you've seen this post before.
-
Argghhhh - it was an examination question. Really, do we want numpties like this unleashed on the workforce if they can't spot something simple like this?
Deja View - the feeling that you've seen this post before.
Pete O'Hanlon wrote:
Really, do we want numpties like this unleashed on the workforce if they can't spot something simple like this?
In the OP's defence *takes own temperature*, before the compiler warned about missing semi-colons I could be looking at the screen for ages before spotting it. This was especially true in Borland's Turbo C++ (The fist C++ compiler that I used which was DOS based) as it would find fault with everything after the line with the missing semi-colon because it would just get really confused. And I spent ages tracking down dozens of errors that didn't exist. However, given the small size of the code, it should be easy to spot a missing semi-colon.
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog
-
Pete O'Hanlon wrote:
Really, do we want numpties like this unleashed on the workforce if they can't spot something simple like this?
In the OP's defence *takes own temperature*, before the compiler warned about missing semi-colons I could be looking at the screen for ages before spotting it. This was especially true in Borland's Turbo C++ (The fist C++ compiler that I used which was DOS based) as it would find fault with everything after the line with the missing semi-colon because it would just get really confused. And I spent ages tracking down dozens of errors that didn't exist. However, given the small size of the code, it should be easy to spot a missing semi-colon.
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog
Colin Angus Mackay wrote:
This was especially true in Borland's Turbo C++ (The fist C++ compiler that I used which was DOS based) as it would find fault with everything after the line with the missing semi-colon because it would just get really confused. And I spent ages tracking down dozens of errors that didn't exist.
Ah, but experience in those days used to show that clearing one error would normally clear a couple of hundred errors, which was why I always used to start at the errors at the top of the failure to see if they could be the culprit. 9 times out of 10, the error was in the top 2.
Deja View - the feeling that you've seen this post before.