answersLogoWhite

0

What was Williams main method that he used?

Updated: 8/16/2019
User Avatar

Wiki User

16y ago

Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What was Williams main method that he used?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why you use main method when you can use static method?

The main method is called by the jvm when your program is executed. The main method is a static method: public static void main(String[] args) {} A static method is method that can be run without instantiate the class (creating an object from it) The main method is a static method. No other static method could replace it's functionality. PS By static method do you mean static initialiser? I often use static initialisers instead of a main method, but in these cases you must still have a main method, albeit an empty one ie. public static void main(String[] args) {} Notice that the method has an empty body A main method must be used if you intend to accept parameters at run time from the jvm.


Why public is used in the main method?

Because the compiler requires it. The main method has tohave the signaturepublic static void main(String[])Otherwise the compiler will not recognize it as the main method (and will give a compile error).Also, if the method wasn't public, then it would not be accessible outside of the class, so couldn't be called!


What is a getContentPane method in Java?

The getContentPane() method is used to get the main component in a Java Swing JFrame. It is usually a JPanel.


What was the main method used by the abolitionists to get people to join there movement?

the news paper


Why do you write void to the first of main?

Because main is the first method being executed, the Java Virtual Machine cannot expect any return values from this method. Since void is the term used to refer to a variable that does not return any value, we use the key word void for the method signature of the main method


What is void main?

The main method is the first method, which the Java Virtual Machine executes. When you execute a class with the Java interpreter, the runtime system starts by calling the class's main() method. Themain() method then calls all the other methods required to run your application. It can be said that the main method is the entry point in the Java program and java program can't run without this method.The signature of main() method looks like this:public static void main(String args[])The method signature for the main() method contains three modifiers:public indicates that the main() method can be called by any object.static indicates that the main() method is a class method.void indicates that the main() method has no return value.


Why main method is static?

Main method in java is always static as main method id the only method from where the program execution starts,and as we all know that main method is defined inside a class so JVM needs to make a object of the class to call the method and objects are build inside the main method ,so to execute the main method it has to make objects of the class but objects are build inside main method so that's the reason that main method is static so that JVM can execute the main method without making its object as static members can be called by class anme only


What is the main purpose of the scientific method?

The main purpose of the scientific method is to test ideas


What do you understand by the left and right parenthesis ie and used in the main method?

{ indicates the start point of main body. } indicates the end point of main body or program.


Can you overwrite main function in java?

You can not overwrite a static method in Java,and 'main' is a static method.so,you can't overwrite the 'main'.


Void in java?

Void is a keyword in Java. It is always used in method declarations. When used in the line that declares a method, it signifies the fact that the method will not return any value. The JVM will not expect the method to return anything. Ex: public static void main(String[] args) {}


Is there any change by interchanging the position of main in Public static void main in java?

No. You can write it in as many ways as you want. The words public, static and void can be interchanged during the method declaration and still the main() method will continue to work in the same way. i.e., public static void main(String[] args) is the same as static public void main(String[] args) However, if you miss either of these 3 keywords from the method signature, the compiler will still let you compile the method, but it just won't be the main method that can be used to start the program execution.