java中的this語句
java中this有兩種用法:
1、代表當前類
public class Dog{
private String name;
private float age;
public setName(String name){
* = name;
}
。。.
}
這里的this就代表的當前的這個Dog類。*可以理解為*,只是理解,不是等于。
2、在構造函數中的使用
public class Dog{
private String name;
private int age;
//有一個參數的構造函數
public Dog(String name){
* = name;
}
public Dog(String name,int age){
* = name;
* = age;
}
//這個無參構造方法里調用的有兩個參數的構造方法,這個也就是this的第二種用法了!
public Dog(){
this("nihao",20);
}
}
this用在什么句子里
It “它" 一般無生命的東西都用it來指代,“that,this”用在單數,“those,these"用于復數 this 這,這個,后跟單數名詞,比如這本書,this book。
these 這,這些,后跟復數名詞,比如這些書,these books。 those 那,那些,后跟復數名次,比如那些書,those books。
而且,these一般指較近的一些人或事物,而those指較遠的一些人或事物1。作主語、賓語、表語或定語。
This is my book。 這是我的書。
Do you like this? 你喜歡這個嗎? That book is mine。 那本書是我的。
What I want is this? 我要的就是這個。 2。
this / these一般用來指時間或空間上較近的人或物;而that / those常指時間或空間上較遠的人或物。 This is a pen and that is a pencil。
We are very busy these days。 3。
this / these可指后面要講到的事情,而that / those常指前面提到過的事物。 John asked me to help him with his lessons this evening。
I'm afraid I can't do that。(that指上句提到的help him with his lessons) 4。
that / those可用來指代前面提到的名詞。 This book is not so interesting as that I read yesterday。
這本書不如我昨天看過的那本有趣。(that指代the book) 5。
在打電話時,常用that詢問對方是“誰”,用this介紹自己是“誰”。 —Is that Mrs Black speaking ? 你是布萊克夫人嗎? —Yes, Who's that ? 是的,你是哪一位? —This is Mary, Mrs Black。
我是瑪麗,夫人。 。
java中的this語句
java中this有兩種用法:1、代表當前類public class Dog{ private String name; private float age; public setName(String name){ * = name; } 。
。.}這里的this就代表的當前的這個Dog類。
*可以理解為*,只是理解,不是等于。2、在構造函數中的使用public class Dog{ private String name; private int age; //有一個參數的構造函數 public Dog(String name){ * = name; } public Dog(String name,int age){ * = name; * = age; } //這個無參構造方法里調用的有兩個參數的構造方法,這個也就是this的第二種用法了! public Dog(){ this("nihao",20); }}。
this is 與 is this 這兩個英語句子開頭有什么區別
this is與is this的區別為:意思不同、用法不同、引導的句子不同。
一、意思不同
1、this is:這是。
2、is this:就是這樣,是這個,就是這個。
二、用法不同
1、this is:this用作形容詞作“這”解時,用于修飾表示在時間、地點、想法上更接近講話者的事物或人,也可與包括現在的日子或一段時間的詞語連用。“this+one's+ n. ”是一種簡潔的文體,有強調意味,“this+基數詞+時間名詞”表示一段時間。this可與of短語連用,后接名詞性物主代詞或名詞所有格。
2、is this:一般疑問句是疑問句的一種。它是一般只用yes(是)或no(否)來回答的句子。朗讀一般疑問句時用升調,而一般疑問句的簡略答語則用降調。根據一般疑問句不同的家族,可以用不同的方法將陳述句變為相應的一般疑問句。
三、引導的句子不同
1、this is:this is所引導的是陳述句。
2、is this:is this所引導的是一般疑問句。