亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? concepts.doc.html

?? 一本關于java方面的書籍 英文html形式 關于Java虛擬機
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<a name="25376"></a><h3>2.4.5	 Reference Types, Objects, and Reference Values</h3><a name="25380"></a>There are three kinds of reference types: the <i>class types</i> <a href="Concepts.doc.html#16198">(&#167;2.8)</a>, the <i>interface types</i> <a href="Concepts.doc.html#16432">(&#167;2.13)</a>, and the <i>array types</i> <a href="Concepts.doc.html#16446">(&#167;2.14)</a>. An <i>object</i> is a dynamically created class instance or an array. The reference values (often just <i>references</i>) are <i>pointers </i>to these objects and a special null reference, which refers to no object.<p><a name="25388"></a>A class instance is explicitly created by a <i>class instance creation expression</i>, or by invoking the <code>newInstance</code> method of class <code>Class</code>. An array is explicitly created by an <i>array creation expression</i>. An object is created in the Java heap, and is garbage collected after there are no more references to it. Objects are never reclaimed or freed by explicit Java language directives.<p><a name="25389"></a>There may be many references to the same object. Most objects have state, stored in the fields of objects that are instances of classes or in the variables that are the components of an array object. If two variables contain references to the same object, the state of the object can be modified using one variable's reference to the object, and then the altered state can be observed through the other variable's reference.<p><a name="25393"></a>Each object has an associated <i>lock</i> (<a href="Concepts.doc.html#24465">&#167;2.17</a>, <a href="Threads.doc.html#22500">&#167;8.13)</a> that is used by <code>synchronized</code> methods and by the <code>synchronized</code> statement to provide control over concurrent access to state by multiple threads (<a href="Concepts.doc.html#24465">&#167;2.17</a>, <a href="Threads.doc.html#22488">&#167;8.12)</a>.<p><a name="27419"></a>Reference types form a hierarchy. Each class type is a subclass of another class type, except for the class <code>Object</code> <a href="Concepts.doc.html#27433">(&#167;2.4.6)</a>, which is the superclass <a href="Concepts.doc.html#20358">(&#167;2.8.3)</a> of all other class types. All objects, including arrays, support the methods of class <code>Object</code>. String literals <a href="Concepts.doc.html#23152">(&#167;2.3)</a> are references to instances of class <code>String</code> <a href="Concepts.doc.html#25486">(&#167;2.4.7)</a>.<p><a name="27433"></a><h3>2.4.6	 The Class <code>Object</code></h3><a name="25481"></a>The standard class <code>Object</code> is the superclass <a href="Concepts.doc.html#20358">(&#167;2.8.3)</a> of all other classes. A variable of type <code>Object</code> can hold a reference to any object, whether it is an instance of a class or an array. All class and array types inherit the methods of class <code>Object</code>.<p><a name="25486"></a><h3>2.4.7	 The Class <code>String</code> </h3><a name="25487"></a>Instances of class <code>String</code> represent sequences of Unicode characters <a href="Concepts.doc.html#25310">(&#167;2.1)</a>. A <code>String</code> object has a constant, unchanging value. String literals <a href="Concepts.doc.html#23152">(&#167;2.3)</a> are references to instances of class <code>String</code>.<p><a name="17255"></a><h3>2.4.8	 Operators on Objects</h3><a name="23253"></a>The operators on objects include field access, method invocation, cast, string concatenation, comparison for equality, <code>instanceof</code>, and the conditional operator <code>?:</code>.<p><a name="17203"></a><hr><h2>2.5	 Variables</h2><a name="17290"></a>A <i>variable</i> is a storage location. It has an associated type, sometimes called its <i>compile-time type</i>, that is either a primitive type <a href="Concepts.doc.html#19511">(&#167;2.4.1)</a> or a reference type <a href="Concepts.doc.html#25376">(&#167;2.4.5)</a>. A variable always contains a value that is assignment compatible <a href="Concepts.doc.html#19674">(&#167;2.6.6)</a> with its type. A variable of a primitive type always holds a value of that exact primitive type. A variable of reference type can hold either a null reference or a reference to any object whose class is assignment compatible <a href="Concepts.doc.html#19674">(&#167;2.6.6)</a> with the type of the variable. <p><a name="25533"></a>Compatibility of the value of a variable with its type is guaranteed by the design of the Java language because default values <a href="Concepts.doc.html#15858">(&#167;2.5.1)</a> are compatible and all assignments to a variable are checked, at compile time, for assignment compatibility.<p><a name="19554"></a>There are seven kinds of variables:<p><ol><a name="17990"></a><li>A <i>class variable </i>is a field of a class type declared using the keyword <code>static</code> <a href="Concepts.doc.html#16297">(&#167;2.9.1)</a> within a class declaration, or with or without the keyword <code>static</code> in an interface declaration. Class variables are created when the class or interface is loaded <a href="Concepts.doc.html#19175">(&#167;2.16.2)</a> and are initialized on creation to default values <a href="Concepts.doc.html#15858">(&#167;2.5.1)</a>. The class variable effectively ceases to exist when its class or interface is unloaded <a href="Concepts.doc.html#24377">(&#167;2.16.8)</a> after any necessary finalization of the class <a href="Concepts.doc.html#24377">(&#167;2.16.8)</a> has been completed.<a name="17982"></a><li>An <i>instance variable</i> is a field declared within a class declaration without using the keyword <code>static</code> <a href="Concepts.doc.html#16297">(&#167;2.9.1)</a>. If a class T has a field a that is an instance variable, then a new instance variable a is created and initialized to a default value <a href="Concepts.doc.html#15858">(&#167;2.5.1)</a> as part of each newly created object of class T or of any class that is a subclass of T. The instance variable effectively ceases to exist when the object of which it is a field is no longer referenced, after any necessary finalization of the object <a href="Concepts.doc.html#19147">(&#167;2.16.7)</a> has been completed.<a name="17995"></a><li><i>Array components</i> are unnamed variables that are created and initialized to default values <a href="Concepts.doc.html#15858">(&#167;2.5.1)</a> whenever a new object that is an array is created <a href="Concepts.doc.html#19124">(&#167;2.16.6)</a>. The array components effectively cease to exist when the array is no longer referenced.<a name="17996"></a><li><i>Method parameters</i> name argument values passed to a method. For every parameter declared in a method declaration, a new parameter variable is created each time that method is invoked. The new variable is initialized with the corresponding argument value from the method invocation. The method parameter effectively ceases to exist when the execution of the body of the method is complete.<a name="23360"></a><li><i>Constructor parameters</i> name argument values passed to a constructor. For every parameter declared in a constructor declaration, a new parameter variable is created each time a class instance creation expression or explicit constructor invocation is evaluated. The new variable is initialized with the corresponding argument value from the creation expression or constructor invocation. The constructor parameter effectively ceases to exist when the execution of the body of the constructor is complete.<a name="17997"></a><li>An <i>exception-handler parameter</i> variable is created each time an exception is caught by a <code>catch</code> clause of a <code>try</code> statement <a href="Concepts.doc.html#22746">(&#167;2.15.2)</a>. The new variable is initialized with the actual object associated with the exception <a href="Concepts.doc.html#24863">(&#167;2.15.3)</a>. The exception-handler parameter effectively ceases to exist when execution of the block associated with the <code>catch</code> clause <a href="Concepts.doc.html#22746">(&#167;2.15.2)</a> is complete.<a name="18000"></a><li><i>Local variables </i>are declared by local variable declaration statements. Whenever the flow of control enters a block or a <code>for</code> statement, a new variable is created for each local variable declared in a local variable declaration statement immediately contained within that block or <code>for</code> statement. The local variable is not initialized, however, until the local variable declaration statement that declares it is executed. The local variable effectively ceases to exist when the execution of the block or <code>for</code> statement is complete.</ol><a name="15858"></a><h3>2.5.1	 Initial Values of Variables</h3><a name="15862"></a>Every variable in a Java program must have a value before it is used:<p><ul><a name="15863"></a><li>Each class variable, instance variable, and array component is initialized with a <i>default value</i> when it is created:<a name="15874"></a><li>For type <code>byte</code>, the default value is zero, that is, the value of <code>(byte)0</code>.<a name="15875"></a><li>For type <code>short</code>, the default value is zero, that is, the value of <code>(short)0</code>.<a name="15876"></a><li>For type <code>int</code>, the default value is zero, that is, <code>0</code>.<a name="15877"></a><li>For type <code>long</code>, the default value is zero, that is, <code>0L</code>.<a name="15878"></a><li>For type <code>float</code>, the default value is positive zero, that is, <code>0.0f</code>.<a name="15879"></a><li>For type <code>double</code>, the default value is positive zero, that is, <code>0.0d</code>.<a name="15880"></a><li>For type <code>char</code>, the default value is the null character, that is, <code>'u0000'</code>.<a name="15881"></a><li>For type <code>boolean</code>, the default value is <code>false</code>.<a name="15888"></a><li>For all reference types <a href="Concepts.doc.html#25376">(&#167;2.4.5)</a>, the default value is <code>null</code> <a href="Concepts.doc.html#23152">(&#167;2.3)</a>.<a name="15892"></a><li>Each method parameter <a href="Concepts.doc.html#17203">(&#167;2.5)</a> is initialized to the corresponding argument value provided by the invoker of the method.<a name="15899"></a><li>Each constructor parameter <a href="Concepts.doc.html#17203">(&#167;2.5)</a> is initialized to the corresponding argument value provided by an object creation expression or explicit constructor invocation.<a name="15906"></a><li>An exception-handler parameter <a href="Concepts.doc.html#22746">(&#167;2.15.2)</a> is initialized to the thrown object representing the exception <a href="Concepts.doc.html#24863">(&#167;2.15.3)</a>. <a name="15919"></a><li>A local variable must be explicitly given a value before it is used, by either initialization or assignment.</ul><a name="23409"></a><h3>2.5.2	 Variables Have Types, Objects Have Classes</h3><a name="25606"></a>Every object belongs to some particular class. This is the class that was mentioned in the class instance creation expression that produced the object, or the class whose class object was used to invoke the <code>newInstance</code> method to produce the object. This class is called <em>the</em> class of the object. An object is said to be an <i>instance</i> of its class and of all superclasses of its class. Sometimes the class of an object is called its "runtime type," but "class" is the more accurate term.<p><a name="15939"></a>(Sometimes a variable or expression is said to have a "runtime type," but that is an abuse of terminology; it refers to the class of the object referred to by the value of the variable or expression at run time, assuming that the value is not <code>null</code>. Properly speaking, type is a compile-time notion. A variable or expression has a type; an object or array has no type, but belongs to a class.)<p><a name="25614"></a>The type of a variable is always declared, and the type of an expression can be deduced at compile time. The type limits the possible values that the variable can hold or the expression can produce at run time. If a runtime value is a reference that is not <code>null</code>, it refers to an object or array that has a class (not a type), and that class will necessarily be compatible with the compile-time type.<p><a name="25612"></a>Even though a variable or expression may have a compile-time type that is an interface type, there are no instances of interfaces <a href="Concepts.doc.html#16432">(&#167;2.13)</a>. A variable or expression whose type is an interface type can reference any object whose class implements that interface.<p><a name="25629"></a>Every array also has a class. The classes for arrays have strange names that are not valid Java identifiers; for example, the class for an array of <code>int</code> components has the name <code>"[I"</code>.<p><a name="25611"></a><hr><h2>2.6	 Conversions and Promotions</h2><a name="15943"></a><i>Conversions</i> implicitly change the type, and sometimes the value, of an expression to a type acceptable for its surrounding context. In some cases this will require a corresponding action at run time to check the validity of the conversion or to translate the runtime value of the expression into a form appropriate for the new type. <p><a name="25645"></a><i>Numeric promotions</i> are conversions that change an operand of a numeric operation to a wider type, or both operands of a numeric operation to a common type, so that an operation can be performed.<p><a name="18104"></a>In Java, there are six broad kinds of conversions:<p><ul><a name="15950"></a><li>Identity conversions<a name="23419"></a><li>Widening primitive conversions<a name="23420"></a><li>Narrowing primitive conversions<a name="23421"></a><li>Widening reference conversions<a name="23422"></a><li>Narrowing reference conversions<a name="23423"></a>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合中文字幕国产| 欧美一区二区三区在| 日韩一区二区三区视频在线观看| 亚洲男同性视频| 国产91高潮流白浆在线麻豆| 欧美电影免费观看高清完整版 | 成人av免费在线| 久久久精品欧美丰满| 国产福利一区二区三区在线视频| 91精品国产综合久久精品图片| 亚洲精品你懂的| 色婷婷亚洲综合| 一区二区三区四区亚洲| www.日韩在线| 亚洲男人的天堂网| 91色在线porny| 一区二区三区日韩欧美精品| 丁香婷婷综合网| 亚洲色图一区二区| 欧美三区在线观看| 日韩精品电影一区亚洲| 宅男噜噜噜66一区二区66| 日本中文字幕一区| 久久综合久久综合久久| 日韩在线观看一区二区| 一本大道久久a久久精二百| 一区二区三区国产| 欧美一区二区三区视频免费| 日韩成人一级大片| 国产欧美一区二区在线观看| 91丨九色丨黑人外教| 日本sm残虐另类| 久久久噜噜噜久久人人看| 99re这里只有精品首页| 日韩精品亚洲一区二区三区免费| 26uuu精品一区二区在线观看| 99精品久久99久久久久| 奇米精品一区二区三区四区| 欧美成人video| av中文字幕亚洲| 裸体在线国模精品偷拍| 亚洲人精品午夜| 久久先锋影音av鲁色资源网| 99国产精品99久久久久久| 国产真实乱偷精品视频免| 亚洲综合色在线| 中文文精品字幕一区二区| 精品国产第一区二区三区观看体验| 色综合天天视频在线观看| 粉嫩aⅴ一区二区三区四区| 麻豆视频一区二区| 午夜亚洲福利老司机| 亚洲精品美腿丝袜| 国产欧美日韩亚州综合 | 丁香婷婷综合色啪| 国产乱一区二区| 粉嫩绯色av一区二区在线观看| 激情欧美一区二区三区在线观看| 日韩精品每日更新| 视频一区二区国产| 天堂蜜桃一区二区三区| 午夜精品福利一区二区三区蜜桃| 1区2区3区国产精品| 亚洲欧美日韩国产手机在线| 欧美性大战久久久久久久 | 国产精品久久久久天堂| 国产婷婷色一区二区三区| 精品sm在线观看| 欧美美女黄视频| 欧美丰满一区二区免费视频| 日韩精品专区在线| 国产亚洲综合av| 亚洲一区二区三区在线播放| 天堂av在线一区| 岛国精品在线观看| 日本韩国欧美一区二区三区| 91电影在线观看| 91麻豆精品国产91久久久久 | 亚洲青青青在线视频| 亚洲国产日韩精品| 国产一区二区三区在线观看免费视频| 9i在线看片成人免费| 日韩三级视频在线看| 亚洲精品久久7777| 国产剧情在线观看一区二区| 日本道在线观看一区二区| 欧美一级黄色片| 中文字幕一区二区三区av| 青青草原综合久久大伊人精品优势| 成人深夜在线观看| 欧美精品一区视频| 欧美a级一区二区| 欧美亚一区二区| 国产精品乱人伦一区二区| 老司机精品视频导航| 欧美四级电影在线观看| 亚洲天堂精品在线观看| 美国十次了思思久久精品导航| 色成人在线视频| 有码一区二区三区| 色菇凉天天综合网| 亚洲日韩欧美一区二区在线| 成人激情免费网站| 国产精品污www在线观看| 麻豆精品在线观看| 亚洲一区在线观看免费| 成人免费观看视频| 亚洲人成亚洲人成在线观看图片| 国产成人精品网址| 精品精品国产高清a毛片牛牛 | 久久久久久久国产精品影院| 男女男精品视频网| 国产亚洲欧美日韩俺去了| 国产一区二区按摩在线观看| 中文幕一区二区三区久久蜜桃| 国产91精品精华液一区二区三区| 中文字幕一区二区三区四区 | 欧美一区欧美二区| 免费观看在线色综合| 久久久99精品久久| aaa亚洲精品| 日韩高清不卡在线| 久久久久青草大香线综合精品| caoporn国产精品| 亚洲18女电影在线观看| 精品国产三级a在线观看| 99国产精品国产精品久久| 亚洲国产精品一区二区久久恐怖片| 日韩精品中文字幕在线不卡尤物 | 爽好久久久欧美精品| 久久免费美女视频| 欧美视频在线不卡| 久久精品国产亚洲高清剧情介绍| 国产网站一区二区三区| 欧美片网站yy| 色一情一乱一乱一91av| 国产大陆a不卡| 美女在线观看视频一区二区| 亚洲视频在线一区观看| 精品盗摄一区二区三区| 99精品久久免费看蜜臀剧情介绍| 日韩电影在线一区二区三区| 中文字幕一区二区三| 国产区在线观看成人精品| 在线播放中文字幕一区| 91网站视频在线观看| 亚洲色图丝袜美腿| 欧美日韩一区成人| 一本大道久久a久久精品综合| 高清成人在线观看| 成人综合在线网站| 国产一区二区剧情av在线| 久久99这里只有精品| 日本欧美一区二区在线观看| 日韩av成人高清| 美女尤物国产一区| 国产乱码精品一区二区三区av| 激情另类小说区图片区视频区| 日本不卡一区二区| 美女高潮久久久| 岛国av在线一区| www.欧美日韩国产在线| 99久久综合精品| 欧美影视一区在线| 91精品国产一区二区人妖| 欧美电影精品一区二区| 国产欧美日韩综合精品一区二区| 中文字幕不卡在线| 亚洲另类中文字| 美日韩黄色大片| 一本到一区二区三区| 欧美伦理影视网| 国产精品国产三级国产aⅴ原创 | 久久综合九色综合97婷婷| 中文字幕精品一区| 日韩av网站在线观看| 成人激情免费视频| 欧美一区二区精美| 中文一区一区三区高中清不卡| 天堂av在线一区| 福利一区二区在线| 欧美二区乱c少妇| 日本一区二区不卡视频| 天天做天天摸天天爽国产一区 | 国产欧美一区在线| 日本欧美一区二区三区| 欧美性xxxxxx少妇| 国产精品婷婷午夜在线观看| 免费日本视频一区| 岛国精品一区二区| 日韩免费一区二区| 亚洲成av人片一区二区三区| 99精品欧美一区二区三区综合在线| 欧美一区二区私人影院日本| 中文字幕在线播放不卡一区| 国产精品羞羞答答xxdd| 日韩三级免费观看| 麻豆精品在线看| 欧美一级高清片| 蜜臀av性久久久久蜜臀aⅴ四虎 |