Hello,
I had appeared for an interview, that has a couple of question which I felt I could have answered a little bit more satisfactorily
1) Is public static long main(
String args[]) a valid method, if yes why if not why?
Googled this question, but did not get a satisfactory reply. It seems this method is valid in C++ but not in
java.
2) What is the difference between public static void main(String args[]) and public static void main(String []args)
My reply:Both are valid methods and we can use either one.
The panel was'nt satisfied.
Kindly can you answer the above questions esp the first one.
Thanks.