COSC 236 Lecture Notes - Lecture 2: Carriage Return, Primitive Data Type, Javac
70 views4 pages
15 Sep 2016
School
Department
Course
Professor
Document Summary
Java source code file contains one or more java classes (first code) The public class and filename of the source code file must match. Each java class can be separated into parts. To compile the example use javac simple. java. Public class (name) class header: need at least one method (main) public static void man(string[] args) represents a string of arguments, code goes in between { } Out represents an object handles output to files, printers,etc. Println is a function that is inside that object. The string is inside the : statements end in , first part executes the code. () use in method header to mark parameter list. {} encloses group of statements as the contents of a class or method. \n moves the curser to a new line. \r carriage return (goes to beginning of current line) Print strings printed on same line variables and literals.
Get access
Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers