Шукаєте відповіді та рішення тестів для SEW8b 4xHIT Spring Boot? Перегляньте нашу велику колекцію перевірених відповідей для SEW8b 4xHIT Spring Boot в elearning.tgm.ac.at.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
Kreuzen Sie an, welche Objekt-Initialisierungen sich fehlerfrei kompilieren lassen: [EK]
type Person = { id?: number; name: string };
StrictNullChecks sind aktiviert, der TS-Kompiler unterscheidet also zwischen null und undefined.
"compilerOptions": { "strictNullChecks": true }
Betrachten Sie folgendes Beispiel. Es besteht aus zwei ref Variablen und je einer computed Property, Method und Watcher auf jeder der beiden Variablen. Kreuzen Sie an, was aufgerufen wird, wenn über die Eingabe eines Zeichens im Input-Feld ein Re-Render getriggered wird:
<script setup lang="ts">
import {computed, ref, watch} from "vue";
const count = ref<number>(0);
const countComputed = computed(() => { console.log("countComputed"); return count.value + 1});
function countMethod() { console.log("countMethod"); return count.value - 1; }
watch(count, () => { console.log("countWatch"); })
const name = ref<string>("Max");
const nameComputed = computed(() => { console.log("nameComputed"); return name.value.toUpperCase(); });
function nameMethod() { console.log("nameMethod"); return name.value.toLowerCase(); }
watch(name, () => { console.log("nameWatch"); })
</
script>
<
template>
<
h1>Count</h1>
<
p>{{ count }} <button @click="count++">Increment</button></p>
<
p>{{ countComputed }}</p>
<
p>{{ countMethod() }}</p>
<
h1>Name</h1>
<
p><input v-model="name"></p>
<
p>{{ nameComputed }}</p>
<
p>{{ nameMethod() }}</p>
</
template>
Optional in Java sind korrekt? [EK]Was wird ausgegeben, wenn man die Anwendung startet: [EK]
@Scope("singleton")
@Component
public class GreeterSingleton{
private static int lastId = 0
;
private final int id = ++lastId
;
@Override
public String toString() {
return "GreeterSingleton " + id
;
}
}
@Component
public class ProfileTester implements CommandLineRunner{
@Autowired
private GreeterSingleton greeterSingleton
;
@Autowired
private ApplicationContext context;
@Override
public void run(String... args) throws Exception{
System.out.println(greeterSingleton + "\n" + context.getBean(GreeterSingleton.class
));
}
}
Was wird ausgegeben, wenn man die Anwendung startet: [EK]
@Scope("prototype")
@Component
public class GreeterPrototype{
private static int lastId = 0
;
private final int id = ++lastId
;
@Override
public String toString() {
return "GreeterPrototype " + id
;
}
}
@Component
public class ProfileTester implements CommandLineRunner{
@Autowired
private GreeterPrototype greeterPrototype
;
@Autowired
private ApplicationContext context
;
@Override
public void run(String... args) throws Exception{
System.out.println(greeterPrototype + "\n" + context.getBean(GreeterPrototype.class
));
}
}