Domanda |
Risposta |
synchronizacja pozwala tylko jednemu wątkowi na wykonywanie kodu w danym czasie inizia ad imparare
|
|
synchronization allows only one thread to execute code at a time
|
|
|
synchronized block, pozwala tylko jednemu wątkowi na pracę w danym momencie na danym bloku inizia ad imparare
|
|
synchronized block, allows only one thread to work on a given block at a time
|
|
|
martwa blokada dwa wątki czekają na siebie nawzajem przez co są zablokowane co powoduje przerwanie watku inizia ad imparare
|
|
dead lock two threads are waiting for each other and are therefore blocked, which causes the thread to be interrupted
|
|
|
kolejkiBlokujace struktura danych używana do bezpiecznej komunikacji i współpracy wątków inizia ad imparare
|
|
queuesA blocking data structure used for secure communication and thread collaboration
|
|
|
thread pools umożliwia ponowne wykorzystanie wątków w klasie ExecutorService inizia ad imparare
|
|
thread pools allows you to reuse threads in the ExecutorService class
|
|
|
integrowanie wątków to harmonizacja działań pomiędzy wątkami aby osiągnąć wspólny cel inizia ad imparare
|
|
thread integration is the harmonization of activities between threads to achieve a common goal
|
|
|
synchronizacja to współdzielenie zmienny inizia ad imparare
|
|
synchronization is sharing a variable
|
|
|
warunki wyścigowe to sytuacja gdy kilka wątków jednocześnie otrzymuje dostęp do kodu, przynajmniej jeden wątek wprowadza zmiany w danych co powoduje nieprzewidywalny wynik inizia ad imparare
|
|
Race conditions are situations when several threads access the code at the same time
|
|
|
metoda notify, notifyAll informuje pierwszy wątek że inne wątki spełniają warunki inizia ad imparare
|
|
The notify, notifyAll method informs the first thread that other threads meet the conditions
|
|
|
metoda wait oczekiwanie na warunki inizia ad imparare
|
|
wait method waiting for conditions
|
|
|
hashtable jest synchronizowany, bezpieczna w środowisku wielowątkowym inizia ad imparare
|
|
hashtable is synchronized, safe in a multi-threaded environment
|
|
|
Może mieć różne modyfikatory dostępu inizia ad imparare
|
|
It can have various Access modifiers
|
|
|
Java to język kompilowany czyli jego kod źródłowy jest tłumaczony na język maszynowy inizia ad imparare
|
|
Java is a compiled language, i.e. its source code is translated into machine language
|
|
|
Java to język programowania, uniwersalny, obiektowy prosty bezpieczny popularny inizia ad imparare
|
|
Java is a programming language, universal, object-oriented, simple, safe, and popular
|
|
|
optional to klasa do obsługi null inizia ad imparare
|
|
optional is a class to handle null
|
|
|
programowanie funkcyjne to lambda i streamy inizia ad imparare
|
|
functional programming is lambda and streams
|
|
|
interfejs może dziedziczyć inne interfejsy wtedy klasa go implementujaca musi implementować metody wszystkich inizia ad imparare
|
|
an interface can inherit other interfaces, then the class implementing it must implement the methods of all of them
|
|
|
interfejs ma też stałe metody inizia ad imparare
|
|
the interface also has constant methods
|
|
|
abstrakcyjne metody interfejsu, klasa która posiada interfejs musi implementować jego metody inizia ad imparare
|
|
abstract interface methods, a class that has an interface must implement its methods
|
|
|
interfejs to metoda abstrakcyjna która dostarcza metod do klas inizia ad imparare
|
|
An interface is an abstract method that provides methods to classes
|
|
|
klasy dziedziczące muszą dokonać implementacji wszystkich metod klasy dziedziczonej inizia ad imparare
|
|
inheriting classes must implement all the methods of the inherited class
|
|
|
metody abstrakcyjne to metody które nie posiadają cial inizia ad imparare
|
|
Abstract methods are methods that do not have bodies
|
|
|
metody abstrakcyjne to metody które nie posiadają cial inizia ad imparare
|
|
Abstract methods are methods that do not have bodies
|
|
|
metody abstrakcyjne to metody które nie posiadają cial inizia ad imparare
|
|
Abstract methods are methods that do not have bodies
|
|
|
klasa abstrakcyjna nie może posiadać obiektów ale może zawierać metody abstrakcyjne i implementacje metod inizia ad imparare
|
|
An abstract class cannot have objects but can contain abstract methods and method implementations
|
|
|
kompozycja technika w której jeden obiekt zawiera w sobie inny obiekt inizia ad imparare
|
|
composition a technique in which one object contains another object
|
|
|
powiększa się wraz z dodaniem do listy inizia ad imparare
|
|
grows as you add to the list
|
|
|
metoda statyczna nie są wywoływane na obiektach tylko na klasie inizia ad imparare
|
|
static methods are not called on butt objects on the class
|
|
|
metody nie statyczne są wywoływane na obiekcie inaczej obiektowe inizia ad imparare
|
|
non-static methods are called on an object otherwise object-oriented
|
|
|
zmienna statyczna jej wartość jest taka sama dla wszystkich obiektów. inicjalizowana tylko raz podczas tworzenia klasy inizia ad imparare
|
|
a static variable, its value is the same for all objects. initialized only once when the class is created
|
|
|
klasa nie mutowalna ma zmienne finał, każda modyfikacja tworzy nowy obiekt inizia ad imparare
|
|
a non-mutable class has a final variable, each modification creates a new object
|
|
|
arraylist rośnie wraz z dodaniem elementu do listy. metoda get, indeksowanie daje losowy dostęp do jej elementów inizia ad imparare
|
|
arraylist grows as an element is added to the list. get method, indexing gives random access to its elements, wstawianie, usuwanie elementów powoduje przesunięcie pozostalych
|
|
|
Map przechowuje pary klucz- wartość, klucz jest unikalny inizia ad imparare
|
|
Map stores key-value pairs, the key is unique
|
|
|
bariera klasa CyclicBarrier umożliwia grupie wątków synchronizację i oczekiwanie na siebie wzajemnie inizia ad imparare
|
|
barrier The CyclicBarrier class allows a group of threads to synchronize and wait for each other
|
|
|
LinkedList jest lepsze, gdy często usuwa się elementy z listy. nie powoduje przesunięcia elementów, elementy mają referencje do poprzedniego i następnego inizia ad imparare
|
|
LinkedList is better when you remove items from the list frequently. does not move elements, elements have references to the previous and next
|
|
|
setList to zbiór unikalnych elementów, bez gwarancji porządku inizia ad imparare
|
|
setList is a collection of unique items, with no guarantee after
|
|
|
LinkedHashSet zachowuje kolejność dodawanych elementów inizia ad imparare
|
|
LinkedHashSet maintains the order of added elements
|
|
|
metoda set umożliwia ustawienie wartości inizia ad imparare
|
|
the set method allows you to set a value
|
|
|
metoda get używana do wywołania wartości zmiennych inizia ad imparare
|
|
a game method used to call the values of variables
|
|
|
metoda konstruktora służy do inicjalizacji obiektu, nazywa się jak nazwa klasy inizia ad imparare
|
|
the constructor method is used to initialize the object, it is named as the class name
|
|
|
metoda join informuje wątek aby poczekał aż inny skonczy inizia ad imparare
|
|
The join method tells a thread to wait until another thread finishes
|
|
|
runnable interfejs do implementacji wątków, ma metodę run inizia ad imparare
|
|
runnable interface for implementing threads, has a run method
|
|
|
pola statyczne wartość pola jest taka sama dla wszystkich obiektów klasy inizia ad imparare
|
|
static fields the field value is the same for all objects
|
|
|
metody final nie mogą być przesłonięte w klasach pochodnych inizia ad imparare
|
|
final methods cannot be overridden in derived classes
|
|
|
klasa pośrednicząca zarządza komunikacja między obiektami w systemie inizia ad imparare
|
|
an intermediary class manages communication between objects in the system
|
|
|
klasa final klasa bezmozgowa nie może być dziedziczona inizia ad imparare
|
|
class final the anencephalic class cannot be inherited
|
|
|
zmiana wartości w polu statycznym spowoduje zmianę we wszystkich obiektach inizia ad imparare
|
|
changing the value in a static field will cause a change in all objects
|
|
|
pola statycznie istnieje niezależnie od tego czy mamy obiekty klasy inizia ad imparare
|
|
fields statically exists regardless of whether we have objects of the class
|
|
|
hashcode to wartość liczbowa kodu danego obiektu, jest taki sam przez cały okres trwania pbiektu inizia ad imparare
|
|
hashcode is the numerical value of the code of a given object, it is the same throughout the entire duration of the object
|
|
|
metoda interrupted przerwanie watku służy do bezpiecznego przerwania wątku, ustawia flagę przerwania inizia ad imparare
|
|
interrupted method thread interrupt is used to safely interrupt the thread, it sets the interrupt flag
|
|
|
klasa mutowalna pozwala na modyfikację za pomocą metod obiektu inizia ad imparare
|
|
a mutable class allows modification using the object's methods
|
|
|
klasa thread klasa do tworzenia i zarządzania wątkami alternatywa jest interfejs runnable inizia ad imparare
|
|
thread class A class for creating and managing threads. An alternative is the runnable interface
|
|
|
metoda start tworzy, run uruchamia, join czekaj aż inny skonczy, currentThread zwróć referencje do wątku inizia ad imparare
|
|
start method creates, run starts, join wait for another to finish, currentThread return references to the thread
|
|
|
equals służy do porównania hashcode obiektow inizia ad imparare
|
|
equals is used to compare the hashcode of objects
|
|
|
callable umożliwia zwracanie wyników, pozwala też zgłaszać wyjatki inizia ad imparare
|
|
callable allows you to return results and also allows you to throw exceptions
|
|
|
pola stałe pole nie może być zmienione po przypisaniu wartości inizia ad imparare
|
|
Final fields A field cannot be changed once a value is assigned
|
|
|
interrupted sprawdzenie flagi przerwania, czyli czy wątek ma flagę przerwania inizia ad imparare
|
|
interrupted checking the interrupt flag, i.e. whether the thread has an interrupt flag
|
|
|
interrupted sprawdzenie flagi przerwania, czyli czy wątek ma flagę przerwania inizia ad imparare
|
|
interrupted checking the interrupt flag, i.e. whether the thread has an interrupt flag
|
|
|
konkatenacja łączenie stringów w jeden inizia ad imparare
|
|
concatenation combining strings into one
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|
inizia ad imparare
|
|
|
|
|