JAVA

Monday, October 30, 2006

Lab Fibonacci numbers



Sunday, October 29, 2006

Finding the max and the min


Tuesday, October 24, 2006

Lab Tax Calculation


Sunday, October 22, 2006

"Lab Scanner"

"Lab window input dialog"



Monday, October 16, 2006

Lab Get Familiar with Java String


Monday, October 02, 2006

Lab 10-2 (1) Simple Java Expression

Sunday, October 01, 2006

Homework 9-25-2006

1. Explain bytecode, JVM
(1)Java強調跨平台,目的在於你只要寫一次Java程式原始碼後.就可以在各種不同的OS上執行..他是透過安裝在不同OS內的JVM來執行的.有了JVM,Java才能達成跨平台的目的
參考:http://tw.knowledge.yahoo.com/question/?qid=1305082620804
(2)Java Virtual Machine,Java為了做到能夠跨平臺,所以他不能像C/C++那種語言一樣將其程式碼編成相對於機器上的機器碼(或是Assembly Code),所以他採用了中介碼(byte code)為了達到能夠執行跨平台的Java程式Sun必須提供每種機器相對應的虛擬機器(Virtual Machine)Virtual Machine這個程式能夠將Java的.class檔轉換成他平台上所了解的機器碼
參考:http://tw.knowledge.yahoo.com/question/?qid=1306030300462

2. Explain class, object
類別是物件相同特性和行為訊息的集合;例如:「車」是一種類別,而轎車、卡車、箱型車....等
都是屬於「車」這個類別的一個物件。
參考:http://tw.knowledge.yahoo.com/question/?qid=1105070302573

3. Reading Assignments:
Read 1.1, 1.2, 1.3 of Textbook

4.1 Write a Java program as follows:

Let i=2;
Print i;
Print 2 * (i++);
Print i;



4.2 Write a Java program as follows:

Let i=2;
Print i;
Print 2 * (++i);
Print i;


4.3 Write a Java program as follows:

Let m=7, n=2;
Print (double) m/n;
Print m/ (double)n;