今天利用砍字串的method把h前面的字串抓出來還有e後面的字串抓出來
再把這兩個字串中間放入love的字串,就可以達成我們要的目的
第二張圖片和第一章圖片的句子不同了!!!
但是hate還是改成了love
2007年9月28日 星期五
2007年9月27日 星期四
2007年9月21日 星期五
Homework 9/21/2007
1. Explain bytecode, JVM
bytecode:
bytecode also called intermediate code,this code could be the same to all appliances or all computers,and we can use a small,easy-to-write,and inexpensive program to translate this code to machine code,so we can easily change to machine code to operate those cpu or something.
JVM(Java Virtual Machine):
In the following question,we know what bytecode is.The bytecode just like a machine language of Java Virtual Machine.So we can use JVM to run the program we write in bytecode.
2. Explain class, object
class:
class is the name for a type whose values are objects.Many object to organize class.Those object also some data.This data has their attributes and can do actions to those data.
object:
object are entities that store data and can take actions.Object can take actions.
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;
Ans: 2, 4, 3
4.2 Write a Java program as follows:
Let i=2;
Print i;
Print 2 * (++i);
Print i;
Ans: 2, 6, 3
4.3 Write a Java program as follows:
Let m=7, n=2;
Print (double) m/n;
Print m/ (double)n;
Ans: 3.5, 3.5
bytecode:
bytecode also called intermediate code,this code could be the same to all appliances or all computers,and we can use a small,easy-to-write,and inexpensive program to translate this code to machine code,so we can easily change to machine code to operate those cpu or something.
JVM(Java Virtual Machine):
In the following question,we know what bytecode is.The bytecode just like a machine language of Java Virtual Machine.So we can use JVM to run the program we write in bytecode.
2. Explain class, object
class:
class is the name for a type whose values are objects.Many object to organize class.Those object also some data.This data has their attributes and can do actions to those data.
object:
object are entities that store data and can take actions.Object can take actions.
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;
Ans: 2, 4, 3
4.2 Write a Java program as follows:
Let i=2;
Print i;
Print 2 * (++i);
Print i;
Ans: 2, 6, 3
4.3 Write a Java program as follows:
Let m=7, n=2;
Print (double) m/n;
Print m/ (double)n;
Ans: 3.5, 3.5
2007年9月20日 星期四
Homework 9/14/2007
1. Watch The Inside Story (Video), write your words on the development and inventor of Java.
影片開不起來咧
2. List at least 5 applications of Java. You must provide the references you used. We recommend Google Search engine.
基本上對JAVA的印象其實很酷
因為從手機開始流行之後
就有人說,自己寫一些類似衛星導航的東西
用嵌入式的方法寫到手機裡面
不過那時候的我還懵懵懂懂的
要找應用
讓我先上了Wikipedia晃了幾圈
1對於我們大學生來說最廣泛的應用就是手機裡面的軟體或是遊戲,平常網路也經常使用到,像是之前上過網際網路這門課裡面FIREFOX的許多掛載的小東西,很多都是JAVA的傑作
2在JAVA的特性下,可以利用JAVA在網路上的便利性,創造更多造福人群的網頁,像是google map或是google的各種發明
3大家都是查了才發現,原來JAVA會用在我們生活中使用的那小卡片上面,像是手機SIM卡或是其他一些晶片卡
4就類似我以前聽到的可以把JAVA內嵌到手機,現在也有很多數位家庭是用一些程式遠端操控家電,當然JAVA也是沒問題的
5拿來利用在一些投資或是.......運動彩卷似乎也是種應用
影片開不起來咧
2. List at least 5 applications of Java. You must provide the references you used. We recommend Google Search engine.
基本上對JAVA的印象其實很酷
因為從手機開始流行之後
就有人說,自己寫一些類似衛星導航的東西
用嵌入式的方法寫到手機裡面
不過那時候的我還懵懵懂懂的
要找應用
讓我先上了Wikipedia晃了幾圈
1對於我們大學生來說最廣泛的應用就是手機裡面的軟體或是遊戲,平常網路也經常使用到,像是之前上過網際網路這門課裡面FIREFOX的許多掛載的小東西,很多都是JAVA的傑作
2在JAVA的特性下,可以利用JAVA在網路上的便利性,創造更多造福人群的網頁,像是google map或是google的各種發明
3大家都是查了才發現,原來JAVA會用在我們生活中使用的那小卡片上面,像是手機SIM卡或是其他一些晶片卡
4就類似我以前聽到的可以把JAVA內嵌到手機,現在也有很多數位家庭是用一些程式遠端操控家電,當然JAVA也是沒問題的
5拿來利用在一些投資或是.......運動彩卷似乎也是種應用
訂閱:
文章 (Atom)