CECS 174 Lecture 9: Intro to Java

71 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+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents