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


Please Help Members By Posting Answers For Below Questions

Break statement can be used as labels in java?

656


Why is sizeof not a function?

647


What is the final keyword in java?

648


Is singleton a bad practice?

673


What is t in generics in java?

665






How do you check if a string contains only numeric digits?

731


What are the characteristics of java?

612


Can one thread block the other thread?

689


Can we print null in java?

683


What is native method in java?

657


What is class level lock ?

699


What is replacefirst in java?

663


Which is the best approach for creating thread ?

820


Can I use % with real numbers?

658


What are the advantages of exception handling?

664