19.09.2015 Views

Prentice.Hall.Introduction.to.Java.Programming,.Brief.Version.9th.(2014).[sharethefiles.com]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

30 Chapter 1 <strong>Introduction</strong> <strong>to</strong> Computers, Programs, and <strong>Java</strong><br />

14. Programs and data are permanently s<strong>to</strong>red on s<strong>to</strong>rage devices and are moved <strong>to</strong> memory<br />

when the <strong>com</strong>puter actually uses them.<br />

15. The machine language is a set of primitive instructions built in<strong>to</strong> every <strong>com</strong>puter.<br />

16. Assembly language is a low-level programming language in which a mnemonic is<br />

used <strong>to</strong> represent each machine-language instruction.<br />

17. High-level languages are English-like and easy <strong>to</strong> learn and program.<br />

18. A program written in a high-level language is called a source program.<br />

19. A <strong>com</strong>piler is a software program that translates the source program in<strong>to</strong> a machinelanguage<br />

program.<br />

20. The operating system (OS) is a program that manages and controls a <strong>com</strong>puter’s<br />

activities.<br />

21. <strong>Java</strong> is platform independent, meaning that you can write a program once and run it<br />

on any <strong>com</strong>puter.<br />

22. <strong>Java</strong> programs can be embedded in HTML pages and downloaded by Web browsers<br />

<strong>to</strong> bring live animation and interaction <strong>to</strong> Web clients.<br />

23. The <strong>Java</strong> source file name must match the public class name in the program. <strong>Java</strong><br />

source code files must end with the .java extension.<br />

24. Every class is <strong>com</strong>piled in<strong>to</strong> a separate bytecode file that has the same name as the<br />

class and ends with the .class extension.<br />

25. To <strong>com</strong>pile a <strong>Java</strong> source-code file from the <strong>com</strong>mand line, use the javac <strong>com</strong>mand.<br />

26. To run a <strong>Java</strong> class from the <strong>com</strong>mand line, use the java <strong>com</strong>mand.<br />

27. Every <strong>Java</strong> program is a set of class definitions. The keyword class introduces a<br />

class definition. The contents of the class are included in a block.<br />

28. A block begins with an opening brace ({) and ends with a closing brace (}).<br />

29. Methods are contained in a class. To run a <strong>Java</strong> program, the program must have a<br />

main method. The main method is the entry point where the program starts when it<br />

is executed.<br />

30. Every statement in <strong>Java</strong> ends with a semicolon (;), known as the statement termina<strong>to</strong>r.<br />

31. Reserved words, or keywords, have a specific meaning <strong>to</strong> the <strong>com</strong>piler and cannot be<br />

used for other purposes in the program.<br />

32. In <strong>Java</strong>, <strong>com</strong>ments are preceded by two slashes (//) on a line, called a line <strong>com</strong>ment,<br />

or enclosed between /* and */ on one or several lines, called a block <strong>com</strong>ment or<br />

paragraph <strong>com</strong>ment. Comments are ignored by the <strong>com</strong>piler.<br />

33. <strong>Java</strong> source programs are case sensitive.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!