If it were declared as "private" no one could access it other than itself, and your actual javascript code within your web pages would not be able to run any javascript code.
2006-09-13 00:55:32
·
answer #1
·
answered by Kelly O 2
·
0⤊
0⤋
Main class in Java is the default class that the Java compiler seeks when running a Java program. It is always public do that the compiler will be able to see/run it.
KaBalweg
http://smartcoder.awardspace.com/
2006-09-13 01:24:54
·
answer #2
·
answered by dabsani 3
·
0⤊
0⤋
In order to run any Java code, you have to "kcik it off" and if the Public Main() function were Private or Protected, there would be no way for a system process (web page, command-line batch file, executible) to start your code. Once it's off an running, you can make everything else Protected or Private.
2006-09-13 01:46:26
·
answer #3
·
answered by Kevin M 1
·
0⤊
0⤋
class is a data structure like a function.
main class must be reached by other java packages.
So it must be public class
2006-09-13 00:58:22
·
answer #4
·
answered by iyiogrenci 6
·
0⤊
0⤋
because its main.General class of your project.
if it was private then u couldnt have accessed from other fuctions & classes
2006-09-13 02:00:10
·
answer #5
·
answered by ibrahim ersoy 2
·
0⤊
0⤋