Scrigroup - Documente si articole

Username / Parola inexistente      

Home Documente Upload Resurse Alte limbi doc  


AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

java

+ Font mai mare | - Font mai mic



Trimite pe Messenger


Complexity theory

Complexity theory This program was modified from code originally created by Larry O’Brien, and is based on the “Boids” program created by Craig Reynolds in 1986 to demonstrate an aspect of complexity theory called “emergence.” The goal here
Citeste tot ... « 473 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Design patterns: The singleton

Design patterns This chapter introduces the important and yet non-traditional “patterns” approach to program design. Probably the most important step forward in object-oriented design is the “design patterns” movement, chronicled in Design P
Citeste tot ... « 1912 cuvinte »
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Constructors

Constructors When writing code with exceptions, it’s particularly important that you always ask, “If an exception occurs, will this be properly cleaned up?” Most of the time you’re fairly safe, but in constructors there’s a problem. The constru
Citeste tot ... « 860 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Passing handles around: Aliasing

Passing handles around When you pass a handle into a method, you’re still pointing to the same object. A simple experiment demonstrates this: (See page 97 if you have trouble executing this program.) //: PassHandles.java // Passing ha
Citeste tot ... « 562 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Network programming: Servers and clients

Network programming Historically, network programming has been error-prone, difficult, and complex. The programmer had to know many details about the network and sometimes even the hardware. You usually needed to understand the various “laye
Citeste tot ... « 9295 cuvinte »
Dimensiune mare
- fara imagini
fisier mare articol fara poze

The comma operator

The comma operator Earlier in this chapter I stated that the comma operator (not the comma separator, which is used to separate function arguments) has only one use in Java: in the control expression of a for loop. In both the initialization an
Citeste tot ... « 117 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze





Using Maps

Using Maps Map (interface) Maintains key-value associations (pairs), so you can look up a value using a key. HashMap* Implementation based on a hash table. (Use this instead of Hashtable.) Pr
Citeste tot ... « 466 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

The Java Native Interface: Calling a native method

The Java Native Interface JNI is a fairly rich programming interface that allows you to call native methods from a Java application. It was added in Java 1.1, maintaining a certain degree of compatibility with its Java 1.0 equivalent, the nativ
Citeste tot ... « 2178 cuvinte »
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Catching an exception: The try block, Exception handle

Catching an exception If a method throws an exception, it must assume that exception is caught and dealt with. One of the advantages of Java exception handling is that it allows you to concentrate on the problem you’re trying to solve in one pl
Citeste tot ... « 1634 cuvinte »
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Package: the library unit

package: the library unit A package is what you get when you use the import keyword to bring in an entire library, such as import java.util.*; This brings in the entire utility library that’s part of the standard Java distrib
Citeste tot ... « 846 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Raw Native Interface (RNI)

Raw Native Interface (RNI) Compared to J/Direct, RNI is a fairly complex interface to non-Java code, but it’s much more powerful. RNI is closer to the JVM than J/Direct, and this lets you write much more efficient code, manipulate Java objects
Citeste tot ... « 486 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Creating windows and applets

Creating windows and applets The original design goal of the graphical user interface (GUI) library in Java 1.0 was to allow the programmer to build a GUI that looks good on all platforms. That goal was not achieved. Instead, the Java 1.0 
Citeste tot ... « 2856 cuvinte »
Dimensiune medie
- fara imagini
fisier mediu articol fara poze




Upcasting

Upcasting In Chapter 6 you saw how an object can be used as its own type or as an object of its base type. Taking an object handle and treating it as the handle of the base type is called upcasting because of the way inheritance trees are drawn
Citeste tot ... « 466 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Remote methods: Remote interfaces

Remote methods Traditional approaches to executing code on other machines across a network have been confusing as well as tedious and error-prone to implement. The nicest way to think about this problem is that some object happens to live on an
Citeste tot ... « 1660 cuvinte »
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Inner classes - Inner classes and upcasting

Inner classes In Java 1.1 it’s possible to place a class definition within another class definition. This is called an inner class. The inner class is a useful feature because it allows you to group classes that logically belong together and to
Citeste tot ... « 4738 cuvinte »
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Default constructors

Default constructors As mentioned previously, a default constructor is one without arguments, used to create a “vanilla object.” If you create a class that has no constructors, the compiler will automatically create a default constructor for yo
Citeste tot ... « 159 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Utilities: Making a Collection or Map unmodifiable

Utilities There are a number of other useful utilities in the Collections class: enumeration(Collection) Produces an old-style Enumeration for the argument. max(Collection) min(Collection)
Citeste tot ... « 640 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Capturing an event

Capturing an event You’ll notice that if you compile and run the applet above, nothing happens when you press the buttons. This is where you must step in and write some code to determine what will happen. The basis of event-driven programming,
Citeste tot ... « 955 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Making a button

Making a button Making a button is quite simple: you just call the Button constructor with the label you want on the button. (You can also use the default constructor if you want a button with no label, but this is not very useful.) Usually you’
Citeste tot ... « 189 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze

Calculation details

Calculation details The statement: char c = (char)(Math.random() * 26 + 'a'); deserves a closer look. Math.random( ) produces a double, so the value 26 is converted to a double to perform the multiplication, which also pr
Citeste tot ... « 301 cuvinte »
Dimensiune mica
- fara poza
fisier mic articol fara poze


Alte pagini

1 »»» 3 4 5 6 7 8 9 10





Politica de confidentialitate




Termeni si conditii de utilizare | Contact
© SCRIGROUP 2021 . All rights reserved