Language Enhancements

Beschreibung

Upgrade to Java SE 8 OCP ( Java SE 6 and all prior versions) Java Programming Karteikarten am Language Enhancements, erstellt von Zeyin Lai am 05/12/2016.
Zeyin Lai
Karteikarten von Zeyin Lai, aktualisiert more than 1 year ago
Zeyin Lai
Erstellt von Zeyin Lai vor mehr als 7 Jahre
1
0

Zusammenfassung der Ressource

Frage Antworten
Which are correct Diamond operator? 1. new ArrayList<>(); 2. new HashMap<Map<String,Integer>, List<Double>>(); 3. new HashMap<>(); 4. new HashMap<<>,<>>() 1, 2, 3
What are the prefixes for Octal, Hexadecimal and Binary? 0 -- Octal, 0x/0X - Hexadecimal 0b - Binary
Rules for literal underscore You can add underscores anywhere except at the beginning of a literal, the end of a literal, right before a decimal point, or right after a decimal point.
Six data types that supported by switch statement. int and Integer byte and Byte short and Short char and Character String enum values
What kind of values can be used in case statements? Compile time constant values which means literals, enum constants, or final constant variables of the same data type
Rule of default statement If no other case match, the default statement will be executed. If the default statement has no break and followed by other cases, those cases will be executed as well.
Is it correct to say that a try-with-resources statement is only permitted to omit finally statement? No, a try-with-resources statement is permitted to omit both the catch and finally blocks. A traditional try statement must have either or both.
Does it compile? No. It needs to add throws clause to main method to make it compile or the exception need to be caught in the main method.
What order does Java close resource? Java closes resources in the reverse order from which it created them
In where suppressed exceptions apply only to exceptions thrown in the try clause
When are resources are closed in try-and-resource after the try clause ends and before any catch/finally clauses
What are the outputs? Close: 2 Close: 1 ex finally
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

JAVA basics
Joseph Jimenez
Lernplan
barbarabfm
LB A, Kapitel 1.2, Firmierung
Stefan Kurtenbach
Modul 2D FernUni Hagen Bourdieu
Anni T-Pünktchen
BM 13 - Allgemeine Didaktik
Isabell St
Kunststoffe - Einführung
Fabian B.
Klinische Psychologie Teil 2
Lisa Mariá Hchil
PRINT WS16/17 Uni Wien
Cecilie von Heintze
Vetie: Virofragen 2015
Johanna Tr
Veti Pharma
Anna Leps
Vetie PathoHisto 2018
Juliane Arendt