Chapter 3

7 Pages
84 Views

Department
Information Technology Management
Course Code
ITM 200
Professor
Vikraman Baskaran

This preview shows pages 1 and half of page 2. Sign up to view the full 7 pages of the document.
Description
Chapter 3 Outputs and calculations 3.1 The structure of a Java program Comments Comments are pieces of text that are ignored by the compiler They are usually included by the author of a program for 2 reasons o Provide useful notes or explanations for a human reading the program o Prevent statements from being executed maybe during lazy debugging or program development Following are comments o Prints Hello on the screen in a dialog box o import class JOptionPane Comments begin with , which tells the computer that all text from this point until the end of the line is to be ignored when translating the Java program into byte code You should always place a comment at the start of the program to state o The purpose of the program o An outline of how it carries out its task o Who wrote the program and when o A list of any changes to the program and when they were made o Anything else which might help a reader to understand the program Other kinds of Java comments Another type of comment starts with * and ends with * This kind of comment can spread over 2 or more lines for detailed notes Importing (reusing) code from other files The line import javax.swing.JOptionPane; is an import statement Classes www.notesolution.com
More Less
Unlock Document

Only pages 1 and half of page 2 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit