professor kevin molloy adapted from slides originally
play

Professor: Kevin Molloy (adapted from slides originally developed by - PowerPoint PPT Presentation

Professor: Kevin Molloy (adapted from slides originally developed by Alvin Chao) When does Java allow you to assign one type of primitive to another? byte miles; checking = 56000; short minutes; total = 0; int checking; sum = total;


  1. Professor: Kevin Molloy (adapted from slides originally developed by Alvin Chao)

  2. • When does Java allow you to assign one type of primitive to another?

  3. byte miles; checking = 56000; short minutes; total = 0; int checking; sum = total; long days; total = sum; float total; checking = miles; double sum; sum = checking; boolean flag; flag = minutes; char letter; days = '0'; Which of these is not allowed?

  4. • Available in JAVA version 9 (or higher) • Jshell is a Read-Evaluate-Print-Loop (REPL) tool • Runs statements immediately

  5. • Starting – jshell -s • Saving what you have done (from within jshell) – jshell> /save <filename> • Opening a file/script – jshell> /open <filename> • Exit JShell – jshell> /exit – In UNIX, typing Ctrl-D on a blank line will also work

  6. • Only “//” comments allowed • No Scanner class input/output • Passing command line arguments not natively supported • Multi-lines are not handled well (JShell tries reading/interpreting what you typed in as soon as you hit enter) • Must end script with /exit

  7. • https://tryjshell.org • https://docs.oracle.com/javase/10/jshell/toc. htm

  8. Exam 1 – Sept 25 th (19 days away!!) • Please keep up with the reading and videos posted on the class calendar • Exams will be submitted via canvas, but you MUST be in class to take the exam • Must use LAB computers. • Can not use Eclipse • JGrasp settings –you will need to setup from scratch • Coding style will not be strictly graded (checkstyle will must likely not be available).

  9. • Programming Assignment 1 Due Tomorrow – Videos on scanner class available via the class calendar • Submit and Test Your Program • Virtual Office Hours from 2:00 pm to 5:00 pm – jmu.webex.com (use your e-id and password)

  10. • Acknowledgements • Parts of this activity are based on materials developed by Helen Hu and Urik Halliday, modified by Chris Mayfield and Nathan Sprague, and licensed under CC BY-NC 4.0 International </end>

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend