Lecture11 - Java Programming 3e Concepts and Techniques...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Java Programming, 3e Concepts and Techniques Chapter 3 Manipulating Data Using Methods (III) ICTN 2730 Lecture 11 02/06/2008 Chapter 3: Manipulating Data Using Methods 2 Assignments • Read Chapter 3 and lecture notes. • Homework 2 sample solutions have been posted on Blackboard. • Homework 3 is due tonight. • Do not be stingy when answering discussion questions. • Feel free to ask questions. Chapter 3: Manipulating Data Using Methods 3 Quiz 01 • A(n)____________ is a program that executes the machine language instructions to produce results, or answers. – interpreter (page 30) – java.exe/java is the interpreter for Java • The main reason why Java is popular is that it is _____. – portable – Compile once, run anywhere. – Condition: JVM/JRE must be installed. 3 Chapter 3: Manipulating Data Using Methods 4 Quiz 01 • The Java SDK includes all the following tools except ____. – class libraries – We need SDK to compile/develop Java programs • The Java 2 Runtime Environment contains all the following tools except the ____. – Java Compiler – We need JRE to execute Java programs (bytecode). • Table 1-5 on page 30 Chapter 3: Manipulating Data Using Methods 5 Quiz 01 • The block comment in a Java program will be ignored during execution but not during compilation. – false – The block, doc, and line comments are ignored during compilation and execution. – “Commenting out” a piece of code is like removing the code. e.g. // System.out.println(4 * 3 / 6 – 4 + Math.pow(7,2)); Chapter 3: Manipulating Data Using Methods 6 Quiz 01 • A(n) ____ is a piece of data received by a method to help the method perform its operation. (Page 68, Figure 2-22) – parameter – e.g. in public static void main(String args), the parameter here is args, the data type of the parameter is String. • An argument is data to be sent to a method. – e.g. String username = System.getProperty("user.name" ); – the string “user.name” is an argument sent to the getProperty() method. Chapter 3: Manipulating Data Using Methods 7 http://java.sun.com/j2se/1.5.0/docs/api/java/lang/S ystem.html#getProperty(java.lang.String) • More information about the getProperty() method in Java API documents: – public static String getProperty ( String key) – Gets the system property indicated by the specified key. key....
View Full Document

This note was uploaded on 04/29/2008 for the course ICTN 2730 taught by Professor Li during the Spring '08 term at East Carolina University .

Page1 / 23

Lecture11 - Java Programming 3e Concepts and Techniques...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online