3 ms·
> Why should I know the exact signature of the main method? It's not like you write it every day. Honestly we can't go from disliking ^typical^ interview quest
by devnonymous 9y ago
> Why should I know the exact signature of the main method? It's not like you write it every day.
Honestly we can't go from disliking ^typical^ interview questions that have no relation to our daily work all the way to this.
The signature of the main function is standard in possibly every programming language and should be derivable by anyone who knows how programs work.
- lomnakkus 9y agoRight, that's why main in Java returns void, and not an Int/Short. Hang on...
- legulere 9y agoAlso java main needs arguments, in C `int main(void)` is valid. Java also takes an String[] as a parameter while C takes an int argc and a char argv. Clearly devnonymous has never programmed in his life if he does not know the exact main function signatures of java and C...
- devnonymous 9y agoWhen I said... > should be derivable by anyone who knows how programs work. That ought to have been a clue. Knowledge of the function signature of the entry point of a program ought to indicate why the signature is the way it is for your favourite programming language. Although now, judging by the replies. Seems like that's a bar a little too high. /sigh, yep I think I should retire soon.