freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計(jì)算機(jī)科學(xué)與技術(shù)外文資料翻譯-其他專(zhuān)業(yè)(文件)

 

【正文】 wn keyword: null. When Java sees null, it recognizes that the reference in question isn?t pointing to an object. You must assign an object to each reference before you use it, and if you try to use a reference that?s still null, the problem will be reported at run time. Thus, typical array errors are prevented in Java. You can also create an array of primitives. Again, the piler guarantees initialization because it zeroes the memory for that array. Arrays will be covered in detail in later never need to destroy an object In most programming languages, the concept of the lifetime of a variable occupies a significant portion of the programming effort. How long does the variable last? If you are supposed to destroy it, when should you? Confusion over variable lifetimes can lead to a lot of bugs, and this section shows how Java greatly simplifies the issue by doing all the cleanup work for you. Scoping Most procedural languages have the concept of scope. This determines both the visibility and lifetime of the names defined within that scope. In C, C++, and Java, scope is determined by the placement of curly braces {}. So for example: { int x = 12。Or you could also use: Character C = new Character(39。Not only does this mean “Make me a new String,” but it also gives information about how to make the String by supplying an initial character string. Of course, String is not the only type that exists. Java es with a plethora of readymade types. What?s more important is that you can create your own types. In fact, that?s the fundamental activity in Java programming, and it?s what you?ll be learning about in the rest of this book. It?s useful to visualize some aspects of how things are laid out while the program is running—in particular how memory is arranged. There are six different places to store data: 1. Registers. This is the fastest storage because it exists in a place different from tha t of other storage: inside the processor. However, the number of registers is severely limited, so registers are allocated by the piler according to its needs. You don?t have direct control, nor do you see any evidence in your programs that registers even exist. 2. The stack. This lives in the general randomaccess memory (RAM) area, but has direct support from the processor via its stack pointer. The stack pointer is moved down to create new memory and moved up to release that memory. This is an extremely fast and efficient way to allocate storage, second only to registers. The Java piler must know, while it is creating the program, the exact size and lifetime of all the data that is stored on the stack, because it must generate the code to move the stack pointer up and down. This constraint places limits on the flexibility of your programs, so while some Java storage exists on the stack—in particular, object references—Java objects themselves are not placed on the stack. 3. The heap. This is a generalpurpose pool of memory (also in the RAM area) where all Java objects live. The nice thing about the heap is that, unlike the stack, the piler doesn?t need to know how much storage it needs to allocate from the heap or how long that storage must stay on the heap. Thus, there?s a great deal of flexibility in using storage on the heap. Whenever you need to create an object, you simply write the code to create it by using new, and the storage is allocated on the heap when that code is executed. Of course there?s a price you pay for this flexibility. It takes more time to allocate heap storage tha
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1