why applet doesn't have main? isn't possible a program with
out main?
Answer Posted / nagaraju gurram
first of all we can write a program without main method .
and in case if applets they are intended for web development so the applets need to be alive during the navigation . but main will exit after completion of the execution and terminates the object .and main thing is main is a starting point of a program and there is no controlling on main but in case of web page we have to control the object during the navigation.that is the reason where an object should contain a life and through life cycle methods defined.............
Than Q
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Can you start a thread twice in Java?
What is boolean data type in java?
How do you pass by reference?
What is a top level class in java?
Can we change the value of static variable?
What is the default size of load factor in hashing based collection?
Can we overload run() method in java?
Can we create an object of static class in java?
Can you override private or static method in java?
What is command line used for?
What are the access modifiers in java?
How do you convert int to char in java?
What do the thread?class methods run() and start() do?
Why do we use bufferedreader?
What is the difference between static class and normal class?