Java syntax: Difference between revisions

Content deleted Content added
Line 236:
 
===<code>Main</code> method===
WhetherEvery itJava isapplication amust consolehave oran aentry graphicalpoint. interfaceThis applicationis thetrue programof mustboth havegraphical aninterface entrypointapplications ofand someconsole sortapplications. The entrypointentry of the Java applicationpoint is the <code>main</code> method. There can be more than one class with a <code>main</code> method, but the main class is always defined externally (e.g.for example, in a [[manifest file]]). The method must be <code>static</code> and is passed command-line arguments as an array of strings. Unlike [[C++]] or [[C Sharp (programming language)|C#]], it never returns a value and must return <code>void</code>.
<source lang=Java>
public static void main(String[] args) {