Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte 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



Drop-down lists

Drop-down lists Like a group of radio buttons, a drop-down list is a way to force the user to select only one element from a group of possibilities. However, it’s a much more compact way to accomplish this, and it’s easier to change the element
Citeste tot ... 327 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

A method lookup tool

A method lookup tool Chapter 11 introduced the Java 1.1 concept of reflection and used that feature to look up methods for a particular class – either the entire list of methods or a subset of those whose names match a keyword you provide. The
Citeste tot ... 742 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Combining composition and inheritance

Combining composition and inheritance It is very common to use composition and inheritance together. The following example shows the creation of a more complex class, using both inheritance and composition, along with the necessary construct
Citeste tot ... 115 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Read-only classes

Read-only classes While the local copy produced by clone( ) gives the desired results in the appropriate cases, it is an example of forcing the programmer (the author of the method) to be responsible for preventing the ill effects of alia
Citeste tot ... 3303 cuvinte
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

for

for A for loop performs initialization before the first iteration. Then it performs conditional testing and, at the end of each iteration, some form of “stepping.” The form of the for loop is: for(initialization; Boolean-expression; 
Citeste tot ... 257 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Method overloading

Method overloading One of the important features in any programming language is the use of names. When you create an object, you give a name to a region of storage. A method is a name for an action. By using names to describe your system, you
Citeste tot ... 553 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze




RTTI considered harmful

RTTI considered harmful? Various designs in this chapter attempt to remove RTTI, which might give you the impression that it’s “considered harmful” (the condemnation used for poor, ill-fated goto, which was thus never put into Java). This isn’t
Citeste tot ... 694 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Guaranteed initialization with the constructor

Guaranteed initialization with the constructor You can imagine creating a method called initialize( ) for every class you write. The name is a hint that it should be called before using the object. Unfortunately, this means the user must
Citeste tot ... 474 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Input and output: Types of InputStream

Input and output The Java library classes for IO are divided by input and output, as you can see by looking at the online Java class hierarchy with your Web browser. By inheritance, all classes derived from InputStream have basic methods called
Citeste tot ... 1043 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

The final keyword

The final keyword The final keyword has slightly different meanings depending on the context, but in general it says “This cannot be changed.” You might want to prevent changes for two reasons: design or efficiency. Because these two reasons a
Citeste tot ... 1663 cuvinte
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Windowed applications

Windowed applications It’s possible to see that for safety’s sake you can have only limited behavior within an applet. In a real sense, the applet is a temporary extension to the Web browser so its functionality must be limited along with its
Citeste tot ... 2026 cuvinte
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Compression: Simple compression with GZIP

Compression Java 1.1 has also added some classes to support reading and writing streams in a compressed format. These are wrapped around existing IO classes to provide compression functionality. One aspect of these Java 1.1 classes stands
Citeste tot ... 1606 cuvinte
Dimensiune medie
- fara imagini
fisier mediu articol fara poze


Interfaces


Interfaces The interface keyword takes the abstract concept one step further. You could think of it as a “pure” abstract class. It allows the creator to establish the form for a class: method names, argument lists and return types, but no metho
Citeste tot ... 477 cuvinte
Dimensiune mica
+ cu imagini
fisier mic articol cu poze

Alternatives to action

Alternatives to action As noted previously, action( ) isn’t the only method that’s automatically called by handleEvent( ) once it sorts everything out for you. There are three other sets of methods that are called, and if you want to c
Citeste tot ... 1322 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

A bit about garbage collection

A bit about garbage collection It’s hard to believe that Java could possibly be as fast or faster than C++. This assertion has yet to be proven to my satisfaction. However, I’ve begun to see that many of my doubts about speed come from early
Citeste tot ... 1789 cuvinte
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Upcasting


Upcasting The most important aspect of inheritance is not that it provides methods for the new class. It’s the relationship expressed between the new class and the base class. This relationship can be summarized by saying “The new class is a
Citeste tot ... 606 cuvinte
Dimensiune mica
+ cu imagini
fisier mic articol cu poze

Comparing C++ and Java

Comparing C++ and Java As a C++ programmer, you already have the basic idea of object-oriented programming, and the syntax of Java no doubt looks familiar to you. This makes sense since Java was derived from C++. However, there are a surpr
Citeste tot ... 3179 cuvinte
Dimensiune medie
- fara imagini
fisier mediu articol fara poze

Initialization and class loading

Initialization and class loading In many more traditional languages, programs are loaded all at once as part of the startup process. This is followed by initialization, and then the program begins. The process of initialization in these lang
Citeste tot ... 508 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Applet restrictions

Applet restrictions For safety’s sake, applets are quite restricted and there are many things you can’t do. You can generally answer the question of what an applet is able to do by looking at what it is supposed to do: extend the functionality
Citeste tot ... 827 cuvinte
Dimensiune mica
- fara poza
fisier mic articol fara poze

Exception restrictions

Exception restrictions When you override a method, you can throw only the exceptions that have been specified in the base-class version of the method. This is a useful restriction, since it means that code that works with the base class will au
Citeste tot ... 849 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




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