CECS 174 Lecture 9: Intro to Java

70 views6 pages

Document Summary

// java line comments start with a "//". // we"ll get back to this later. import java. util. scanner; // java block comments start with a /*, and include all text up to the first. // */ that follows, even if that is many lines later. * all java code goes in a . java file, which is akin to a . py file in that it. The java compiler will read a . java file, make sure. * that its syntax and semantics are correct, then "compile" it, creating. * every java program exists inside a "class". * matches the name of the file that contains it, except for the ". java" part. public class basicio { // in basicio. java. * unlike python, java programs are not executed top-down. * program defines an "entry point" called main. * following line. public static void main(string[] args) { * java has variables of different types, like python, but in java, the.

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