CSE 110 Lecture Notes - Lecture 1: Javac, Text Editor

144 views2 pages

Document Summary

Example contains 1 or more methods contains program statements public class helloworld public static void main (string[] args) - method header (strings[] args) = arguments. *every java application has exactly one main" method. *void is a return type - no return. A good practice to include comments to describe your program. Comments are not executed when you run a program. Save the program as helloworld. java: compile the program, run the program. You can also use a simple text editor such as notepad to write your source code. Once saved as helloworld. java, you can use a console window to: compile the program by typing javac helloworld. java, run the program by typing java helloworld println and print. *println method prints a string or a number and then starts a new line. Logic errors (such as trying to divide by zero, which causes a program to terminate abnormally. Each java program should have at least one class.

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