Bug 5482 - The template for "main" puts "[]" after variable name
Summary: The template for "main" puts "[]" after variable name
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Claude Knaus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-02 12:07 EST by Jed Anderson CLA
Modified: 2001-11-06 06:30 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jed Anderson CLA 2001-11-02 12:07:28 EST
The main template creates the following:

public static void main(String arguments[]) {
	
}

The "[]" after the variable name is considered a C++ construct.  This should be
changed to the following in order to give the tool a more Javaish feel.

public static void main(String[] arguments) {
	
}
or, as main is most oftenly written:

public static void main(String[] args) {
	
}
Comment 1 Erich Gamma CLA 2001-11-05 09:07:55 EST
Correct "String args[]" is legal but not considered as Java best practice.
Comment 2 Claude Knaus CLA 2001-11-05 12:18:09 EST
I noticed this today :)
Comment 3 Claude Knaus CLA 2001-11-06 06:30:01 EST
fixed > 208