static是什么意思,static中文翻譯,static發(fā)音、用法及例句
?static
static發(fā)音
英:['st?t?k] 美:[?st?t?k]
英: 美:
static中文意思翻譯
n.靜電, 靜電干擾
n.(猛烈的)反對或抨擊
adj.靜態(tài)的, 靜止的, 穩(wěn)定的, 靜力的, 靜電的
static詞形變化
副詞: statically | 形容詞: statical |
static同義詞
interference | unchanging | electrostatic | fixed | atmospherics | motionless | inactive | inert | constant | electrical interference | stagnant | sluggish | stable | unvarying | vegetable | invariable | still | electrical | dormant | immobile | stationary | standing
static反義詞
dynamic
static常見例句
1 、So a static table in shared memory is used.───因此將使用共享內(nèi)存中的一個靜態(tài)表。
2 、Deletes a persistent static route.───刪除一個永久靜態(tài)路由。
3 、Supply pressure is greater than static head pressure.───供水壓力大于落差壓力。
4 、I really don't want no static at work after this.─── 我真不希望以后工作中再發(fā)生摩擦了
5 、You can achieve both of these effects with the static keyword.───為滿足這兩方面的要求,可使用static(靜態(tài))關(guān)鍵字。
6 、Don't take a static view of things.───不要用固定的眼光看問題。
7 、SMEMBER = static member routing.───SMEMBER = 靜態(tài)成員路由。
8 、The File class provides static methods.───File類提供靜態(tài)方法。
9 、A Web page that hosts the controls in a static connection.───一個網(wǎng)頁,該網(wǎng)頁承載靜態(tài)連接中的控件。
10 、Classes with static data members should not be shared.───不應(yīng)共享具有靜態(tài)數(shù)據(jù)成員的類。
11 、Pushes the address of a static field onto the evaluation stack.───將靜態(tài)字段的地址推送到計算堆棧上。
12 、They don't stay stagnant and static in any position.─── 它們不會停滯不前 或在某處定格
13 、Electrically conductive adhesive for static.───導(dǎo)電膠,可以靜電消散。
14 、Compared with her he felt static, without temperament.───和她相比,他實在是個心平氣和,毫無脾氣的人。
15 、Using oxhorn comb will make you feel no static electricity.───使用牛角梳不會產(chǎn)生靜電感。
16 、Static fields and methods are not CLS-compliant.───全局靜態(tài)字段和方法不符合CLS。
17 、Foreigner: Surely you don't mean your society remained static?───外:你的意思當(dāng)然不會是說你們的社會停滯不前吧?
18 、Some programming languages refer to such items as static members.───一些編程語言將這樣的項稱為靜態(tài)成員。
19 、Wabin Faro in the island, time seems static.───在瓦賓法魯島上,時間仿佛是靜止不動的。
20 、The water that fills the pores below the water table is not static.───充填在潛水面以下孔隙中的水不是靜止的。
21 、Weathering of rock is essentially a static process.───巖石的風(fēng)化作用基本上是一種靜力作用。
22 、There is no support for synchronized static fields.───不支持同步靜態(tài)字段。
23 、You can bind to a field of a data item or to a static value.───對象的屬性??梢越壎ǖ綌?shù)據(jù)項的字段或靜態(tài)值。
24 、Individual user should have Static IP address.───個人用戶需有固定IP地址。
25 、I can not hear the program because there is too much static.───因為有太多的靜電干擾,我不能聽到節(jié)目。
26 、Can create virtual "static" album for the dynamic albums.───可以為動態(tài)相冊創(chuàng)建虛擬"靜態(tài)"相冊。
27 、No, it was more likea static interferingwith my..─── 不 更像是一種類似靜電的妨礙 把我...
28 、It must be dynamic, not static.───它必須是積極的,而不是消極的。
29 、Nylon resists soiling and reduces the amount of static electricity.───尼龍不容易臟,可以減少靜電。
30 、Whatever she might become she would never be static.───不管她將來會變成什么樣的人,她永遠(yuǎn)不會閑著不動的。
31 、Take precautionary measures against static discharges.───對靜電采取預(yù)防措施;
32 、They're not dead because they're not static.─── 它們并非死氣沉沉因為它們不是靜態(tài)的
33 、Application of Scorpio 6502 to geophysical static net.───Scorpio6502 GPS在物探靜態(tài)網(wǎng)中的應(yīng)用
34 、You can only use static method in a static method!───回復(fù):我在一個方法不能使用,幫忙,很簡單的.
35 、SQL Server creates a static snapshot cursor.───SQL Server創(chuàng)建了一個靜態(tài)快照游標(biāo)。
36 、This is not a place for the static or complacent.Never has been.───不是一個可以靜態(tài)或洋洋得意的地方,從來不曾是。
37 、Use the texture as you would a static texture.───使用紋理時你應(yīng)該使用靜態(tài)紋理。
38 、Due to heavy interference(static) Contact Kun Ming with difficulty.───因嚴(yán)重干擾(滅電干擾)與昆明聯(lián)系困難。你被打斷,請再講一次。
39 、Test Equipment - To test the function of static control products.───充電分析器。防靜電產(chǎn)品之檢測儀器-檢測防靜電產(chǎn)品之性能。
40 、The national birth rate has remained static for the last few years.───全國出生率近幾年來保持穩(wěn)定。
41 、He's such a buzz kill. I don't need the static.─── 他那么愛掃興的人 我不想挨訓(xùn)
42 、The name of the static method that the delegate is to represent.───委托要表示的靜態(tài)方法的名稱。
43 、The static modifier is used for the factorial method.───static修飾符用于階乘方法。
44 、Markets have static, or unmoving features.───市場有靜態(tài)的,或者說不變的特征。
45 、The Expression must be a literal or null, or a static function.───Expression必須為文字、null或靜態(tài)函數(shù)。
46 、Adds a static route to the route table.───在路由表中添加一個靜態(tài)路由。
47 、Messed with my radio. I heard the static.─── 對我的收音機產(chǎn)生了干擾 我聽見了靜電電流聲
48 、Don't view things as static and isolated.───不要靜止地孤立地看待事物。
49 、The static images that comprise the cut scenes are also quite nice.───包括被切的現(xiàn)場的靜態(tài)圖象也十分好。
50 、In Compatibility Mode, the chart is pasted as a static picture.───在兼容模式下,圖表將粘貼為靜態(tài)圖片。
51 、Somebody was hiding messages in the static.─── 有人利用干擾 隱藏信息
52 、Even with static population, consumption rose steeply.───即便人口保持穩(wěn)定,消費亦大幅增加。
53 、He pointed out that a play is not a static object like a picture.───他指出戲劇不像圖片一樣靜止不動。
54 、Electro static Fields in ESD process are theoretically analyzed.───分析了靜電放電 (ESD)過程中的靜電場。
55 、He jumped into the icy blast, his static line unhooked.───他跳進(jìn)冰冷的風(fēng),解下他的靜止的線。
56 、It doesn't know about Darwin and only builds static libraries.───它不認(rèn)識Darwin并且只構(gòu)建靜態(tài)庫。
57 、Like dynamic TLS, static TLS associates data with a thread.───與動態(tài)TLS一樣,靜態(tài)TLS也能夠?qū)?shù)據(jù)與線程聯(lián)系起來。
58 、Initialize Static Class Members with Static Constructors.───使用靜態(tài)構(gòu)造器初始化靜態(tài)類成員。
59 、Pushes the value of a static field onto the evaluation stack.───將靜態(tài)字段的值推送到計算堆棧上。
60 、For static TLS to work, the operating system must get involved.───為了使靜態(tài)TLS能夠運行,操作系統(tǒng)必須參與其操作。
61 、You cannot hear me.I am static and unmoving.───你聽不到我的聲音,因為我是靜止的。
62 、The Select clause can also include static values.───Select子句還可以包含靜態(tài)值。
63 、Code Block 11 is a partial listing of these static methods.───代碼塊11是這些靜態(tài)方法的部分清單。
64 、Balance: A static position which holds a distinct shape.───平衡:保持特定姿勢的穩(wěn)定狀態(tài)。
65 、His eyeball is static.───他的眼球一動不動。
66 、A delegate instance encapsulates a static or an instance method.───委托是函數(shù)的封裝,它代表一“類”函數(shù)。
67 、Does not hold static data over successive calls.───不為連續(xù)的調(diào)用持有靜態(tài)數(shù)據(jù)。
68 、Adds a static service to the static service table.───在服務(wù)表中添加一個靜態(tài)服務(wù)。
69 、Remove static, hiss, hum, or other constant background noises.───去除靜電噪聲、嘶嘶聲、嗡嗡聲或其它持續(xù)背景噪聲。
70 、Generally, the method of search is static state and trends search.───其中靜態(tài)查找又可以分為順序查找。
71 、Surely you don't mean your society remained static?───你的意思當(dāng)然不會是說你們的社會停滯不前吧?
72 、They will probably give you a lot of static about your editorial.───他們有可能對你的社論給予鋪天蓋地的抨擊。
73 、Object that allows you to set the appearance of a static menu.───對象的引用,使用該對象可以設(shè)置靜態(tài)菜單的外觀。
74 、Do not use a static mutable state in a finalizer.───不要在終結(jié)器中使用靜態(tài)可變狀態(tài)。
75 、You can also bind to a static value.───也可以綁定到靜態(tài)值。
76 、They are known to use static data structures.───眾所周知它們使用了靜態(tài)數(shù)據(jù)結(jié)構(gòu)體。
77 、Attempts to remove a static control will throw an exception.───嘗試移除靜態(tài)控件將引發(fā)一個異常。
78 、Do not treat static classes as a miscellaneous bucket.───不要認(rèn)為靜態(tài)類可無所不包。
79 、If the field is static, the obj parameter is ignored.───如果該字段為static,則忽略obj參數(shù)。
80 、The static elastic modulus of the alloy is lower than 30 GPa.───合金的靜態(tài)彈性模量小于30GPa;
81 、The name of the static method that the delegate represents.───委托表示的靜態(tài)方法的名稱。
82 、The sound is not clear.Theres a lot of static.───聲音不清楚,有靜電干擾。
83 、But then if you stand too still, you look too static.─── 但如果你就那么站著 你看起來會太靜止了
84 、Its genesis is corresponding to the relative static environment.───其成因?qū)?yīng)著相對靜態(tài)的環(huán)境。
85 、We've had static at site nine all day.─── 我們在9號實驗點一天了都沒有消息
86 、Design the report using a static connection string.───使用靜態(tài)連接字符串設(shè)計報表。
87 、It's less than one-tenth the speed of the static array.───它的速度不及靜態(tài)數(shù)組的十分之一。
88 、Adds a range to the static IP address pool.───在靜態(tài)IP地址池中添加一個范圍。
89 、Her hair was full of static.───她的頭發(fā)上靜電很強。
90 、The compactor only works when the truck is static.─── 壓縮機只有在車子靜止時才會工作
關(guān)鍵字static的作用是什么
聲明為static的變量實質(zhì)上就是全局變量。聲明為static的方法有以下幾條限制:
它們僅能調(diào)用其他的static 方法。
它們只能訪問static數(shù)據(jù)。
它們不能以任何方式引用this 或super
如果你需要通過計算來初始化你的static變量,你可以聲明一個static塊,Static 塊僅在該類被加載時執(zhí)行一次。
關(guān)鍵字static的作用是什么
在Java語言中,static表示“全局”或者“靜態(tài)”的意思,用來修飾成員變量和成員方法,也可以形成靜態(tài)static代碼塊,但是Java語言中沒有全局變量的概念。
被static修飾的成員變量和成員方法獨立于該類的任何對象。也就是說,它不依賴類特定的實例,被類的所有實例共享。只要這個類被加載,Java虛擬機就能根據(jù)類名在運行時數(shù)據(jù)區(qū)的方法區(qū)內(nèi)定找到他們。因此,static對象可以在它的任何對象創(chuàng)建之前訪問,無需引用任何對象。
用public修飾的static成員變量和成員方法本質(zhì)是全局變量和全局方法,當(dāng)聲明它類的對象時,不生成static變量的副本,而是類的所有實例共享同一個static變量。
static變量前可以有private修飾,表示這個變量可以在類的靜態(tài)代碼塊中,或者類的其他靜態(tài)成員方法中使用(當(dāng)然也可以在非靜態(tài)成員方法中使用),但是不能在其他類中通過類名來直接引用,這一點很重要。實際上你需要搞明白,private是訪問權(quán)限限定,static表示不要實例化就可以使用,這樣就容易理解多了。static前面加上其它訪問權(quán)限關(guān)鍵字的效果也以此類推。
static修飾的成員變量和成員方法習(xí)慣上稱為靜態(tài)變量和靜態(tài)方法,可以直接通過類名來訪問,訪問語法為:
類名.靜態(tài)方法名(參數(shù)列表...)
類名.靜態(tài)變量名
用static修飾的代碼塊表示靜態(tài)代碼塊,當(dāng)Java虛擬機(JVM)加載類時,就會執(zhí)行該代碼塊(用處非常大)。
static在Java語言中的使用有四種:(變量、方法、代碼塊、內(nèi)部類)
1、static變量
按照是否靜態(tài)的對類成員變量進(jìn)行分類可分兩種:一種是被static修飾的變量,叫靜態(tài)變量或類
變量;另一種是沒有被static修飾的變量,叫實例變量。
兩者的區(qū)別是:
對于靜態(tài)變量在內(nèi)存中只有一個拷貝(節(jié)省內(nèi)存),JVM只為靜態(tài)分配一次內(nèi)存,在加載類的過
程中完成靜態(tài)變量的內(nèi)存分配,可用類名直接訪問(方便),當(dāng)然也可以通過對象來訪問(但是這是不推薦的)。
對于實例變量,沒創(chuàng)建一個實例,就會為實例變量分配一次內(nèi)存,實例變量可以在內(nèi)存中有多個拷貝,互不影響(靈活)。
2、靜態(tài)方法
靜態(tài)方法可以直接通過類名調(diào)用,任何的實例也都可以調(diào)用,因此靜態(tài)方法中不能用this和super關(guān)鍵字,不能直接訪問所屬類的實例變量和實例方法(就是不帶static的成員變量和成員成員方法),只能訪問所屬類的靜態(tài)成員變量和成員方法。因為實例成員與特定的對象關(guān)聯(lián)!這個需要去理解,想明白其中的道理,不是記憶?。?!
因為static方法獨立于任何實例,因此static方法必須被實現(xiàn),而不能是抽象的abstract。
3、static代碼塊
static代碼塊也叫靜態(tài)代碼塊,是在類中獨立于類成員的static語句塊,可以有多個,位置可以隨便放,它不在任何的方法體內(nèi),JVM加載類時會執(zhí)行這些靜態(tài)的代碼塊,如果static代碼塊有多個,JVM將按照它們在類中出現(xiàn)的先后順序依次執(zhí)行它們,每個代碼塊只會被執(zhí)行一次。
例如:
// -- Java code example :)
public class Test5 {
private static int a;
private int b;
static {
Test5.a = 3 ;
System.out.println(a);
Test5 t = new Test5();
t.f();
t.b = 1000 ;
System.out.println(t.b);
}
static {
Test5.a = 4 ;
System.out.println(a);
}
public static void main(String[] args) {
// TODO 自動生成方法存根
}
// -- static代碼塊的位置可以隨便放置!
static {
Test5.a = 5 ;
System.out.println(a);
}
public void f(){
System.out.println( " hhahhahah " );
}
}
運行結(jié)果:
3
hhahhahah
1000
4
5
利用靜態(tài)代碼塊可以對一些static變量進(jìn)行賦值,最后再看一眼這些例子,都一個static的main方法,這樣JVM在運行main方法的時候可以直接調(diào)用而不用創(chuàng)建實例。
4. 靜態(tài)內(nèi)部類(Inner Class)
為正確理解static在應(yīng)用于內(nèi)部類時的含義,必須記住內(nèi)部類的對象默認(rèn)持有創(chuàng)建它的那個封裝類的一個對象的句柄。然而,假如我們說一個內(nèi)部類是static的,這種說法卻是不成立的。
static內(nèi)部類意味著:
(1) 為創(chuàng)建一個static內(nèi)部類的對象,我們不需要一個外部類對象。
(2) 不能從static內(nèi)部類的一個對象中訪問一個外部類對象。
但在存在一些限制:由于static成員只能位于一個類的外部級別,所以內(nèi)部類不可擁有static數(shù)據(jù)或static內(nèi)部類。
倘若為了創(chuàng)建內(nèi)部類的對象而不需要創(chuàng)建外部類的一個對象,那么可將所有東西都設(shè)為static。為了能正常工作,同時也必須將內(nèi)部類設(shè)為static。如下所示:
//: Parcel10.Java
// Static inner classes
package c07.parcel10;
abstract class Contents {
abstract public int value();
}
interface Destination {
String readLabel();
}
public class Parcel10 {
private static class PContents
extends Contents {
private int i = 11;
public int value() { return i; }
}
protected static class PDestination
implements Destination {
private String label;
private PDestination(String whereTo) {
label = whereTo;
}
public String readLabel() { return label; }
}
public static Destination dest(String s) {
return new PDestination(s);
}
public static Contents cont() {
return new PContents();
}
public static void main(String[] args) {
Contents c = cont();
Destination d = dest("Tanzania");
}
} ///:~
在main()中,我們不需要Parcel10的對象;相反,我們用常規(guī)的語法來選擇一個static成員,以便調(diào)用將句柄返回Contents和Destination的方法。
通常,我們不在一個接口里設(shè)置任何代碼,但static內(nèi)部類可以成為接口的一部分。由于類是“靜態(tài)”的,所以它不會違反接口的規(guī)則——static內(nèi)部類只位于接口的命名空間內(nèi)部:
//: IInterface.java// Static inner classes inside interfaces
interface IInterface {
static class Inner {
int i, j, k;
public Inner() {}
void f() {}
}
} ///:~
建議大家在每個類里都設(shè)置一個main(),將其作為那個類的測試床使用。但這樣做的一個缺點就是額外代碼的數(shù)量太多。若不愿如此,可考慮用一個static內(nèi)部類容納自己的測試代碼。如下所示:
//: TestBed.java// Putting test code in a static inner class
class TestBed {
TestBed() {}
void f() { System.out.println("f()"); }
public static class Tester {
public static void main(String[] args) {
TestBed t = new TestBed();
t.f();
}
}
} ///:~
這樣便生成一個獨立的、名為TestBed$Tester的類(為運行程序,請使用“java TestBed$Tester”命令)??蓪⑦@個類用于測試,但不需在自己的最終發(fā)行版本中包含它。
PS: 靜態(tài)內(nèi)部類--代碼示例
Java中我們經(jīng)常會使用到內(nèi)部類(inner classes),如果沒有Static的內(nèi)部類,它的instance的創(chuàng)建是依賴于其元類的。這樣的關(guān)系似乎比較難表達(dá),讓我們直接看下面的代碼:
1: public class Outer {
2: int var;
3
4: void outerHoge() {
5: System.out.println("hogehoge");
6: }
7:
8: void outerHote2() {
9:
10: Inner i = new Inner();
11: staticHoge sh = new StaticHoge();
12:
13:
17: // Inner i2 = new this.Inner();
18: }
19:
20:
21: class Inner {
22: void innerHoge() {
23:
26: var = 1;
27: outerHoge();
28: }
29: }
30:
31: static class StaticHoge() {
32: void methodHoge() {
33:
36: // var = 10;
37: // outerHoge();
38: // Inner inner = new Inner();
39: }
40: }
41: }
static的內(nèi)部類的使用,我們可以像Package一樣用它:
1: public class Outer2 {
2: public static class StaticHoge1 {
3: //...
4: }
5: public static class StaticHoge2 {
6: //...
7: }
8: }
可以像下面這樣使用:
1: Outer2.StaticHoge1 sh1 = new Outer2.StaticHoge1();
2: Outer2.StaticHoge2 sh2 = new Outer2.StaticHoge2();
本站其他內(nèi)容推薦
1、Zeus gnome unadvertised unification electrical desegregate logon remoulade catecholamine Averroes
2、hues中文翻譯,hues是什么意思,hues發(fā)音、用法及例句
3、非主流男生頹廢網(wǎng)名,非主流網(wǎng)名男
4、intifada是什么意思,intifada中文翻譯,intifada發(fā)音、用法及例句
5、珍饈美饌的意思是什么,珍饈美饌的意思,珍饈美饌成語解釋,珍饈美饌是什么意思含義寓意
7、寬[ kuān ],寬字的拼音,部首,意思,寬字的筆順,筆畫順序怎么寫
8、展現(xiàn)的近義詞是什么,展現(xiàn)的近義詞,展現(xiàn)是什么意思,展現(xiàn)的同義詞,展現(xiàn)的反義詞
9、沒有知識或經(jīng)驗的英文,英語,inexperienced是什么意思,inexperienced中文翻譯,inexperienced怎么讀、發(fā)音、用法及例句
10、粉狀的英文,英語,pulverized是什么意思,pulverized中文翻譯,pulverized怎么讀、發(fā)音、用法及例句
11、天然的英文,英語,savageness是什么意思,savageness中文翻譯,savageness怎么讀、發(fā)音、用法及例句
版權(quán)聲明: 本站僅提供信息存儲空間服務(wù),旨在傳遞更多信息,不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任,不代表本網(wǎng)贊同其觀點和對其真實性負(fù)責(zé)。如因作品內(nèi)容、版權(quán)和其它問題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報,一經(jīng)查實,本站將立刻刪除。