
Java4
Authored by Maciek Witkowski
Other
University
Used 31+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
81. Co to jest wątek (thread) w kontekście Javy?
A. Oddzielny proces
B. Sekwencja instrukcji wykonywana współbieżnie w ramach jednego procesu
C. Wyjątek krytyczny
D. Klasa final do obsługi kolekcji
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
82. Jak można utworzyć wątek w Javie?
A. Rozszerzając klasę Thread lub implementując interfejs Runnable, a następnie wywołując start()
B. Tylko przez System.runThread()
C. Przez dodanie adnotacji @Thread
D. Nie można tworzyć wątków
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
83. Jaka jest różnica między run() a start() w klasie Thread?
A. run() tworzy nowy wątek, a start() wykonuje kod w bieżącym wątku
B. start() tworzy nowy wątek i wewnętrznie wywołuje run() w nim, natomiast bezpośrednie wywołanie run() nie tworzy dodatkowego wątku
C. Nie ma różnicy
D. start() jest metodą prywatną, run() – publiczną
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
84. Co oznacza słowo kluczowe synchronized?
A. Pozwala utworzyć klasę, której obiekty są niezmienne
B. Oznacza, że dana metoda (lub blok) jest synchronizowana, tzn. tylko jeden wątek może ją wykonywać naraz na danym obiekcie
C. Automatycznie zatrzymuje wątek
D. Nie istnieje takie słowo w Javie
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
85. Co to jest „race condition” (warunek wyścigu)?
A. Sytuacja, gdy wątek jest zablokowany na zawsze
B. Mechanizm optymalizacji JIT
C. Sytuacja, w której dwa (lub więcej) wątki jednocześnie manipulują współdzielonym zasobem i wynik może zależeć od kolejności przełączania wątków
D. Metoda do startowania wątku
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
86. Jak bezpiecznie „przerwać” wątek w Javie, zgodnie z dobrymi praktykami?
A. Użyć thread.stop()
B. Wywołać thread.interrupt(), a w samym wątku sprawdzać okresowo isInterrupted() czy Thread.interrupted()
C. Nie ma możliwości przerwania wątku
D. Wywołać metodę destroy()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
87. Co się stanie, jeśli dwa wątki wywołają jednocześnie metodę synchronized tego samego obiektu?
A. Oba wątki będą wykonywać metodę równolegle
B. Jeden z wątków poczeka, aż drugi skończy wykonywać metodę
C. Metoda się nie wywoła
D. Pojawi się wyjątek kompilacji
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
26 questions
Instrumenty muzyczne
Quiz
•
University
25 questions
Sports and Games
Quiz
•
KG - Professional Dev...
25 questions
Hiragana
Quiz
•
University
25 questions
Surveying_P-1_Theodolite Traversing
Quiz
•
University
25 questions
Right Triangles
Quiz
•
7th Grade - University
25 questions
KUIS PKWU KELAS 12
Quiz
•
12th Grade - University
25 questions
Quis PPKn Kelas 9 Semester 1 Bagian A
Quiz
•
9th Grade - University
25 questions
Simple Machines
Quiz
•
KG - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Other
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University