150 likes | 308 Views
COP3502: Introduction to CIS I. Lecture 6. c ommand line arguments. String args [] a rg [0] – first argument a rgs [1] – second argument …. arrays. …. 9. 0. 1. 2. 3. 4. 7. 8. 5. 6. javac commandLineTest Happy happy joy joy. …. 9. 0. 1. 2. 3. 4. 7. 8. 5. 6.
E N D
COP3502: Introduction to CIS I Lecture 6
String args[] arg[0] – first argument args[1] – second argument ….
arrays … 9 0 1 2 3 4 7 8 5 6
javaccommandLineTest Happy happy joy joy … 9 0 1 2 3 4 7 8 5 6
if condition if (boolean condition) { // Do something }
if-else condition if (boolean condition) { // Do something } else { // Do something else }
else if condition if (boolean condition) { // Do something } else if (boolean condition) { // Do something else } else { // Do yet ANOTHER thing }
for loop for (<initialization>; <condition>; <update>) { // Do something }
for loop for (inti = 0; <condition>; <update>) { // Do something }
for loop for (inti = 0; <condition>; i++){ // Do something }
for loop for (inti = 0; <condition>; i++){ // Do something }
while loop while (<condition>){ // Do something }
String ~ char array “Sean” 2 0 1 3