I CSI 201 Chapter Notes - Chapter 2: Newline, Semicolon, Filename Extension

66 views3 pages

Document Summary

A java source code file contains one or more java classes. If more than one class is in a source code file, only one of them may be. The public class and the filename of the source code file must match. ex: a class named simple must be in a file named simple. java. Each java class can be separated into parts. This will result in a file named simple. class being created. The java command assumes the extension is . class. The comment in the example is a single-line comment. The class header tells the compiler things about the class such as what other classes can use it (public) and that it is a java class (class), and the name of that class (simple). When associated with the class header, they define the scope of the class. When associated with a method, they define the scope of the method.

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

Related Questions