1 / 15

Lecture 6

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.

verdi
Download Presentation

Lecture 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COP3502: Introduction to CIS I Lecture 6

  2. command line arguments

  3. String args[] arg[0] – first argument args[1] – second argument ….

  4. arrays … 9 0 1 2 3 4 7 8 5 6

  5. javaccommandLineTest Happy happy joy joy … 9 0 1 2 3 4 7 8 5 6

  6. if condition if (boolean condition) { // Do something }

  7. if-else condition if (boolean condition) { // Do something } else { // Do something else }

  8. else if condition if (boolean condition) { // Do something } else if (boolean condition) { // Do something else } else { // Do yet ANOTHER thing }

  9. for loop for (<initialization>; <condition>; <update>) { // Do something }

  10. for loop for (inti = 0; <condition>; <update>) { // Do something }

  11. for loop for (inti = 0; <condition>; i++){ // Do something }

  12. for loop for (inti = 0; <condition>; i++){ // Do something }

  13. while loop while (<condition>){ // Do something }

  14. String = char array

  15. String ~ char array “Sean” 2 0 1 3

More Related