Command-line-arguments

Command-line-arguments - public static void main( String...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 1 Command-line arguments The formal parameter to the main method: array of String objects public class Test { public static void main( String[] args ) {} } e.g. java Test simpson dilbert length will be 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 2 Command-line arguments: Example public class Names {
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public static void main( String args ) { System.out.println( args.length ); for( int j = 0; j < args.length; j++ ) { System.out.println( args[ j ] ); } } } java Names susan anita java Names 234 john arun java Names Output ?? COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 3 Command-line arguments: in Netbeans...
View Full Document

This note was uploaded on 12/12/2010 for the course COE 318 taught by Professor Ken during the Spring '08 term at Ryerson.

Page1 / 3

Command-line-arguments - public static void main( String...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online