COMPSCI 220 Lecture Notes - Lecture 1: Command-Line Interface, Mkdir

42 views2 pages

Document Summary

Scala is coding language, essentially a shorter version of java. Type inference (don"t need to define types. ) Cd - go into the following file. Ls - list all files in current folder. Cd - go back up one directory. Mkdir - make directory of the following name. Import objectname. _ - import everything from that object. Scala will automatically generate variables for results (e. g. res. Don"t need to use semicolons (unlike java) Need to quit scala console, reopen if you make a change! Use val" to name local variables (e. g. val dogs = ) Read online lecture notes on how to make test cases. Nil: scala version of null for empty list, add to list accordingly ( list (5 :: nil) ) Be careful: you don"t get an error in scala for a list of multiple types (which is bad) Can redefine things at the console, not within.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents