2,199 reputation
1329
bio website
location
age
visits member for 4 years, 3 months
seen Dec 11 at 15:11

Nov
28
comment Starting Execution of Java Program
@justin: There're no member functions in C and there're no non-member functions in Java. There's no other choice in C - non-member functions are the only choice. There is some choice in Java (all functions are member functions but they can be either static or non-static). Non-static member functions could have been used as entry points - however the design choice was made in favor of static member functions and I don't know why it was done this way but I guess it is because it is simpler. Also please note that static for C functions and static for Java member functions are totally different.
Nov
28
comment Starting Execution of Java Program
@justin: C runtime invokes a non-member function main() and Java runtime invokes a static member function main() of some class that happens to contain it.
Nov
28
comment Starting Execution of Java Program
@justin: Yes, it uses main() non-member function the same way as C does.
Nov
28
comment Starting Execution of Java Program
@justin: Yes, mostly. You can call non-static member functions on specific objects and you can call static member functions using either a specific object or a class name.
Nov
28
comment Starting Execution of Java Program
@gnat: This is a 80th level newbie question - the OP cannot get out of the following dilemma: the book says it has to be static because there's no object yet and he cannot get why they would need an object given that C and C++ don't need an object.
Nov
28
comment Starting Execution of Java Program
@gnat: That question is about why it is a static function and not a non-static function (less newbie). This one is about why it is a member function in the first place.
Nov
28
comment Starting Execution of Java Program
@justin: I think calling them non-member functions would make things easier. stackoverflow.com/a/4863328/57428 I edited the answer.
Nov
28
comment Starting Execution of Java Program
@justin: All functions are standalone (also called free functions) in C - fread(), rand(), malloc(), main(). In C++ functions can be member functions and free functions.
Nov
28
comment Starting Execution of Java Program
That's an example of a very good newbie question.
Nov
28
revised Starting Execution of Java Program
added 227 characters in body
Nov
28
answered Starting Execution of Java Program
Oct
29
comment How was the system clock first used in early computers?
@DanPichelman: That doesn't necessarily required a wall clock equivalent - a tick counter would be enough. Your task starts running - the counter value is saved in your session. Your task stops running - the stored value is subtracted from the current counter value and that's how long your task has been running.
Oct
29
comment How was the system clock first used in early computers?
@DanPichelman: How is Manhattan Project useful for commerce? Yet it certainly required computations provided by serious tools, not toys.
Oct
29
comment How was the system clock first used in early computers?
Why would synching circuits require time keeping instead of just a series of impulses?
Oct
29
comment How was the system clock first used in early computers?
@kdgregory: The equivalent of wall clock. I added a clarification.
Oct
29
comment How was the system clock first used in early computers?
Okay, so UNIVAC maybe had separate system clock, but would it use it for?
Oct
29
revised How was the system clock first used in early computers?
added 147 characters in body
Oct
29
asked How was the system clock first used in early computers?
Sep
9
awarded  Yearling
Aug
15
awarded  Popular Question