ITEC 1620 Lecture 3: Data and expressions

67 views3 pages

Document Summary

A string in java is anything that is enclosed in two double quotations. It can be both numbers, letters, punctuation and other special characters. This type of string is called an empty string. In order to display a string literal, we use the following methods called println and print. At the end of the parathesis we write a semicolon to tell the computer that we are done. The semicolon tells the computer that it can move on to the next set of instructions or statements. Before executing the println method that contains the string literal, quick , the computer must first compile and execute the first println method. Without the semi- colon, the computer will produce an error. The system. out object represents an output device such as a monitor where the string literals will be displayed. Each piece of data that we send to a method is called a parameter. When you want to display a string to the screen.

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