Java: Unterschied zwischen den Versionen
Aus Claudio's Wiki
(→web.xml) |
|||
Zeile 1: | Zeile 1: | ||
+ | ==Operatoren== | ||
+ | |||
+ | Java supports one other conditional operator: the ?: operator. This operator is a tertiary operator and is basically short-hand for an if-else statement: | ||
+ | boolean-expression ? op1 : op2 | ||
+ | |||
+ | The ?: operator evaluates boolean-expression and returns op1 if it's true and op2 if it's false. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Diverses== | ||
[http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html Java-VM-Args] | [http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html Java-VM-Args] | ||
(kann z.B. in eclipse benutzt werden [eclipse.ini oder beim Starten von eclipse]) | (kann z.B. in eclipse benutzt werden [eclipse.ini oder beim Starten von eclipse]) |
Version vom 19. Mai 2009, 10:00 Uhr
Inhaltsverzeichnis
Operatoren
Java supports one other conditional operator: the ?: operator. This operator is a tertiary operator and is basically short-hand for an if-else statement: boolean-expression ? op1 : op2
The ?: operator evaluates boolean-expression and returns op1 if it's true and op2 if it's false.
Diverses
Java-VM-Args (kann z.B. in eclipse benutzt werden [eclipse.ini oder beim Starten von eclipse])
JavaDoc
Apache Config
web.xml
Web.xml ist die Konfigurationsdatei für den Servlet-Container.
- Element
- load-on-startup (optional)
- Wert
- Ganzzahl
- Beschreibung
- Definiert, dass das zugehörige Servlet beim Starten der Servers mit gestartet wird. Die Ganzzahl gibt die Reihenfolge an. Wenn 0, dann ist die Reihenfolge egal. Ab Servlet-Schema 2.4 darf load-on-startup nicht leer sein (<load-on-startup/>).
- Beispiel
- <load-on-startup>0</load-on-startup>
JSP
Interessante Links
Interfaces
Auch Konstanten und Objekte (inkl. Instanzierung) können in Interfaces geschrieben werden. Beispiel:
public interface MyConstants { /** Constant 1 */ public static final String CTX_RUNTIME = "RUNTIME"; /** Constant 2 */ public static final String INDIV_ITEM = "INDIV_ITEM"; /** Objects */ public static final Map<String, String> myMap = new HashMap<String, String>(10); // Auch neue Objekte sind möglich ... }