נבנה על ידיBuilt by Ariel Yohimovich

JavaJava

מילון מונחיםGlossary

כל מונח שמופיע בקורס, מוסבר במילים פשוטות. לכל מונח יש קישור ישיר (עוגן), ומכל מקום בקורס אפשר לקפוץ לכאן.

Every term in the course, explained in plain words. Each term has a direct link (anchor) you can jump to from anywhere in the course.

298 מונחים עד עכשיוterms so far

כל המונחיםAll terms

@Override@Override@Override@Override

מבקש מ-javac לוודא שאתם באמת דורסים מתודה קיימת. אם החתימה שגויה (למשל equals(Book)), javac עוצר: method does not override or implement a method from a supertype.

Asks javac to make sure you really override an existing method. With a wrong signature (e.g. equals(Book)), javac stops: method does not override or implement a method from a supertype.

מופיע לראשונה: First appears: מפגשSession 17

AABBAABBAABBAABB

התנגשות בין שני מלבנים ישרים: הם חופפים אם הם חופפים גם בציר x וגם בציר y. Rectangle.intersects עושה בדיוק את זה.

A collision between two upright rectangles: they overlap if they overlap on both the x axis and the y axis. Rectangle.intersects does exactly that.

מופיע לראשונה: First appears: מפגשSession 45

ArrayDequeArrayDequeArrayDequeArrayDeque

תור דו-כיווני מהיר. כתור: offer ו-poll (ראשון נכנס, ראשון יוצא). כמחסנית: push ו-pop (אחרון נכנס, ראשון יוצא).

A fast double-ended queue. As a queue: offer and poll (first in, first out). As a stack: push and pop (last in, first out).

מופיע לראשונה: First appears: מפגשSession 25

ArrayIndexOutOfBoundsExceptionArrayIndexOutOfBoundsExceptionArrayIndexOutOfBoundsExceptionArrayIndexOutOfBoundsException

החריגה כשפונים לתא שלא קיים: Index 5 out of bounds for length 3.

The exception for a cell that doesn't exist: Index 5 out of bounds for length 3.

מופיע לראשונה: First appears: מפגשSession 8

ArrayListArrayListArrayListArrayList

רשימה שגדלה לבד: List<String> l = new ArrayList<>();, l.add(x), l.get(i), l.size().

A list that grows by itself: List<String> l = new ArrayList<>();, l.add(x), l.get(i), l.size().

מופיע לראשונה: First appears: מפגשSession 9

assertassertionassertionassert

assertEquals(expected, actual), assertTrue, assertThrows(Type.class, () -> ...): אם הבדיקה נכשלת, JUnit מסמן FAIL ומראה מה היה צפוי ומה התקבל.

assertEquals(expected, actual), assertTrue, assertThrows(Type.class, () -> ...): when one fails, JUnit marks FAIL and shows what was expected and what came.

מופיע לראשונה: First appears: מפגשSession 30

AtomicAtomicAtomicAtomic

AtomicInteger, AtomicLong ודומיהם: incrementAndGet() ו-addAndGet() הם צעד אחד שאי אפשר לחתוך, בלי מנעול.

AtomicInteger, AtomicLong and friends: incrementAndGet() and addAndGet() are one step nobody can cut into, with no lock.

מופיע לראשונה: First appears: מפגשSession 36

autoboxingautoboxingautoboxingautoboxing

Java הופכת לבד int ל-Integer כשמכניסים לאוסף, ובחזרה כשמוציאים.

Java turns an int into an Integer by itself when you put it in a collection, and back when you take it out.

מופיע לראשונה: First appears: מפגשSession 9

BFSBFSBFSBFS

חיפוש לרוחב: עוברים על גרף שכבה אחרי שכבה בעזרת תור. מוצא את המסלול הקצר ביותר (במספר צעדים).

Breadth-first search: walk a graph layer by layer with a queue. Finds the shortest path (in number of steps).

מופיע לראשונה: First appears: מפגשSession 42

BlockingQueueBlockingQueueBlockingQueueBlockingQueue

תור בטוח ל-threads: put מחכה כשהוא מלא, take מחכה כשהוא ריק. ArrayBlockingQueue (גודל קבוע), LinkedBlockingQueue.

A thread-safe queue: put waits when it's full, take waits when it's empty. ArrayBlockingQueue (fixed size), LinkedBlockingQueue.

מופיע לראשונה: First appears: מפגשSession 34

broad phasebroad phasebroad phasebroad phase

שלב סינון לפני בדיקת התנגשות מדויקת: מחלקים את העולם לתאים ובודקים רק עצמים באותו תא, במקום כל זוג.

A filtering step before exact collision checks: split the world into cells and check only objects in the same cell, instead of every pair.

מופיע לראשונה: First appears: מפגשSession 45

BuilderBuilderBuilderBuilder

בונים עצם צעד אחרי צעד: new Book.Builder("Dune").year(1965).build(). נוח כשיש הרבה שדות אופציונליים, במקום בנאים עם עשרה פרמטרים.

Build an object step by step: new Book.Builder("Dune").year(1965).build(). Handy with many optional fields, instead of constructors with ten parameters.

מופיע לראשונה: First appears: מפגשSession 24

bytecodebytecodebytecodebytecode

השפה שה-JVM מבינה: הוראות פשוטות שנשמרות בקבצי ‎.class. אותו bytecode רץ בכל מחשב שיש בו JVM.

The language the JVM understands: simple instructions stored in .class files. The same bytecode runs on any computer with a JVM.

מופיע לראשונה: First appears: מפגשSession 1

CallableCallableCallableCallable

כמו Runnable, אבל מחזיר ערך ויכול לזרוק חריגה: Callable<Integer> job = () -> 42;.

Like Runnable, but returns a value and may throw: Callable<Integer> job = () -> 42;.

מופיע לראשונה: First appears: מפגשSession 35

ClassCastExceptionClassCastExceptionClassCastExceptionClassCastException

החריגה כשממירים עצם לטיפוס שהוא לא: class Dvd cannot be cast to class EBook. בודקים קודם עם instanceof.

The exception when you cast an object to a type it isn't: class Dvd cannot be cast to class EBook. Check first with instanceof.

מופיע לראשונה: First appears: מפגשSession 21

CollectorsCollectorsCollectorsCollectors

מתכונים ל-collect: groupingBy (מפה לפי מפתח), counting, mapping, joining, partitioningBy, toMap.

Recipes for collect: groupingBy (a map by key), counting, mapping, joining, partitioningBy, toMap.

מופיע לראשונה: First appears: מפגשSession 27

commitcommitcommitcommit

git add בוחר מה ייכנס, ו-git commit -m "..." שומר תמונת מצב. הודעה טובה אומרת מה השתנה ולמה.

git add picks what goes in, and git commit -m "..." saves a snapshot. A good message says what changed and why.

מופיע לראשונה: First appears: מפגשSession 30

ComparableComparableComparableComparable

Comparable<T> מגדיר "סדר טבעי": compareTo מחזיר מספר שלילי, 0 או חיובי. Arrays.sort ו-Collections.sort משתמשים בו.

Comparable<T> defines a "natural order": compareTo returns a negative number, 0 or a positive one. Arrays.sort and Collections.sort use it.

מופיע לראשונה: First appears: מפגשSession 20

Comparator.comparingComparator.comparingComparator.comparingComparator.comparing

בונה Comparator ממפתח: Comparator.comparing(Book::year), ואפשר לשרשר .reversed() ו-.thenComparing(...).

Builds a Comparator from a key: Comparator.comparing(Book::year), chaining .reversed() and .thenComparing(...).

מופיע לראשונה: First appears: מפגשSession 26

compareAndSetcompareAndSetcompareAndSetcompareAndSet

x.compareAndSet(expected, next): משנה רק אם הערך עדיין expected, ומחזיר אם הצליח. בלולאה: קוראים, מחשבים, ומנסים שוב אם מישהו הקדים.

x.compareAndSet(expected, next): changes only if the value is still expected, and returns whether it worked. In a loop: read, compute, and retry if someone got there first.

מופיע לראשונה: First appears: מפגשSession 36

CompletableFutureCompletableFutureCompletableFutureCompletableFuture

Future שאפשר לשרשר: supplyAsync מתחיל משימה, thenApply ממיר את התוצאה, thenCombine מחבר שתיים, thenCompose משרשר משימה אסינכרונית נוספת, ו-join() מחכה.

A Future you can chain: supplyAsync starts a task, thenApply transforms the result, thenCombine joins two, thenCompose chains another async task, and join() waits.

מופיע לראשונה: First appears: מפגשSession 37

ConcurrentHashMapConcurrentHashMapConcurrentHashMapConcurrentHashMap

Map בטוח ל-threads בלי לנעול את כולו. merge, compute ו-computeIfAbsent אטומיים; get ואז put לא.

A thread-safe Map that doesn't lock all of itself. merge, compute and computeIfAbsent are atomic; get then put isn't.

מופיע לראשונה: First appears: מפגשSession 36

cooldowncooldowncooldowncooldown

זמן המתנה אחרי פעולה (כמו ירייה) לפני שמותר שוב. סופרים אותו אחורה עם dt.

A wait after an action (like a shot) before it's allowed again. Count it down with dt.

מופיע לראשונה: First appears: מפגשSession 44

CSVCSVCSVCSV

קובץ טקסט שבו כל שורה היא רשומה ושדות מופרדים בפסיק (או ;). פשוט, אבל צריך להיזהר מפסיק בתוך שדה.

A text file where each line is a record and fields are separated by a comma (or ;). Simple, but watch out for a comma inside a field.

מופיע לראשונה: First appears: מפגשSession 29

deadlockdeadlockdeadlockdeadlock

שני threads (או יותר) שכל אחד מחזיק משהו שהשני צריך, ומחכה לו. אף אחד לא יתקדם לעולם, והתוכנית "קופאת" בלי שגיאה.

Two (or more) threads each holding something the other needs, and waiting for it. Nobody will ever move, and the program "freezes" with no error.

מופיע לראשונה: First appears: מפגשSession 38

delta timedelta timedelta timedelta time

הזמן (בשניות) מאז הפריים הקודם. זזים speed * dt, כך שבמחשב איטי (פחות פריימים) כל צעד גדול יותר, והמרחק בשנייה זהה.

The time (in seconds) since the previous frame. Move speed * dt, so on a slow computer (fewer frames) each step is bigger, and the distance per second is the same.

מופיע לראשונה: First appears: מפגשSession 44

double bufferingdouble bufferingdouble bufferingdouble buffering

שני חוצצים: מציירים על האחורי, ואז מחליפים. המסך לא מראה אף פעם פריים חצי מצויר.

Two buffers: draw on the back one, then swap. The screen never shows a half-drawn frame.

מופיע לראשונה: First appears: מפגשSession 47

dynamic dispatchdynamic dispatchdynamic dispatchdynamic dispatch

בזמן ריצה, Java בוחרת את הגרסה של המתודה לפי הסוג האמיתי של העצם, לא לפי סוג המשתנה.

At run time, Java picks the method version by the object's real type, not the variable's type.

מופיע לראשונה: First appears: מפגשSession 21

effectively finaleffectively finaleffectively finaleffectively final

למבדה יכולה להשתמש במשתנה מקומי מבחוץ רק אם הוא לא משתנה אחרי שנקבע. אחרת javac עוצר.

A lambda can use an outside local variable only if it never changes after it's set. Otherwise javac stops.

מופיע לראשונה: First appears: מפגשSession 26

enumenumenumenum

טיפוס עם רשימה סגורה של ערכים: enum Genre { NOVEL, SCIFI }. כל ערך הוא עצם יחיד, ואפשר להשוות עם ==. יכולים להיות לו שדות ומתודות.

A type with a closed list of values: enum Genre { NOVEL, SCIFI }. Each value is a single object, compared with ==. It can have fields and methods.

מופיע לראשונה: First appears: מפגשSession 23

equalsequalsequalsequals

מתודה של Object שאומרת אם שני עצמים "שווים בתוכן". בלי לדרוס אותה היא בודקת == (אותו עצם). חתימה נכונה: public boolean equals(Object o).

An Object method saying whether two objects are "equal in content". Unless overridden it checks == (the same object). The right signature: public boolean equals(Object o).

מופיע לראשונה: First appears: מפגשSession 17

Event Dispatch ThreadEvent Dispatch ThreadEvent Dispatch ThreadEvent Dispatch Thread

ה-thread היחיד שמותר לו לגעת ברכיבי Swing. javax.swing.Timer רץ עליו, ולכן משחק פשוט עם Timer לא צריך סנכרון בכלל.

The only thread allowed to touch Swing components. javax.swing.Timer runs on it, so a simple game with a Timer needs no synchronization at all.

מופיע לראשונה: First appears: מפגשSession 47

ExecutorServiceExecutorServiceExecutorServiceExecutorService

שירות שמקבל משימות (submit) ומריץ אותן על threads שהוא מנהל. נוצר עם Executors.newFixedThreadPool(n) ודומיו.

A service that takes tasks (submit) and runs them on threads it manages. Created with Executors.newFixedThreadPool(n) and friends.

מופיע לראשונה: First appears: מפגשSession 35

FactoryFactoryFactoryFactory

מתודה (או מחלקה) שמחליטה איזה עצם ליצור לפי קלט, כך שהשאר לא תלוי במחלקות הקונקרטיות.

A method (or class) deciding which object to create from some input, so the rest doesn't depend on the concrete classes.

מופיע לראשונה: First appears: מפגשSession 24

FilesFilesFilesFiles

מחלקת עזר עם כל הפעולות: writeString, readString, write, readAllLines, lines, exists, size, createDirectories, list, delete. רובן זורקות IOException (checked).

A utility class with all the operations: writeString, readString, write, readAllLines, lines, exists, size, createDirectories, list, delete. Most throw IOException (checked).

מופיע לראשונה: First appears: מפגשSession 29

finalfinalfinalfinal

משתנה final מקבל ערך פעם אחת ולא משתנה יותר. קבועים כותבים באותיות גדולות: final int MAX = 10;.

A final variable gets a value once and never changes. Constants are written in capitals: final int MAX = 10;.

מופיע לראשונה: First appears: מפגשSession 2

finallyfinallyfinallyfinally

בלוק שרץ אחרי try/catch תמיד: גם כשהכול עבר, גם כשנתפסה חריגה, ואפילו כשיש return. מתאים לסגירת משאבים.

A block that runs after try/catch always: when all went well, when an exception was caught, even with a return. Good for closing resources.

מופיע לראשונה: First appears: מפגשSession 12

for-eachfor-eachfor-eachfor-each

for (char c : s.toCharArray()): עובר על כל פריט, בלי מונה.

for (char c : s.toCharArray()): goes over every item, with no counter.

מופיע לראשונה: First appears: מפגשSession 5

functional interfacefunctional interfacefunctional interfacefunctional interface

interface עם מתודה מופשטת אחת בדיוק (כמו Comparator, Runnable, Predicate). כל למבדה "נכנסת" לתוך interface כזה. @FunctionalInterface מבקש מ-javac לבדוק.

An interface with exactly one abstract method (like Comparator, Runnable, Predicate). Every lambda "fits into" such an interface. @FunctionalInterface asks javac to check.

מופיע לראשונה: First appears: מפגשSession 26

FutureFutureFutureFuture

"קבלה" על תוצאה שעוד תגיע. get() מחכה לה; אם המשימה נכשלה, get() זורק ExecutionException שהחריגה המקורית היא ה-cause שלה.

A "receipt" for a result still to come. get() waits for it; if the task failed, get() throws an ExecutionException whose cause is the original exception.

מופיע לראשונה: First appears: מפגשSession 35

getter ו-settergetter and settergetter and settergetter ו-setter

getRating() מחזירה ערך, ו-setRating(int) משנה אותו (עם בדיקה). לא לכל שדה צריך setter: רק למה שבאמת אמור להשתנות.

getRating() returns a value, and setRating(int) changes it (with a check). Not every field needs a setter: only what really should change.

מופיע לראשונה: First appears: מפגשSession 15

GitGitGitGit

מערכת שמירת גרסאות: כל commit הוא תמונת מצב של הפרויקט עם הודעה. אפשר לחזור אחורה, לפתוח ענפים (branches) ולמזג. GitHub שומר עותק ברשת.

A version-control system: each commit is a snapshot of the project with a message. You can go back, open branches and merge. GitHub keeps a copy online.

מופיע לראשונה: First appears: מפגשSession 30

GradleGradleGradleGradle

כלי בנייה נוסף, עם build.gradle במקום pom.xml. אותו מבנה תיקיות. gradle test, gradle build.

Another build tool, with build.gradle instead of pom.xml. The same folder layout. gradle test, gradle build.

מופיע לראשונה: First appears: מפגשSession 30

Graphics2DGraphics2DGraphics2DGraphics2D

"מכחול" של Java: setColor, fillRect, fillOval, drawString. ראשית הצירים בפינה השמאלית העליונה, ו-y גדל כלפי מטה.

Java's "brush": setColor, fillRect, fillOval, drawString. The origin is the top-left corner, and y grows downward.

מופיע לראשונה: First appears: מפגשSession 43

happens-beforehappens-beforehappens-beforehappens-before

כלל ב-Java שמבטיח שכתיבה נראית לקריאה: start() לפני כל מה שה-thread עושה, כל מה שה-thread עשה לפני join(), כתיבה ל-volatile לפני קריאה שלו, ושחרור מנעול לפני הנעילה הבאה.

A Java rule guaranteeing a write is visible to a read: start() before everything the thread does, everything the thread did before join(), a volatile write before its read, and an unlock before the next lock.

מופיע לראשונה: First appears: מפגשSession 33

hashCodehashCodehashCodehashCode

מספר שמחושב מהתוכן של העצם. HashSet ו-HashMap משתמשים בו כדי למצוא "מגירה" לפני שהם קוראים ל-equals. Objects.hash(a, b) מחשב אותו בקלות.

A number computed from the object's content. HashSet and HashMap use it to find a "drawer" before calling equals. Objects.hash(a, b) computes it easily.

מופיע לראשונה: First appears: מפגשSession 17

HashMapHashMapHashMapHashMap

מילון של מפתח וערך: Map<String, Integer> m = new HashMap<>();, m.put(k, v), m.get(k). הסדר לא מובטח.

A key-value map: Map<String, Integer> m = new HashMap<>();, m.put(k, v), m.get(k). The order isn't guaranteed.

מופיע לראשונה: First appears: מפגשSession 9

headlessheadlessheadlessheadless

הרצה בלי מסך. Java יכולה לצייר על BufferedImage ולשמור PNG גם בלי חלון: כך נוצרו התמונות באתר.

Running with no screen. Java can draw on a BufferedImage and save a PNG with no window: that's how the pictures on the site were made.

מופיע לראשונה: First appears: מפגשSession 43

heapheapheapheap

האזור בזיכרון שבו גרים העצמים. המשתנים ב-stack מחזיקים רק חצים (הפניות) אליהם.

The memory area where objects live. Variables on the stack hold only arrows (references) to them.

מופיע לראשונה: First appears: מפגשSession 13

HttpClientHttpClientHttpClientHttpClient

HttpClient.newHttpClient() ו-client.send(request, BodyHandlers.ofString()): שולח בקשת HTTP ומחזיר HttpResponse עם statusCode(), headers() ו-body().

HttpClient.newHttpClient() and client.send(request, BodyHandlers.ofString()): sends an HTTP request and returns an HttpResponse with statusCode(), headers() and body().

מופיע לראשונה: First appears: מפגשSession 39

IllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentException

החריגה המקובלת כשמתודה מקבלת ערך לא חוקי. ההודעה צריכה לומר מה צפוי ומה התקבל.

The usual exception when a method gets an illegal value. The message should say what was expected and what came in.

מופיע לראשונה: First appears: מפגשSession 12

importimportimportimport

שורה בראש הקובץ שמביאה מחלקה מספרייה: import java.util.Scanner;.

A line at the top of the file that brings in a library class: import java.util.Scanner;.

מופיע לראשונה: First appears: מפגשSession 6

instanceof עם משתנהpattern instanceofpattern instanceofinstanceof עם משתנה

o instanceof Book other בודק את הטיפוס וגם נותן משתנה מוכן מהטיפוס הזה, בלי המרה ידנית (Java 16 ומעלה).

o instanceof Book other checks the type and gives a ready variable of that type, with no manual cast (Java 16 and up).

מופיע לראשונה: First appears: מפגשSession 17

IntelliJ IDEAIntelliJ IDEAIntelliJ IDEAIntelliJ IDEA

סביבת הפיתוח הפופולרית ביותר ל-Java. בקורס משתמשים בגרסה החינמית, Community.

The most popular IDE for Java. The course uses the free edition, Community.

מופיע לראשונה: First appears: מפגשSession 1

interfaceinterfaceinterfaceinterface

חוזה: רשימת מתודות שמחלקה מבטיחה לממש (implements). מחלקה יכולה לממש כמה interfaces. אין בו שדות של עצם.

A contract: a list of methods a class promises to implement (implements). A class can implement several interfaces. It has no object fields.

מופיע לראשונה: First appears: מפגשSession 20

is-a מול has-ais-a vs has-ais-a vs has-ais-a מול has-a

ירושה מתאימה כשמשפט "X הוא סוג של Y" נכון תמיד (EBook הוא ספר). כש-X רק משתמש ב-Y, עדיף הרכבה (has-a): שדה מסוג Y.

Inheritance fits when "X is a kind of Y" is always true (an EBook is a book). When X only uses Y, prefer composition (has-a): a field of type Y.

מופיע לראשונה: First appears: מפגשSession 19

IteratorIteratorIteratorIterator

עצם שעובר על אוסף: hasNext(), next(), ו-remove() שמוחק בבטחה את האיבר האחרון שהוחזר.

An object that walks a collection: hasNext(), next(), and remove() which safely deletes the last item returned.

מופיע לראשונה: First appears: מפגשSession 25

jarjarjarjar

קובץ zip עם המחלקות המהודרות וקבצי המשאבים (תמונות, צלילים). jar --create --file game.jar --main-class Main -C out . ו-java -jar game.jar.

A zip file with the compiled classes and resource files (images, sounds). jar --create --file game.jar --main-class Main -C out . and java -jar game.jar.

מופיע לראשונה: First appears: מפגשSession 48

JavaJavaJavaJava

שפת תכנות מבוססת מחלקות עם טיפוסים קבועים, שרצה על ה-JVM. משמשת לשרתים, אפליקציות Android, מערכות בנקאיות, ביג-דאטה ומשחקים.

A class-based, statically typed programming language that runs on the JVM. Used for servers, Android apps, banking systems, big data and games.

מופיע לראשונה: First appears: מפגשSession 1

Java Memory ModelJava Memory ModelJava Memory ModelJava Memory Model

החלק במפרט של Java שמגדיר מה thread אחד רשאי לראות מהכתיבות של אחר. בלי happens-before, אין הבטחה.

The part of the Java spec defining what one thread may see of another's writes. Without happens-before, there's no promise.

מופיע לראשונה: First appears: מפגשSession 33

JAVA_HOMEJAVA_HOMEJAVA_HOMEJAVA_HOME

משתנה סביבה שמצביע על התיקייה שבה מותקן ה-JDK. כלים כמו Maven ו-Gradle משתמשים בו כדי למצוא את Java.

An environment variable pointing at the folder where the JDK is installed. Tools like Maven and Gradle use it to find Java.

מופיע לראשונה: First appears: מפגשSession 1

javacjavacjavacjavac

המהדר של Java. הפקודה javac Main.java בודקת את הקוד ויוצרת את הקובץ Main.class.

Java's compiler. The command javac Main.java checks the code and creates the file Main.class.

מופיע לראשונה: First appears: מפגשSession 1

JDBCJDBCJDBCJDBC

הדרך הסטנדרטית של Java לדבר עם מסד נתונים: DriverManager.getConnection, PreparedStatement, ResultSet. כל מסד (PostgreSQL, MySQL, H2) מגיע עם driver משלו.

Java's standard way to talk to a database: DriverManager.getConnection, PreparedStatement, ResultSet. Each database (PostgreSQL, MySQL, H2) comes with its own driver.

מופיע לראשונה: First appears: מפגשSession 39

JDKJDKJDKJDK

Java Development Kit: ערכת הפיתוח. כוללת את ה-JVM, את המהדר javac, את jshell ועוד כלים. מתקינים JDK כדי לכתוב Java.

Java Development Kit: the developer's kit. It includes the JVM, the javac compiler, jshell and more tools. You install a JDK to write Java.

מופיע לראשונה: First appears: מפגשSession 1

JFrame ו-JPanelJFrame and JPanelJFrame and JPanelJFrame ו-JPanel

JFrame הוא החלון; JPanel הוא משטח בתוכו. דורסים ב-JPanel את paintComponent(Graphics g) כדי לצייר.

JFrame is the window; JPanel is a surface inside it. Override the JPanel's paintComponent(Graphics g) to draw.

מופיע לראשונה: First appears: מפגשSession 43

joinjoinjoinjoin

t.join() עוצר את ה-thread הנוכחי עד ש-t מסיים. זה גם מבטיח שכל מה ש-t כתב נראה אחרי ה-join.

t.join() stops the current thread until t finishes. It also guarantees that whatever t wrote is visible after the join.

מופיע לראשונה: First appears: מפגשSession 31

jpackagejpackagejpackagejpackage

כלי ב-JDK שאורז את ה-jar יחד עם Java עצמה לתוכנה רגילה (app ב-Mac, exe או msi ב-Windows). מי שמקבל לא צריך להתקין Java.

A JDK tool that packs the jar together with Java itself into a regular app (an app on Mac, an exe or msi on Windows). Whoever gets it doesn't need to install Java.

מופיע לראשונה: First appears: מפגשSession 48

JREJREJREJRE

Java Runtime Environment: רק מה שצריך כדי להריץ תוכנות Java (JVM וספריות), בלי מהדר. היום מתקינים בדרך כלל JDK שלם.

Java Runtime Environment: just what's needed to run Java programs (the JVM and libraries), with no compiler. Today you usually install a whole JDK.

מופיע לראשונה: First appears: מפגשSession 1

jshelljshelljshelljshell

כלי שמגיע עם ה-JDK ומאפשר להקליד שורת Java ולראות מיד את התוצאה, בלי class ובלי main.

A tool that comes with the JDK: type a line of Java and see the result at once, with no class and no main.

מופיע לראשונה: First appears: מפגשSession 1

JSONJSONJSONJSON

פורמט טקסט לנתונים: {"title": "Dune", "year": 1965}, ומערכים ב-[...]. בפרויקט אמיתי משתמשים ב-Jackson או Gson, שממירים record ל-JSON ובחזרה בשורה אחת.

A text format for data: {"title": "Dune", "year": 1965}, with arrays in [...]. Real projects use Jackson or Gson, which turn a record into JSON and back in one line.

מופיע לראשונה: First appears: מפגשSession 29

JUnit 5JUnit 5JUnit 5JUnit 5

ספריית הבדיקות הנפוצה ב-Java. כל מתודה עם @Test היא בדיקה, @BeforeEach רץ לפני כל אחת, ו-IntelliJ או mvn test מריצים הכול ומדווחים.

Java's common testing library. Each @Test method is a test, @BeforeEach runs before each one, and IntelliJ or mvn test runs them all and reports.

מופיע לראשונה: First appears: מפגשSession 30

JVMJVMJVMJVM

Java Virtual Machine: "מחשב וירטואלי" שמריץ bytecode. יש JVM ל-Windows, ל-Mac, ל-Linux ואפילו לדפדפן, ולכן אותה תוכנה רצה בכולם.

Java Virtual Machine: a "virtual computer" that runs bytecode. There's a JVM for Windows, Mac, Linux and even the browser, so the same program runs on all of them.

מופיע לראשונה: First appears: מפגשSession 1

KeyListenerKeyListenerKeyListenerKeyListener

מקבל אירועים: keyPressed כשלוחצים ו-keyReleased כשעוזבים. ה-JPanel צריך setFocusable(true) כדי לקבל אותם.

Receives events: keyPressed on press and keyReleased on release. The JPanel needs setFocusable(true) to get them.

מופיע לראשונה: First appears: מפגשSession 44

lengthlengthlengthlength

מספר התאים במערך: a.length (בלי סוגריים, בשונה מ-length() של String). האינדקס האחרון הוא a.length - 1.

The number of cells in an array: a.length (no brackets, unlike String's length()). The last index is a.length - 1.

מופיע לראשונה: First appears: מפגשSession 8

LinkedHashSetLinkedHashSetLinkedHashSetLinkedHashSet

Set ששומר את סדר ההכנסה. מהיר כמו HashSet.

A Set that keeps insertion order. As fast as a HashSet.

מופיע לראשונה: First appears: מפגשSession 25

livelocklivelocklivelocklivelock

threads לא תקועים, אבל כל הזמן מוותרים זה לזה ומנסים שוב, ולכן לא מתקדמים. פתרון: המתנה אקראית לפני ניסיון חוזר.

Threads aren't stuck, but keep giving way to each other and retrying, so they never progress. Fix: a random wait before retrying.

מופיע לראשונה: First appears: מפגשSession 38

LTSLTSLTSLTS

Long-Term Support: גרסה שמקבלת עדכונים ותיקונים במשך שנים. Java 21 היא גרסת LTS, ולכן הקורס בנוי עליה.

Long-Term Support: a version that gets updates and fixes for years. Java 21 is an LTS version, so the course is built on it.

מופיע לראשונה: First appears: מפגשSession 1

manifestmanifestmanifestmanifest

קובץ META-INF/MANIFEST.MF בתוך ה-jar. השורה Main-Class: Main אומרת ל-java -jar מאיפה להתחיל.

The META-INF/MANIFEST.MF file inside the jar. The line Main-Class: Main tells java -jar where to start.

מופיע לראשונה: First appears: מפגשSession 48

MavenMavenMavenMaven

כלי בנייה: קובץ pom.xml מגדיר את הפרויקט ואת התלויות (למשל JUnit), והוא מוריד אותן לבד. קוד ב-src/main/java, בדיקות ב-src/test/java. mvn test, mvn package.

A build tool: pom.xml defines the project and its dependencies (e.g. JUnit), which it downloads itself. Code in src/main/java, tests in src/test/java. mvn test, mvn package.

מופיע לראשונה: First appears: מפגשSession 30

method referencemethod referencemethod referencemethod reference

קיצור ללמבדה שרק קוראת למתודה: String::length במקום s -> s.length(), System.out::println, Book::new.

A shorthand for a lambda that only calls a method: String::length instead of s -> s.length(), System.out::println, Book::new.

מופיע לראשונה: First appears: מפגשSession 26

multi-catchmulti-catchmulti-catchmulti-catch

catch (ArithmeticException | NumberFormatException e): טיפול אחד לכמה סוגי חריגות.

catch (ArithmeticException | NumberFormatException e): one handler for several exception types.

מופיע לראשונה: First appears: מפגשSession 28

newnewnewnew

יוצר עצם חדש ב-heap ומחזיר הפניה אליו: Book b = new Book();.

Creates a new object on the heap and returns a reference to it: Book b = new Book();.

מופיע לראשונה: First appears: מפגשSession 13

NoSuchFileExceptionNoSuchFileExceptionNoSuchFileExceptionNoSuchFileException

החריגה כשקוראים קובץ שלא קיים. היא IOException, כלומר checked.

The exception when reading a file that doesn't exist. It's an IOException, so it's checked.

מופיע לראשונה: First appears: מפגשSession 29

nullnullnullnull

הפניה שלא מצביעה על שום עצם. משתנה מסוג עצם שלא קיבל ערך, או תא חדש במערך של עצמים, הוא null.

A reference that points to no object. An object variable that got no value, or a new cell in an array of objects, is null.

מופיע לראשונה: First appears: מפגשSession 13

NullPointerExceptionNullPointerExceptionNullPointerExceptionNullPointerException

החריגה כשמנסים לגשת לשדה או למתודה דרך null. Java 21 אומרת בדיוק מה היה null: Cannot read field "title" because "b" is null.

The exception when you reach a field or method through null. Java 21 says exactly what was null: Cannot read field "title" because "b" is null.

מופיע לראשונה: First appears: מפגשSession 13

NumberFormatExceptionNumberFormatExceptionNumberFormatExceptionNumberFormatException

נזרקת כש-Integer.parseInt או Double.parseDouble מקבלות טקסט שאינו מספר: For input string: "12a".

Thrown when Integer.parseInt or Double.parseDouble get text that isn't a number: For input string: "12a".

מופיע לראשונה: First appears: מפגשSession 12

ObserverObserverObserverObserver

עצם שומר רשימת "מאזינים" ומודיע לכולם כשמשהו קורה. המאזינים לא תלויים זה בזה.

An object keeps a list of "listeners" and notifies them all when something happens. The listeners don't depend on each other.

מופיע לראשונה: First appears: מפגשSession 24

OptionalOptionalOptionalOptional

קופסה שאולי יש בה ערך. findFirst מחזיר Optional, ומטפלים במקרה הריק במפורש: orElse, map, ifPresentOrElse. בלי NullPointerException.

A box that may hold a value. findFirst returns an Optional, and you handle the empty case explicitly: orElse, map, ifPresentOrElse. No NullPointerException.

מופיע לראשונה: First appears: מפגשSession 27

PATHPATHPATHPATH

רשימת התיקיות שבהן הטרמינל מחפש תוכנות. אם התיקייה bin של ה-JDK לא ב-PATH, הפקודה javac "לא מוכרת".

The list of folders where the terminal looks for programs. If the JDK's bin folder isn't on PATH, the javac command is "not recognized".

מופיע לראשונה: First appears: מפגשSession 1

PathPathPathPath

כתובת של קובץ או תיקייה: Path.of("library", "scifi"). נתיב יחסי מתחיל מהתיקייה שבה התוכנית רצה.

The address of a file or folder: Path.of("library", "scifi"). A relative path starts from the folder the program runs in.

מופיע לראשונה: First appears: מפגשSession 29

PECSPECSPECSPECS

Producer Extends, Consumer Super: רשימה שרק קוראים ממנה היא ? extends T, ורשימה שרק כותבים אליה היא ? super T.

Producer Extends, Consumer Super: a list you only read from is ? extends T, and a list you only write to is ? super T.

מופיע לראשונה: First appears: מפגשSession 22

Predicate, Function, Consumer, SupplierPredicate, Function, Consumer, SupplierPredicate, Function, Consumer, SupplierPredicate, Function, Consumer, Supplier

Predicate<T>: T → boolean (test). Function<T, R>: T → R (apply). Consumer<T>: T → כלום (accept). Supplier<T>: כלום → T (get).

Predicate<T>: T → boolean (test). Function<T, R>: T → R (apply). Consumer<T>: T → nothing (accept). Supplier<T>: nothing → T (get).

מופיע לראשונה: First appears: מפגשSession 26

printlnprintlnprintlnprintln

System.out.println מציגה ערך על המסך ויורדת שורה. System.out.print מציגה בלי לרדת שורה.

System.out.println shows a value on the screen and moves to a new line. System.out.print shows it without a new line.

מופיע לראשונה: First appears: מפגשSession 1

PriorityQueuePriorityQueuePriorityQueuePriorityQueue

תור ש-poll שלו מחזיר תמיד את האיבר הקטן ביותר (לפי הסדר הטבעי או Comparator), לא את הראשון שנכנס.

A queue whose poll always returns the smallest item (by natural order or a Comparator), not the first one in.

מופיע לראשונה: First appears: מפגשSession 25

privateprivateprivateprivate

שדה או מתודה שנגישים רק מתוך המחלקה עצמה. מבחוץ javac עוצר: rating has private access in Book.

A field or method reachable only inside its own class. From outside javac stops: rating has private access in Book.

מופיע לראשונה: First appears: מפגשSession 15

promptpromptpromptprompt

הטקסט ששולחים למודל: מה התפקיד, אילו נתונים יש, ובאיזו צורה לענות. prompt מדויק נותן תשובה שקל לבדוק.

The text sent to the model: the role, the data available, and the shape of the answer. A precise prompt gives an answer that's easy to check.

מופיע לראשונה: First appears: מפגשSession 41

protectedprotectedprotectedprotected

גישה למחלקה, לתת-המחלקות שלה ולמחלקות באותה חבילה. נוח, אבל חושף מימוש לכל מי שיורש.

Access for the class, its subclasses and classes in the same package. Handy, but it exposes the implementation to every subclass.

מופיע לראשונה: First appears: מפגשSession 19

ReadWriteLockReadWriteLockReadWriteLockReadWriteLock

שני מנעולים: כמה קוראים יחד, או כותב אחד לבד. טוב כשיש הרבה קריאות ומעט כתיבות.

Two locks: several readers together, or one writer alone. Good when there are many reads and few writes.

מופיע לראשונה: First appears: מפגשSession 36

recordrecordrecordrecord

record Book(String title, int year) {}: מחלקה בלתי משתנה לנתונים. Java כותבת לבד בנאי, title(), year(), equals, hashCode ו-toString (Book[title=Dune, year=1965]).

record Book(String title, int year) {}: an immutable data class. Java writes the constructor, title(), year(), equals, hashCode and toString (Book[title=Dune, year=1965]) for you.

מופיע לראשונה: First appears: מפגשSession 23

reentrantreentrantreentrantreentrant

thread שכבר מחזיק מנעול יכול להיכנס אליו שוב (למשל מתודה synchronized שקוראת למתודה synchronized אחרת של אותו עצם) בלי לחסום את עצמו.

A thread already holding a lock can enter it again (e.g. a synchronized method calling another synchronized method of the same object) without blocking itself.

מופיע לראשונה: First appears: מפגשSession 32

ReentrantLockReentrantLockReentrantLockReentrantLock

מנעול מפורש: lock(), ואז try { ... } finally { unlock(); }. מאפשר tryLock (גם עם זמן קצוב) ו-lockInterruptibly.

An explicit lock: lock(), then try { ... } finally { unlock(); }. It allows tryLock (with a timeout too) and lockInterruptibly.

מופיע לראשונה: First appears: מפגשSession 36

RepositoryRepositoryRepositoryRepository

interface שמסתיר איפה הנתונים נשמרים (save, findByAuthor). מימוש אחד מדבר עם מסד נתונים, ואחר שומר בזיכרון לבדיקות.

An interface hiding where data is kept (save, findByAuthor). One implementation talks to a database, another keeps it in memory for tests.

מופיע לראשונה: First appears: מפגשSession 39

RESTRESTRESTREST

סגנון API מעל HTTP: כל דבר הוא משאב בכתובת (/books/Dune), והשיטה אומרת מה עושים: GET קורא, POST יוצר, PUT מעדכן, DELETE מוחק.

An API style over HTTP: everything is a resource at an address (/books/Dune), and the method says what to do: GET reads, POST creates, PUT updates, DELETE deletes.

מופיע לראשונה: First appears: מפגשSession 40

RunnableRunnableRunnableRunnable

functional interface עם void run(): העבודה שה-thread יעשה. new Thread(() -> ...) מקבל אותה כלמבדה.

A functional interface with void run(): the work the thread will do. new Thread(() -> ...) takes it as a lambda.

מופיע לראשונה: First appears: מפגשSession 31

ScannerScannerScannerScanner

מחלקה שקוראת קלט: Scanner sc = new Scanner(System.in);, ואז sc.nextLine(), sc.nextInt() וכו'.

A class that reads input: Scanner sc = new Scanner(System.in);, then sc.nextLine(), sc.nextInt() and so on.

מופיע לראשונה: First appears: מפגשSession 6

sealedsealedsealedsealed

sealed interface Shape permits Circle, Rect: רק הטיפוסים שברשימה רשאים לממש. כך javac יודע את כל האפשרויות.

sealed interface Shape permits Circle, Rect: only the listed types may implement it. That way javac knows every possibility.

מופיע לראשונה: First appears: מפגשSession 23

seedseedseedseed

new Random(42) מייצר תמיד את אותה סדרה "אקראית". במשחק אמיתי בלי seed; בבדיקות עם seed, כדי שהתוצאה תהיה קבועה.

new Random(42) always produces the same "random" sequence. In the real game no seed; in tests with a seed, so the result is fixed.

מופיע לראשונה: First appears: מפגשSession 48

shutdownshutdownshutdownshutdown

shutdown() מפסיק לקבל משימות חדשות ונותן לקיימות לסיים. awaitTermination מחכה לזה. בלי shutdown התוכנית עלולה לא להסתיים.

shutdown() stops taking new tasks and lets the current ones finish. awaitTermination waits for that. Without shutdown the program may never end.

מופיע לראשונה: First appears: מפגשSession 35

SingletonSingletonSingletonSingleton

מחלקה עם מופע יחיד לכל התוכנית (הכי פשוט: enum עם ערך אחד). הבעיה: זה מצב גלובלי, וקשה לבדוק ולהחליף אותו.

A class with a single instance for the whole program (simplest: an enum with one value). The problem: it's global state, hard to test and to swap.

מופיע לראשונה: First appears: מפגשSession 24

SOLIDSOLIDSOLIDSOLID

חמישה עקרונות: S – אחריות אחת למחלקה; O – פתוח להרחבה, סגור לשינוי; L – תת-מחלקה עובדת בכל מקום שההורה עובד; I – interfaces קטנים וממוקדים; D – תלות ב-interfaces, לא במימושים.

Five principles: S – one job per class; O – open to extension, closed to change; L – a subclass works wherever the parent works; I – small, focused interfaces; D – depend on interfaces, not implementations.

מופיע לראשונה: First appears: מפגשSession 24

Spring BootSpring BootSpring BootSpring Boot

framework שמרים שרת אינטרנט ב-Java בכמה שורות. מחלקה עם @RestController ומתודות עם @GetMapping("/books") הופכות לנקודות קצה.

A framework that starts a Java web server in a few lines. A class with @RestController and methods with @GetMapping("/books") become endpoints.

מופיע לראשונה: First appears: מפגשSession 40

spritespritespritesprite

תמונה קטנה של דמות או עצם במשחק. נטענת עם ImageIO.read ומצוירת עם g.drawImage. sprite sheet: הרבה פריימים בתמונה אחת, ברשת.

A small picture of a character or object in a game. Loaded with ImageIO.read and drawn with g.drawImage. A sprite sheet: many frames in one picture, on a grid.

מופיע לראשונה: First appears: מפגשSession 45

SQL injectionSQL injectionSQL injectionSQL injection

כשמחברים קלט של משתמש לתוך מחרוזת SQL, הקלט יכול לשנות את השאילתה (' OR '1'='1). פרמטרים (?) שולחים את הקלט בנפרד, כנתון ולא כקוד.

When user input is glued into an SQL string, the input can change the query (' OR '1'='1). Parameters (?) send the input separately, as data and not as code.

מופיע לראשונה: First appears: מפגשSession 39

stack tracestack tracestack tracestack trace

הרשימה שמופיעה מתחת לחריגה, שורות שמתחילות ב-at. היא אומרת באיזו מתודה ובאיזו שורה החריגה קרתה.

The list under an exception, lines starting with at. It says which method and which line the exception happened on.

מופיע לראשונה: First appears: מפגשSession 1

start מול runstart vs runstart vs runstart מול run

start() יוצר thread חדש שמריץ את run(). קריאה ישירה ל-run() היא סתם קריאה למתודה, באותו thread.

start() creates a new thread that runs run(). Calling run() directly is just a method call, on the same thread.

מופיע לראשונה: First appears: מפגשSession 31

Step IntoStep IntoStep IntoStep Into

נכנס לתוך המתודה שנקראת בשורה הנוכחית, כדי לראות מה קורה בתוכה. קיצור: F7.

Goes into the method called on the current line, to see what happens inside it. Shortcut: F7.

מופיע לראשונה: First appears: מפגשSession 11

Step OverStep OverStep OverStep Over

מריץ את השורה הנוכחית כולה (גם אם יש בה קריאה למתודה) ועוצר בשורה הבאה. קיצור: F8.

Runs the current line completely (even if it calls a method) and stops at the next line. Shortcut: F8.

מופיע לראשונה: First appears: מפגשSession 11

StrategyStrategyStrategyStrategy

משפחת אלגוריתמים מאחורי interface אחד (Comparator, Discount). מי שמשתמש מקבל אסטרטגיה ולא יודע איזו.

A family of algorithms behind one interface (Comparator, Discount). The user gets a strategy and doesn't know which one.

מופיע לראשונה: First appears: מפגשSession 24

StreamStreamStreamStream

"פס ייצור" על אוסף: books.stream().filter(...).map(...).toList(). לא משנה את האוסף המקורי.

A "production line" over a collection: books.stream().filter(...).map(...).toList(). It doesn't change the original collection.

מופיע לראשונה: First appears: מפגשSession 27

StringBuilderStringBuilderStringBuilderStringBuilder

"מחרוזת שמשתנה": מוסיפים לה עם append בלי ליצור עצם חדש כל פעם, ובסוף toString().

A "string you can change": add to it with append without making a new object each time, then toString() at the end.

מופיע לראשונה: First appears: מפגשSession 3

supersupersupersuper

super(...) בשורה הראשונה של בנאי קורא לבנאי של ההורה. super.describe() קורא לגרסה של ההורה מתוך מתודה שדורסת אותה.

super(...) on a constructor's first line calls the parent's constructor. super.describe() calls the parent's version from inside a method that overrides it.

מופיע לראשונה: First appears: מפגשSession 19

switch עם חציםswitch expressionswitch expressionswitch עם חצים

switch שבו כל case כתוב עם ->: רק הענף המתאים רץ, ואפשר להחזיר ממנו ערך: String s = switch (day) { case 1 -> "Sun"; ... };.

A switch where every case uses ->: only the matching branch runs, and it can return a value: String s = switch (day) { case 1 -> "Sun"; ... };.

מופיע לראשונה: First appears: מפגשSession 4

switch עם תבניותpattern switchpattern switchswitch עם תבניות

switch (s) { case Circle c -> ...; } בודק את הסוג ונותן משתנה מוכן. case ... when תנאי מוסיף תנאי.

switch (s) { case Circle c -> ...; } checks the type and gives a ready variable. case ... when condition adds a condition.

מופיע לראשונה: First appears: מפגשSession 23

synchronizedsynchronizedsynchronizedsynchronized

synchronized void inc() או synchronized (lock) { ... }: רק thread אחד בכל פעם נכנס, והשאר מחכים (BLOCKED). גם מבטיח שהכתיבות נראות ל-thread הבא שנכנס.

synchronized void inc() or synchronized (lock) { ... }: only one thread at a time gets in, the rest wait (BLOCKED). It also makes the writes visible to the next thread that enters.

מופיע לראשונה: First appears: מפגשSession 32

Template MethodTemplate MethodTemplate MethodTemplate Method

מתודה בהורה (לרוב final) שקובעת את סדר השלבים, ומשאירה שלבים מופשטים לתת-המחלקות.

A method in the parent (often final) that fixes the order of the steps, leaving abstract steps to the subclasses.

מופיע לראשונה: First appears: מפגשSession 20

thisthisthisthis

הפניה לעצם הנוכחי. this.title הוא השדה, ו-title לבד הוא הפרמטר אם יש פרמטר בשם הזה.

A reference to the current object. this.title is the field, and plain title is the parameter if there's a parameter with that name.

מופיע לראשונה: First appears: מפגשSession 14

threadthreadthreadthread

"קו ביצוע" בתוך תוכנית. לכל thread יש stack משלו, אבל כולם חולקים את ה-heap. main הוא thread בעצמו.

A "line of execution" inside a program. Each thread has its own stack, but they all share the heap. main is a thread itself.

מופיע לראשונה: First appears: מפגשSession 31

thread dumpthread dumpthread dumpthread dump

תמונה של כל ה-threads ומה כל אחד מחזיק ומחכה לו. jstack <pid> (או Ctrl+Break) מדפיס אותה, וכותב Found one Java-level deadlock כשיש.

A snapshot of every thread and what it holds and waits for. jstack <pid> (or Ctrl+Break) prints it, and says Found one Java-level deadlock when there is one.

מופיע לראשונה: First appears: מפגשSession 38

throwthrowthrowthrow

זורק חריגה בעצמכם: throw new IllegalArgumentException("...");. המתודה נעצרת מיד, והחריגה עולה למי שקרא לה.

Throws an exception yourself: throw new IllegalArgumentException("...");. The method stops at once, and the exception goes up to its caller.

מופיע לראשונה: First appears: מפגשSession 12

throwsthrowsthrowsthrows

static String load(...) throws IOException: "המתודה הזו עלולה לזרוק IOException, ומי שקורא לה צריך לטפל".

static String load(...) throws IOException: "this method may throw an IOException, and its caller must deal with it".

מופיע לראשונה: First appears: מפגשSession 28

toStringtoStringtoStringtoString

המחרוזת שמייצגת עצם. println(b), "x" + b ו-List.toString קוראים לה. בלי לדרוס יוצא משהו כמו Book@1b6d3586.

The string that stands for an object. println(b), "x" + b and List.toString call it. Without an override you get something like Book@1b6d3586.

מופיע לראשונה: First appears: מפגשSession 17

TreeMapTreeMapTreeMapTreeMap

Map עם מפתחות ממוינים: firstKey, lastEntry, headMap(k) (כל מה שקטן מ-k).

A Map with sorted keys: firstKey, lastEntry, headMap(k) (everything smaller than k).

מופיע לראשונה: First appears: מפגשSession 25

TreeSetTreeSetTreeSetTreeSet

Set ממוין תמיד (לפי Comparable או Comparator), עם ניווט: floor, ceiling, subSet.

An always-sorted Set (by Comparable or a Comparator), with navigation: floor, ceiling, subSet.

מופיע לראשונה: First appears: מפגשSession 25

try ו-catchtry and catchtry and catchtry ו-catch

try { ... } catch (SomeException e) { ... }: אם בתוך ה-try נזרקת חריגה מהסוג הזה, קופצים ל-catch במקום לקרוס. השורות שאחרי מקום החריגה ב-try לא רצות.

try { ... } catch (SomeException e) { ... }: if an exception of that type is thrown inside the try, jump to the catch instead of crashing. The lines after the throw point in the try don't run.

מופיע לראשונה: First appears: מפגשSession 12

try-with-resourcestry-with-resourcestry-with-resourcestry-with-resources

try (Res r = new Res()) { ... }: בסוף הבלוק Java קוראת ל-close() לבד, גם אם נזרקה חריגה. כמה משאבים נסגרים בסדר הפוך.

try (Res r = new Res()) { ... }: at the end of the block Java calls close() itself, even if an exception was thrown. Several resources close in reverse order.

מופיע לראשונה: First appears: מפגשSession 28

varvarvarvar

במקום לכתוב טיפוס, var אומר למהדר להסיק אותו מהערך: var n = 5; הוא int. הטיפוס עדיין קבוע.

Instead of writing a type, var tells the compiler to infer it from the value: var n = 5; is an int. The type is still fixed.

מופיע לראשונה: First appears: מפגשSession 2

virtual threadvirtual threadvirtual threadvirtual thread

thread קל מאוד (Java 21) שה-JVM מנהל. כשהוא מחכה (sleep, רשת, קובץ) הוא לא תופס thread של מערכת ההפעלה, ולכן אפשר להריץ עשרות אלפים.

A very light thread (Java 21) managed by the JVM. When it waits (sleep, network, a file) it doesn't hold an OS thread, so you can run tens of thousands.

מופיע לראשונה: First appears: מפגשSession 37

voidvoidvoidvoid

מתודה void לא מחזירה ערך: היא עושה משהו (למשל מדפיסה) וחוזרת.

A void method returns no value: it does something (like printing) and goes back.

מופיע לראשונה: First appears: מפגשSession 7

volatilevolatilevolatilevolatile

volatile boolean running: כל קריאה רואה את הכתיבה האחרונה, וכל מה שנכתב לפני כתיבה ל-volatile נראה למי שקורא אותו. לא נותן אטומיות: count++ עדיין לא בטוח.

volatile boolean running: every read sees the latest write, and whatever was written before a volatile write is visible to whoever reads it. It gives no atomicity: count++ still isn't safe.

מופיע לראשונה: First appears: מפגשSession 33

wait ו-notifywait and notifywait and notifywait ו-notify

lock.wait() משחרר את המנעול ונרדם עד ש-lock.notifyAll() מעיר אותו (ואז הוא מחכה לקבל את המנעול שוב). שניהם רק בתוך synchronized (lock).

lock.wait() releases the lock and sleeps until lock.notifyAll() wakes it (then it waits to get the lock back). Both only inside synchronized (lock).

מופיע לראשונה: First appears: מפגשSession 34

wildcardwildcardwildcardwildcard

? בטיפוס של פרמטר: List<? extends Number> מקבלת List<Integer> וגם List<Double>.

? in a parameter's type: List<? extends Number> accepts a List<Integer> and a List<Double>.

מופיע לראשונה: First appears: מפגשSession 22

אופרטורoperatoroperatorאופרטור

סימן שעושה פעולה על ערכים: + - * / %. בין מחרוזות, + מחבר אותן.

A symbol that does something to values: + - * / %. Between strings, + joins them.

מופיע לראשונה: First appears: מפגשSession 1

אופרטור טרנריternary operatorternary operatorאופרטור טרנרי

תנאי ? ערך1 : ערך2: if קצר שמחזיר ערך. String s = n > 0 ? "plus" : "not plus";.

condition ? value1 : value2: a short if that returns a value. String s = n > 0 ? "plus" : "not plus";.

מופיע לראשונה: First appears: מפגשSession 4

אופרטור לוגיlogical operatorlogical operatorאופרטור לוגי

מחבר תנאים: && (וגם: שניהם נכונים), || (או: לפחות אחד), ! (לא: הופך).

Joins conditions: && (and: both true), || (or: at least one), ! (not: flips).

מופיע לראשונה: First appears: מפגשSession 4

אחריות אחתsingle responsibilitysingle responsibilityאחריות אחת

לכל מחלקה תפקיד אחד ברור: Author יודעת על סופר, Book על ספר, ו-Shelf מנהלת אוסף. כשמשהו משתנה, ברור איפה לתקן.

Each class has one clear job: Author knows about an author, Book about a book, and Shelf manages a collection. When something changes, it's clear where to fix it.

מופיע לראשונה: First appears: מפגשSession 18

אינדקסindexindexאינדקס

המספר של מקום במחרוזת (או במערך). מתחילים מ-0: ב-"java" התו באינדקס 0 הוא j.

The number of a position in a string (or an array). It starts at 0: in "java" the character at index 0 is j.

מופיע לראשונה: First appears: מפגשSession 3

אינווריאנטinvariantinvariantאינווריאנט

כלל שתמיד נכון על העצם, למשל "הדירוג בין 1 ל-5". הבנאי וה-setters זורקים חריגה במקום לשבור אותו.

A rule that's always true about the object, e.g. "the rating is between 1 and 5". The constructor and setters throw instead of breaking it.

מופיע לראשונה: First appears: מפגשSession 15

אנימציה מפריימיםframe animationframe animationאנימציה מפריימים

מחליפים פריים כל כמה מאיות שנייה: frame = (int) (time / frameSeconds) % frames.

Switch the frame every few hundredths of a second: frame = (int) (time / frameSeconds) % frames.

מופיע לראשונה: First appears: מפגשSession 45

אסינכרוניasynchronousasynchronousאסינכרוני

"תתחיל את זה, ותודיע לי כשיש תוצאה", במקום לחכות בשורה. שימושי כשרוב הזמן מחכים לרשת או לדיסק.

"Start this, and tell me when there's a result", instead of waiting in line. Useful when most of the time is spent waiting for the network or disk.

מופיע לראשונה: First appears: מפגשSession 37

ארגומנטargumentargumentארגומנט

הערך שנותנים לפרמטר בקריאה: ב-add(2, 3) הארגומנטים הם 2 ו-3.

The value given to a parameter in a call: in add(2, 3) the arguments are 2 and 3.

מופיע לראשונה: First appears: מפגשSession 7

באגbugbugבאג

טעות בתוכנית שגורמת לה להתנהג אחרת ממה שרצינו. לחפש ולתקן באגים נקרא דיבוג (debugging).

A mistake in a program that makes it behave differently from what we wanted. Finding and fixing bugs is called debugging.

מופיע לראשונה: First appears: מפגשSession 1

בדיקה ואז פעולהcheck-then-actcheck-then-actבדיקה ואז פעולה

if (copies > 0) copies--;: בין הבדיקה לפעולה thread אחר יכול להיכנס. הבדיקה והפעולה חייבות להיות באותו קטע מוגן.

if (copies > 0) copies--;: between the check and the act another thread can slip in. The check and the act must be in the same protected section.

מופיע לראשונה: First appears: מפגשSession 32

בדיקה ידניתmanual testmanual testבדיקה ידנית

קוד קטן שמריץ את המחלקות ובודק תוצאות צפויות, ומדפיס PASS או FAIL. במפגש 29 נעבור ל-JUnit, שעושה את זה בצורה מסודרת.

Small code that runs the classes and checks expected results, printing PASS or FAIL. In session 29 we move to JUnit, which does this properly.

מופיע לראשונה: First appears: מפגשSession 18

בדיקת הפלטvalidating outputvalidating outputבדיקת הפלט

לפני שמשתמשים בתשובה: בודקים שהיא בפורמט הנכון ושהיא הגיונית (למשל שהספר באמת במדף). אם לא, ברירת מחדל.

Before using a reply: check it's in the right format and makes sense (say, the book really is on the shelf). If not, a fallback.

מופיע לראשונה: First appears: מפגשSession 41

בדיקת יחידהunit testunit testבדיקת יחידה

קוד קטן שבודק יחידה אחת (מתודה, מחלקה) במצב אחד: מכינים (Arrange), מפעילים (Act), ובודקים את התוצאה (Assert). רץ בשנייה, ואפשר להריץ אחרי כל שינוי.

Small code checking one unit (a method, a class) in one situation: set up (Arrange), run (Act), check the result (Assert). It runs in a second, after every change.

מופיע לראשונה: First appears: מפגשSession 30

בדיקת קלטinput validationinput validationבדיקת קלט

בודקים שהקלט הגיוני לפני שמשתמשים בו: hasNextInt() לפני nextInt(), ובדיקת טווח.

Checking input makes sense before using it: hasNextInt() before nextInt(), and a range check.

מופיע לראשונה: First appears: מפגשSession 6

ביטוי בוליאניboolean expressionboolean expressionביטוי בוליאני

ביטוי שהערך שלו הוא true או false: השוואה, שילוב של השוואות, או משתנה boolean.

An expression whose value is true or false: a comparison, a mix of comparisons, or a boolean variable.

מופיע לראשונה: First appears: מפגשSession 4

בלוקblockblockבלוק

קבוצת שורות בין סוגר מסולסל פותח { לסוגר סוגר }. הבלוק שייך למה שכתוב לפניו: מחלקה, מתודה, תנאי או לולאה.

A group of lines between an opening { and a closing }. The block belongs to what comes right before it: a class, a method, a condition or a loop.

מופיע לראשונה: First appears: מפגשSession 1

בנאיconstructorconstructorבנאי

"מתודה" מיוחדת בשם המחלקה, בלי טיפוס החזרה, שרצה ב-new: Book(String title) { this.title = title; }.

A special "method" named after the class, with no return type, that runs on new: Book(String title) { this.title = title; }.

מופיע לראשונה: First appears: מפגשSession 14

בנאי ברירת מחדלdefault constructordefault constructorבנאי ברירת מחדל

אם לא כתבתם שום בנאי, Java נותנת בנאי ריק בלי פרמטרים. ברגע שכתבתם בנאי כלשהו, הוא נעלם.

If you wrote no constructor, Java gives an empty one with no parameters. As soon as you write any constructor, it's gone.

מופיע לראשונה: First appears: מפגשSession 14

בנאי מקוצרcompact constructorcompact constructorבנאי מקוצר

Book { if (year < 0) throw ...; } בתוך record: בנאי בלי רשימת פרמטרים, שרץ לפני שהשדות נקבעים. המקום לבדיקות.

Book { if (year < 0) throw ...; } inside a record: a constructor with no parameter list, running before the fields are set. The place for checks.

מופיע לראשונה: First appears: מפגשSession 23

בריכת threadsthread poolthread poolבריכת threads

מספר קבוע של threads שלוקחים משימות מתור. יצירת thread יקרה, ולכן משתמשים שוב באותם threads.

A fixed number of threads taking tasks from a queue. Creating a thread is expensive, so the same threads are reused.

מופיע לראשונה: First appears: מפגשSession 35

גלולת רעלpoison pillpoison pillגלולת רעל

ערך מיוחד שהיצרן שם בתור כדי לומר לצרכן "זהו, אפשר לסיים". אחד לכל צרכן.

A special value the producer puts in the queue to tell a consumer "that's it, you can stop". One per consumer.

מופיע לראשונה: First appears: מפגשSession 34

גלישה (overflow)overflowoverflowגלישה (overflow)

כשהתוצאה גדולה מדי לטיפוס, היא "מתגלגלת" למספר שגוי, בלי שגיאה. int מגיע עד כ-2.1 מיליארד.

When a result is too big for the type it "wraps around" to a wrong number, with no error. int goes up to about 2.1 billion.

מופיע לראשונה: First appears: מפגשSession 2

דיבאגרdebuggerdebuggerדיבאגר

כלי שמריץ את התוכנית לאט, עוצר איפה שביקשתם ומראה את ערכי המשתנים. ב-IntelliJ: הכפתור עם החיפושית (Debug) במקום ▶.

A tool that runs the program slowly, stops where you asked and shows the variables' values. In IntelliJ: the bug button (Debug) instead of ▶.

מופיע לראשונה: First appears: מפגשSession 11

דריסהoverridingoverridingדריסה

מתודה בתת-מחלקה עם אותה חתימה בדיוק כמו בהורה, שמחליפה את ההתנהגות. @Override מבקש מ-javac לוודא שזו באמת דריסה.

A method in a subclass with exactly the parent's signature, replacing the behaviour. @Override asks javac to make sure it really is an override.

מופיע לראשונה: First appears: מפגשSession 19

האצלהdelegationdelegationהאצלה

מתודה שמעבירה את העבודה לעצם אחר: Shelf.size() מחזירה books.size().

A method handing the work to another object: Shelf.size() returns books.size().

מופיע לראשונה: First appears: מפגשSession 18

הזרקת תלויותdependency injectiondependency injectionהזרקת תלויות

מחלקה מקבלת את מה שהיא צריכה בבנאי, במקום ליצור אותו. ב-Spring זה קורה לבד; כאן כותבים new BookController(new BookService(repo)).

A class receives what it needs in its constructor, instead of creating it. In Spring that happens for you; here we write new BookController(new BookService(repo)).

מופיע לראשונה: First appears: מפגשSession 40

החוזה של equals ו-hashCodethe equals/hashCode contractthe equals/hashCode contractהחוזה של equals ו-hashCode

אם a.equals(b), אז a.hashCode() == b.hashCode(). דורסים את שתיהן יחד, על סמך אותם שדות. equals גם צריכה להיות סימטרית: a.equals(b) אם ורק אם b.equals(a).

If a.equals(b), then a.hashCode() == b.hashCode(). Override both together, based on the same fields. equals must also be symmetric: a.equals(b) exactly when b.equals(a).

מופיע לראשונה: First appears: מפגשSession 17

היפוך תלותdependency inversiondependency inversionהיפוך תלות

מחלקה מקבלת את מה שהיא צריכה מבחוץ, כ-interface (Reminder(Sender sender)), במקום ליצור אותו בעצמה. כך בבדיקה מעבירים מימוש מזויף.

A class receives what it needs from outside, as an interface (Reminder(Sender sender)), instead of creating it itself. In a test you then pass a fake.

מופיע לראשונה: First appears: מפגשSession 24

המרה למטהdowncastdowncastהמרה למטה

(EBook) item: אומרים ל-javac "תאמין לי, זה EBook". אם זה לא נכון, בזמן ריצה נזרקת ClassCastException.

(EBook) item: telling javac "trust me, it's an EBook". If that's wrong, a ClassCastException is thrown at run time.

מופיע לראשונה: First appears: מפגשSession 21

המרה מפורשת (cast)castcastהמרה מפורשת (cast)

כותבים טיפוס בסוגריים כדי להמיר: (int) 3.9 נותן 3. בהמרה מ-double ל-int החלק העשרוני נחתך.

Writing a type in brackets to convert: (int) 3.9 gives 3. Going from double to int cuts off the decimal part.

מופיע לראשונה: First appears: מפגשSession 2

המתודה mainthe main methodthe main methodהמתודה main

public static void main(String[] args): נקודת הכניסה של התוכנית. ה-JVM מתחילה לבצע מכאן.

public static void main(String[] args): the program's entry point. The JVM starts running from here.

מופיע לראשונה: First appears: מפגשSession 1

הסתרהshadowingshadowingהסתרה

כשלפרמטר או למשתנה מקומי יש שם של שדה, הוא "מסתיר" את השדה. title = title; משים את הפרמטר לעצמו, והשדה נשאר null.

When a parameter or local variable has a field's name, it "hides" the field. title = title; assigns the parameter to itself, and the field stays null.

מופיע לראשונה: First appears: מפגשSession 14

העברה לפי ערךpass-by-valuepass-by-valueהעברה לפי ערך

ב-Java כל ארגומנט מועתק לפרמטר. למספר: המתודה לא יכולה לשנות את המשתנה של הקורא. להפניה: מועתקת ההפניה, ושתיהן מצביעות על אותו עצם.

In Java every argument is copied into the parameter. For a number: the method can't change the caller's variable. For a reference: the reference is copied, and both point to the same object.

מופיע לראשונה: First appears: מפגשSession 7

העמסה (overloading)overloadingoverloadingהעמסה (overloading)

כמה מתודות עם אותו שם ופרמטרים שונים. Java בוחרת לפי הארגומנטים: max(int, int) מול max(double, double).

Several methods with the same name and different parameters. Java picks by the arguments: max(int, int) vs max(double, double).

מופיע לראשונה: First appears: מפגשSession 7

הערהcommentcommentהערה

טקסט בקוד שהמהדר מדלג עליו, בשביל בני אדם: // עד סוף השורה, או בין /* ל-*/.

Text in the code that the compiler skips, for people: // to the end of the line, or between /* and */.

מופיע לראשונה: First appears: מפגשSession 1

העתקה מגינהdefensive copydefensive copyהעתקה מגינה

מחזירים עותק (או תצוגה לקריאה בלבד) של אוסף פנימי, כדי שאיש לא ישנה אותו מבחוץ: return List.copyOf(songs);.

Return a copy (or a read-only view) of an inner collection, so nobody changes it from outside: return List.copyOf(songs);.

מופיע לראשונה: First appears: מפגשSession 15

הפניהreferencereferenceהפניה

מה שיושב בקופסה של משתנה מסוג עצם: לא העצם עצמו, אלא "כתובת" שמצביעה עליו ב-heap.

What sits in the box of an object-type variable: not the object itself, but an "address" pointing to it on the heap.

מופיע לראשונה: First appears: מפגשSession 3

הפניה finalfinal referencefinal referenceהפניה final

final int[] a אומר שאי אפשר להצביע עם a על מערך אחר. את התוכן של המערך עדיין אפשר לשנות.

final int[] a means a can't be pointed at another array. The array's contents can still change.

מופיע לראשונה: First appears: מפגשSession 16

הצהרהdeclarationdeclarationהצהרה

השורה שיוצרת משתנה: טיפוס ושם, למשל int score;.

The line that creates a variable: a type and a name, like int score;.

מופיע לראשונה: First appears: מפגשSession 2

הקשר סטטיstatic contextstatic contextהקשר סטטי

קוד בתוך מתודה static (כמו main). אין שם this, ולכן אי אפשר לפנות ישירות לשדה או למתודה של עצם: non-static method greet() cannot be referenced from a static context.

Code inside a static method (like main). There's no this there, so you can't reach an object's field or method directly: non-static method greet() cannot be referenced from a static context.

מופיע לראשונה: First appears: מפגשSession 10

הרכבה (has-a)composition (has-a)composition (has-a)הרכבה (has-a)

עצם שמחזיק עצמים אחרים בשדות: Book מחזיק Author. כמה ספרים יכולים להצביע על אותו סופר.

An object holding other objects in its fields: Book holds an Author. Several books can point to the same author.

מופיע לראשונה: First appears: מפגשSession 18

הרעבהstarvationstarvationהרעבה

thread שכמעט אף פעם לא מקבל את המנעול כי אחרים תמיד מקדימים. מנעול הוגן (new ReentrantLock(true)) משרת לפי סדר הגעה.

A thread that almost never gets the lock because others always get there first. A fair lock (new ReentrantLock(true)) serves in order of arrival.

מופיע לראשונה: First appears: מפגשSession 38

השמהassignmentassignmentהשמה

שמים ערך בקופסה עם =. הערך הקודם נמחק. = הוא "שים", לא "שווה".

Putting a value in a box with =. The old value is gone. = means "put", not "equals".

מופיע לראשונה: First appears: מפגשSession 2

התעוררות שקריתspurious wakeupspurious wakeupהתעוררות שקרית

thread יכול להתעורר מ-wait בלי סיבה, או אחרי שמישהו אחר כבר לקח את מה שחיכה לו. לכן בודקים את התנאי ב-while, לא ב-if.

A thread can wake from wait for no reason, or after someone else already took what it waited for. That's why the condition is checked in a while, not an if.

מופיע לראשונה: First appears: מפגשSession 34

התקנהinstallationinstallationהתקנה

הכנסת תוכנה למחשב כך שאפשר להשתמש בה. בקורס מתקינים JDK ו-IntelliJ IDEA פעם אחת.

Putting a program onto the computer so you can use it. In this course you install a JDK and IntelliJ IDEA once.

מופיע לראשונה: First appears: מפגשSession 1

חבר staticstatic memberstatic memberחבר static

שדה או מתודה ששייכים למחלקה עצמה, בעותק אחד: Ticket.count, Math.max. לא צריך עצם כדי להשתמש בהם.

A field or method that belongs to the class itself, in one copy: Ticket.count, Math.max. No object is needed to use them.

מופיע לראשונה: First appears: מפגשSession 10

חבר מופעinstance memberinstance memberחבר מופע

שדה או מתודה בלי static: לכל עצם יש עותק משלו של השדה (a.n ו-b.n נפרדים), וקוראים למתודה דרך עצם.

A field or method without static: every object has its own copy of the field (a.n and b.n are separate), and you call the method through an object.

מופיע לראשונה: First appears: מפגשSession 10

חלוקה של שלמיםinteger divisioninteger divisionחלוקה של שלמים

כששני המספרים שלמים, / זורק את מה שאחרי הנקודה: 7 / 2 הוא 3. ה-% נותן את השארית: 7 % 2 הוא 1.

When both numbers are whole, / drops what's after the point: 7 / 2 is 3. % gives the remainder: 7 % 2 is 1.

מופיע לראשונה: First appears: מפגשSession 1

חריגה (exception)exceptionexceptionחריגה (exception)

בעיה שקורית בזמן ריצה, למשל חלוקה ב-0. אם אף אחד לא מטפל בה, התוכנית עוצרת ומדפיסה Exception in thread "main".

A problem that happens while running, like dividing by 0. If nobody handles it, the program stops and prints Exception in thread "main".

מופיע לראשונה: First appears: מפגשSession 1

חריגה checkedchecked exceptionchecked exceptionחריגה checked

חריגה שיורשת מ-Exception (ולא מ-RuntimeException), כמו IOException. javac מחייב לתפוס אותה או להכריז עליה ב-throws. מתאימה למצבים צפויים: קובץ חסר, רשת נפלה.

An exception extending Exception (not RuntimeException), like IOException. javac forces you to catch it or declare it with throws. It fits expected situations: a missing file, a network failure.

מופיע לראשונה: First appears: מפגשSession 28

חריגה uncheckedunchecked exceptionunchecked exceptionחריגה unchecked

חריגה שיורשת מ-RuntimeException (IllegalArgumentException, NullPointerException). לא חובה להכריז. בדרך כלל מסמנת באג אצל מי שקרא.

An exception extending RuntimeException (IllegalArgumentException, NullPointerException). No declaration required. It usually signals a bug in the caller.

מופיע לראשונה: First appears: מפגשSession 28

חריגה משלכםcustom exceptioncustom exceptionחריגה משלכם

class BookNotFoundException extends Exception: שם שמסביר את המצב, הודעה ברורה, ושדות נוספים אם צריך.

class BookNotFoundException extends Exception: a name that explains the situation, a clear message, and extra fields if needed.

מופיע לראשונה: First appears: מפגשSession 28

טיפוסtypetypeטיפוס

מה מותר לשים בקופסה: מספר שלם, מספר עשרוני, טקסט ועוד. המהדר בודק שלא מערבבים.

What may go into a box: a whole number, a decimal, text and more. The compiler checks you don't mix them up.

מופיע לראשונה: First appears: מפגשSession 2

טיפוס מוגבלbounded typebounded typeטיפוס מוגבל

<T extends Comparable<T>>: T יכול להיות רק טיפוס שיודע להשוות את עצמו, ולכן מותר לקרוא ל-compareTo.

<T extends Comparable<T>>: T can only be a type that can compare itself, so calling compareTo is allowed.

מופיע לראשונה: First appears: מפגשSession 22

טיפוס סטטיstatic typestatic typeטיפוס סטטי

הטיפוס של המשתנה, כפי שכתוב בקוד (Item b). javac מרשה לקרוא רק למתודות שקיימות בטיפוס הזה.

The variable's type as written in the code (Item b). javac lets you call only methods that exist in that type.

מופיע לראשונה: First appears: מפגשSession 21

טיפוס עוטףwrapper typewrapper typeטיפוס עוטף

גרסת עצם של טיפוס פרימיטיבי: Integer ל-int, Double ל-double. אוספים מחזיקים רק עצמים, ולכן List<Integer>.

The object version of a primitive type: Integer for int, Double for double. Collections hold only objects, hence List<Integer>.

מופיע לראשונה: First appears: מפגשSession 9

טיפוס פרימיטיביprimitive typeprimitive typeטיפוס פרימיטיבי

8 הטיפוסים הבסיסיים של Java (int, long, double, boolean, char ועוד). הערך יושב ישר בקופסה, בלי עצם ב-heap.

Java's 8 basic types (int, long, double, boolean, char and more). The value sits right in the box, with no object on the heap.

מופיע לראשונה: First appears: מפגשSession 2

טעות של אחד (off-by-one)off-by-oneoff-by-oneטעות של אחד (off-by-one)

לולאה שרצה פעם אחת יותר מדי או פחות מדי, לרוב בגלל < במקום <= או התחלה מ-1 במקום מ-0.

A loop that runs one time too many or too few, usually from < instead of <= or starting at 1 instead of 0.

מופיע לראשונה: First appears: מפגשSession 5

טרמינלterminalterminalטרמינל

חלון שבו מקלידים פקודות טקסט למחשב במקום ללחוץ עם העכבר. ב-Mac נקרא Terminal, וב-Windows משתמשים ב-PowerShell.

A window where you type text commands to the computer instead of clicking. On a Mac it's called Terminal; on Windows we use PowerShell.

מופיע לראשונה: First appears: מפגשSession 1

יצרן-צרכןproducer-consumerproducer-consumerיצרן-צרכן

thread אחד (או יותר) מייצר עבודה ושם בתור, ואחרים לוקחים ומעבדים. התור מאזן בין המהירויות.

One thread (or more) produces work into a queue, and others take and process it. The queue balances the speeds.

מופיע לראשונה: First appears: מפגשSession 34

ירושהinheritanceinheritanceירושה

class EBook extends Book: ל-EBook יש את כל השדות והמתודות של Book, והיא יכולה להוסיף ולשנות. לכל מחלקה הורה אחד בלבד.

class EBook extends Book: EBook has every field and method of Book, and can add and change. Each class has exactly one parent.

מופיע לראשונה: First appears: מפגשSession 19

כימוסencapsulationencapsulationכימוס

העצם שומר על הנתונים שלו בעצמו: השדות private, ומבחוץ אפשר לשנות אותם רק דרך מתודות שבודקות שהשינוי חוקי.

The object guards its own data: the fields are private, and from outside they change only through methods that check the change is valid.

מופיע לראשונה: First appears: מפגשSession 15

כיסוי מלאexhaustiveexhaustiveכיסוי מלא

switch שמחזיר ערך חייב לכסות כל אפשרות. עם sealed ו-enum javac בודק את זה, ואם הוספתם סוג חדש הוא מראה כל switch שצריך לעדכן.

A switch that returns a value must cover every possibility. With sealed types and enums javac checks this, and when you add a new kind it points to every switch that needs updating.

מופיע לראשונה: First appears: מפגשSession 23

לא משתנה (immutable)immutableimmutableלא משתנה (immutable)

עצם שאי אפשר לשנות אחרי שנוצר. String כזה: toUpperCase() לא משנה את המחרוזת, אלא מחזירה חדשה.

An object that can't change once created. A String is like that: toUpperCase() doesn't change the string, it returns a new one.

מופיע לראשונה: First appears: מפגשSession 3

לוגיקת משחקgame logicgame logicלוגיקת משחק

המצב והכללים של המשחק (מיקום, מהירות, התנגשויות), בלי שום ציור. כשהם במחלקה נפרדת אפשר להריץ ולבדוק אותם בלי חלון.

The game's state and rules (position, speed, collisions), with no drawing at all. In a separate class you can run and test them with no window.

מופיע לראשונה: First appears: מפגשSession 43

לולאהlooploopלולאה

קוד שחוזר שוב ושוב: for, while, do-while ו-for-each.

Code that repeats: for, while, do-while and for-each.

מופיע לראשונה: First appears: מפגשSession 5

לולאה אינסופיתinfinite loopinfinite loopלולאה אינסופית

לולאה שהתנאי שלה אף פעם לא נהיה false, למשל כששוכחים לשנות את המונה.

A loop whose condition never becomes false, for example when you forget to change the counter.

מופיע לראשונה: First appears: מפגשSession 5

לולאה מקוננתnested loopnested loopלולאה מקוננת

לולאה בתוך לולאה: על כל סיבוב של החיצונית, הפנימית רצה מההתחלה עד הסוף.

A loop inside a loop: for each round of the outer one, the inner one runs from start to finish.

מופיע לראשונה: First appears: מפגשSession 5

לולאת משחקgame loopgame loopלולאת משחק

הלב של כל משחק: שוב ושוב, בערך 60 פעמים בשנייה, מעדכנים את העולם (update) ומציירים אותו (repaint). ב-Swing הכי פשוט עם javax.swing.Timer.

The heart of every game: over and over, about 60 times a second, update the world (update) and draw it (repaint). In Swing the simplest is a javax.swing.Timer.

מופיע לראשונה: First appears: מפגשSession 43

ליטרלliteralliteralליטרל

ערך שכתוב ישר בקוד: 42, 3.14, true, 'A', "hi".

A value written straight in the code: 42, 3.14, true, 'A', "hi".

מופיע לראשונה: First appears: מפגשSession 2

למבדהlambdalambdaלמבדה

פונקציה קצרה בלי שם: (a, b) -> a + b. Java הופכת אותה לעצם שמממש functional interface.

A short nameless function: (a, b) -> a + b. Java turns it into an object implementing a functional interface.

מופיע לראשונה: First appears: מפגשSession 26

מאגר המחרוזות (String pool)string poolstring poolמאגר המחרוזות (String pool)

אזור שבו Java שומרת מחרוזות שנכתבו בקוד (ליטרלים). שני ליטרלים זהים מצביעים לאותו עצם. new String(...) יוצר עצם חדש מחוץ למאגר.

An area where Java keeps strings written in the code (literals). Two equal literals point to the same object. new String(...) makes a new object outside the pool.

מופיע לראשונה: First appears: מפגשSession 3

מהדר (compiler)compilercompilerמהדר (compiler)

תוכנה שקוראת את כל הקוד, בודקת שהוא תקין, ומתרגמת אותו לשפה אחרת. ב-Java המהדר הוא javac, והוא מתרגם ל-bytecode.

A program that reads all the code, checks it, and translates it into another language. In Java the compiler is javac, and it translates into bytecode.

מופיע לראשונה: First appears: מפגשSession 1

מודל שפהlanguage modellanguage modelמודל שפה

תוכנה שמקבלת טקסט (prompt) ומחזירה טקסט. היא יכולה לטעות או להמציא, ולכן הקוד שסביבה בודק את מה שחזר.

Software that takes text (a prompt) and returns text. It can be wrong or make things up, so the code around it checks what came back.

מופיע לראשונה: First appears: מפגשSession 41

מונהcountercounterמונה

משתנה שסופר את הסיבובים, בדרך כלל i: מתחיל, נבדק בתנאי, ועולה בסוף כל סיבוב.

A variable that counts the rounds, usually i: it starts, is checked by the condition, and goes up at the end of each round.

מופיע לראשונה: First appears: מפגשSession 5

מוניטורmonitormonitorמוניטור

המנעול המובנה של כל עצם ב-Java. מתודה synchronized נועלת את this, ומתודה static synchronized נועלת את המחלקה.

The built-in lock every Java object has. A synchronized method locks this, and a static synchronized method locks the class.

מופיע לראשונה: First appears: מפגשSession 32

מחיקת טיפוסיםtype erasuretype erasureמחיקת טיפוסים

אחרי הקומפילציה List<String> ו-List<Integer> הם אותו List. לכן אי אפשר new T() או instanceof List<String>: בזמן ריצה המידע כבר לא קיים.

After compiling, List<String> and List<Integer> are the same List. So you can't do new T() or instanceof List<String>: at run time the information is gone.

מופיע לראשונה: First appears: מפגשSession 22

מחלקה (class)classclassמחלקה (class)

תבנית שממנה יוצרים עצמים. ב-Java כל קוד נמצא בתוך מחלקה, ושם הקובץ חייב להיות זהה לשם המחלקה הציבורית.

A blueprint for making objects. In Java all code lives inside a class, and the file name must match the public class's name.

מופיע לראשונה: First appears: מפגשSession 1

מחלקה גנריתgeneric classgeneric classמחלקה גנרית

מחלקה עם פרמטר טיפוס: class Box<T>. כל שימוש קובע מה זה T: Box<String>, Box<Integer>.

A class with a type parameter: class Box<T>. Each use decides what T is: Box<String>, Box<Integer>.

מופיע לראשונה: First appears: מפגשSession 22

מחלקה מופשטתabstract classabstract classמחלקה מופשטת

abstract class Shape: אי אפשר ליצור ממנה עצם (new Shape() לא מתקמפל), רק לרשת ממנה. יכולה להחזיק שדות, בנאים וקוד משותף.

abstract class Shape: you can't make an object of it (new Shape() doesn't compile), only extend it. It can hold fields, constructors and shared code.

מופיע לראשונה: First appears: מפגשSession 20

מחלקת עזרutility classutility classמחלקת עזר

מחלקה שכל המתודות שלה static, כמו Math ו-Arrays: אוסף כלים, בלי מצב משלה.

A class whose methods are all static, like Math and Arrays: a toolbox with no state of its own.

מופיע לראשונה: First appears: מפגשSession 10

מחלקת על (הורה)superclass (parent)superclass (parent)מחלקת על (הורה)

המחלקה שממנה יורשים. מחלקה שלא כתוב לה extends יורשת מ-Object.

The class you inherit from. A class without extends inherits from Object.

מופיע לראשונה: First appears: מפגשSession 19

מחרוזת (String)stringstringמחרוזת (String)

טקסט. ב-Java כותבים מחרוזת בין מירכאות כפולות: "שלום". מה שבמירכאות מוצג כמו שהוא.

Text. In Java a string goes between double quotes: "hello". Whatever is inside the quotes is shown as is.

מופיע לראשונה: First appears: מפגשSession 1

מילה (token)tokentokenמילה (token)

חתיכת קלט בין רווחים או שורות. nextInt ו-next קוראים מילה אחת, ו-nextLine קורא שורה שלמה.

A piece of input between spaces or lines. nextInt and next read one token; nextLine reads a whole line.

מופיע לראשונה: First appears: מפגשSession 6

מכונת מצביםstate machinestate machineמכונת מצבים

המשחק תמיד נמצא במצב אחד מתוך רשימה סגורה (enum State). כל אירוע מועבר לפי המצב, וחלק מהאירועים מעבירים למצב אחר.

The game is always in one state from a closed list (enum State). Each event is handled by the state, and some events move to another state.

מופיע לראשונה: First appears: מפגשSession 46

מלכודת nextIntthe nextInt trapthe nextInt trapמלכודת nextInt

nextInt קורא את המספר אבל משאיר את ה-Enter. ה-nextLine הבא קורא את השארית הריקה. הפתרון: nextLine() נוסף אחרי nextInt.

nextInt reads the number but leaves the Enter behind. The next nextLine reads that empty leftover. The fix: an extra nextLine() after nextInt.

מופיע לראשונה: First appears: מפגשSession 6

ממשק ציבוריpublic interfacepublic interfaceממשק ציבורי

המתודות שמחלקה מציעה לעולם (add, find, report). כל השאר פרטי, ואפשר לשנות אותו בלי לשבור את מי שמשתמש במחלקה.

The methods a class offers the world (add, find, report). Everything else is private, and can change without breaking whoever uses the class.

מופיע לראשונה: First appears: מפגשSession 18

מסגרת (frame)stack framestack frameמסגרת (frame)

בכל קריאה למתודה נוצרת מסגרת חדשה ב-stack עם המשתנים שלה. כשהמתודה חוזרת, המסגרת נמחקת.

Every method call creates a new frame on the stack holding its variables. When the method returns, the frame is removed.

מופיע לראשונה: First appears: מפגשSession 7

מספר קסםmagic numbermagic numberמספר קסם

מספר שמופיע בקוד בלי הסבר (0.17, 56). קבוע עם שם (VAT, PASS) מסביר את עצמו ומשתנה במקום אחד.

A number in the code with no explanation (0.17, 56). A named constant (VAT, PASS) explains itself and changes in one place.

מופיע לראשונה: First appears: מפגשSession 16

מעברtransitiontransitionמעבר

שינוי ממצב למצב בעקבות אירוע: MENU + ENTER → PLAYING. כדאי לצייר אותם כחצים לפני שכותבים קוד.

A change from state to state after an event: MENU + ENTER → PLAYING. Worth drawing as arrows before writing code.

מופיע לראשונה: First appears: מפגשSession 46

מערךarrayarrayמערך

שורה של תאים צמודים מאותו טיפוס, בגודל קבוע: int[] a = new int[5]; או int[] a = {1, 2, 3};. המערך הוא עצם ב-heap.

A row of cells of the same type, with a fixed size: int[] a = new int[5]; or int[] a = {1, 2, 3};. The array is an object on the heap.

מופיע לראשונה: First appears: מפגשSession 8

מערך דו-ממדי2D array2D arrayמערך דו-ממדי

מערך של מערכים: int[][] grid = new int[3][4]; הוא 3 שורות ו-4 עמודות. grid[r][c] הוא תא.

An array of arrays: int[][] grid = new int[3][4]; is 3 rows and 4 columns. grid[r][c] is one cell.

מופיע לראשונה: First appears: מפגשSession 8

מפתח APIAPI keyAPI keyמפתח API

סיסמה שמזהה אתכם מול השירות. שומרים אותה במשתנה סביבה (System.getenv), אף פעם לא בקוד או ב-Git.

A password identifying you to the service. Keep it in an environment variable (System.getenv), never in code or in Git.

מופיע לראשונה: First appears: מפגשSession 41

מפתח וערךkey and valuekey and valueמפתח וערך

במילון כל מפתח מופיע פעם אחת, ולכל מפתח ערך אחד. put עם מפתח קיים מחליף את הערך.

In a map each key appears once, with one value. put with an existing key replaces the value.

מופיע לראשונה: First appears: מפגשSession 9

מצב מקשיםkey statekey stateמצב מקשים

במקום להזיז בתוך keyPressed (שחוזר בקפיצות), שומרים אילו מקשים לחוצים, ובכל טיק זזים לפיהם. התנועה חלקה ואפשר כמה מקשים יחד.

Instead of moving inside keyPressed (which repeats in jumps), keep which keys are down, and move by them on every tick. Movement is smooth and several keys work together.

מופיע לראשונה: First appears: מפגשSession 44

מצבי threadthread statesthread statesמצבי thread

NEW (נוצר), RUNNABLE (רץ או מוכן), BLOCKED/WAITING/TIMED_WAITING (מחכה), TERMINATED (סיים). getState() מחזיר אותו.

NEW (created), RUNNABLE (running or ready), BLOCKED/WAITING/TIMED_WAITING (waiting), TERMINATED (done). getState() returns it.

מופיע לראשונה: First appears: מפגשSession 31

מרוץ (race condition)race conditionrace conditionמרוץ (race condition)

תוצאה שתלויה בסדר שבו threads רצים. count++ הוא קריאה, חישוב וכתיבה, ושני threads יכולים לקרוא את אותו ערך לפני שמישהו כתב.

A result that depends on the order threads run in. count++ is a read, a calculation and a write, and two threads can read the same value before anyone writes.

מופיע לראשונה: First appears: מפגשSession 32

משפט (statement)statementstatementמשפט (statement)

הוראה אחת בתוכנית, למשל הדפסה. ב-Java משפט נגמר בנקודה-פסיק ;.

One instruction in a program, like a print. In Java a statement ends with a semicolon ;.

מופיע לראשונה: First appears: מפגשSession 1

משתנהvariablevariableמשתנה

קופסה עם שם ששומרת ערך. ב-Java לכל קופסה יש טיפוס קבוע: int age = 15;.

A named box that holds a value. In Java every box has a fixed type: int age = 15;.

מופיע לראשונה: First appears: מפגשSession 2

מתודהmethodmethodמתודה

פעולה עם שם שמוגדרת בתוך מחלקה, כמו main או println. קוראים לה עם סוגריים.

A named action defined inside a class, like main or println. You call it with parentheses.

מופיע לראשונה: First appears: מפגשSession 1

מתודה גנריתgeneric methodgeneric methodמתודה גנרית

מתודה עם פרמטר טיפוס משלה, לפני טיפוס ההחזרה: static <T> T last(List<T> list). javac מסיק את T מהארגומנטים.

A method with its own type parameter, before the return type: static <T> T last(List<T> list). javac infers T from the arguments.

מופיע לראשונה: First appears: מפגשSession 22

מתודה מופשטתabstract methodabstract methodמתודה מופשטת

abstract double area();: כותרת בלי גוף. כל תת-מחלקה לא מופשטת חייבת לממש אותה, אחרת javac עוצר.

abstract double area();: a header with no body. Every non-abstract subclass must implement it, or javac stops.

מופיע לראשונה: First appears: מפגשSession 20

מתודת defaultdefault methoddefault methodמתודת default

מתודה עם גוף בתוך interface. כל מי שמממש מקבל אותה, ויכול לדרוס. היא בנויה מהמתודות האחרות של ה-interface.

A method with a body inside an interface. Every implementer gets it, and can override it. It's built from the interface's other methods.

מופיע לראשונה: First appears: מפגשSession 20

מתודת יצרןfactory methodfactory methodמתודת יצרן

מתודה static שמחזירה עצם חדש, עם שם שמסביר מה מקבלים: Temperature.ofCelsius(100). לעתים קרובות הבנאי עצמו private.

A static method that returns a new object, with a name explaining what you get: Temperature.ofCelsius(100). Often the constructor itself is private.

מופיע לראשונה: First appears: מפגשSession 16

מתזמןschedulerschedulerמתזמן

החלק במערכת ההפעלה שמחליט איזה thread רץ עכשיו ולכמה זמן. ההחלטות שלו לא צפויות, ולכן הסדר בין threads משתנה בין הרצות.

The part of the OS deciding which thread runs now and for how long. Its decisions are unpredictable, so the order between threads changes between runs.

מופיע לראשונה: First appears: מפגשSession 31

נקודת עצירהbreakpointbreakpointנקודת עצירה

נקודה אדומה שמסמנים בלחיצה ליד מספר השורה. בהרצת Debug התוכנית נעצרת לפני השורה הזאת.

A red dot you set by clicking next to a line number. In a Debug run the program stops before that line.

מופיע לראשונה: First appears: מפגשSession 11

נקודת קצהendpointendpointנקודת קצה

שילוב של שיטה וכתובת שהשרת עונה לו, למשל GET /books/{title}.

A method-and-address pair the server answers, e.g. GET /books/{title}.

מופיע לראשונה: First appears: מפגשSession 40

נראותvisibilityvisibilityנראות

כל מעבד עובד עם עותקים שמורים (cache), וה-JIT יכול להעביר קריאה אל מחוץ ללולאה. בלי סנכרון, thread עלול להמשיך לראות ערך ישן לנצח.

Each CPU works with cached copies, and the JIT can move a read out of a loop. Without synchronization, a thread may keep seeing an old value forever.

מופיע לראשונה: First appears: מפגשSession 33

סביבת פיתוח (IDE)IDEIDEסביבת פיתוח (IDE)

Integrated Development Environment: תוכנה לכתיבת קוד שכוללת עורך, הרצה, דיבוג והשלמה אוטומטית במקום אחד.

Integrated Development Environment: a program for writing code with an editor, running, debugging and autocomplete in one place.

מופיע לראשונה: First appears: מפגשSession 1

סדר האתחולinitialization orderinitialization orderסדר האתחול

ב-new: כל השדות מקבלים 0, null או false, אחר כך רצים האתחולים שליד השדות (int a = 5;), ורק אז גוף הבנאי.

On new: every field gets 0, null or false, then the initializers next to the fields run (int a = 5;), and only then the constructor body.

מופיע לראשונה: First appears: מפגשSession 14

סדר נעילהlock orderinglock orderingסדר נעילה

אם כולם נועלים מנעולים באותו סדר (למשל לפי id), מעגל המתנה לא יכול להיווצר.

If everyone takes locks in the same order (say by id), a waiting cycle can't form.

מופיע לראשונה: First appears: מפגשSession 38

סוגריים משולשים <>angle brackets <>angle brackets <>סוגריים משולשים <>

אומרים מה יש בתוך האוסף: List<String> היא רשימה של מחרוזות. המהדר לא ייתן להכניס משהו אחר.

They say what's inside the collection: List<String> is a list of strings. The compiler won't let anything else in.

מופיע לראשונה: First appears: מפגשSession 9

סיבה (cause)causecauseסיבה (cause)

new DataException("line 2 bad", e) עוטף את החריגה המקורית. getCause() מחזיר אותה, וה-stack trace מראה את שתיהן.

new DataException("line 2 bad", e) wraps the original exception. getCause() returns it, and the stack trace shows both.

מופיע לראשונה: First appears: מפגשSession 28

סיבוב (איטרציה)iterationiterationסיבוב (איטרציה)

פעם אחת שבה גוף הלולאה רץ.

One time the loop body runs.

מופיע לראשונה: First appears: מפגשSession 5

סיבוכיות (O גדול)complexity (big O)complexity (big O)סיבוכיות (O גדול)

כמה העבודה גדלה כשהאוסף גדל. contains ב-ArrayList הוא O(n) (עובר על הכול), ב-HashSet O(1) בממוצע, וב-TreeSet O(log n).

How the work grows as the collection grows. contains on an ArrayList is O(n) (it scans everything), on a HashSet O(1) on average, and on a TreeSet O(log n).

מופיע לראשונה: First appears: מפגשSession 25

עצלותlazinesslazinessעצלות

פעולות ביניים לא רצות עד שיש פעולת סיום, ו-Stream אפשר להריץ פעם אחת בלבד. פעם שנייה: IllegalStateException: stream has already been operated upon or closed.

Intermediate operations don't run until there's a terminal operation, and a Stream can run once only. A second time: IllegalStateException: stream has already been operated upon or closed.

מופיע לראשונה: First appears: מפגשSession 27

עצםobjectobjectעצם

מופע של מחלקה: new Book() יוצר עצם חדש ב-heap, עם עותק משלו של כל השדות.

An instance of a class: new Book() creates a new object on the heap, with its own copy of every field.

מופיע לראשונה: First appears: מפגשSession 13

עצם בלתי משתנהimmutable objectimmutable objectעצם בלתי משתנה

עצם שלא משתנה אחרי שנוצר: כל השדות private final, ו"שינוי" מחזיר עצם חדש (כמו String). בטוח לשתף אותו.

An object that never changes after it's made: every field private final, and a "change" returns a new object (like String). Safe to share.

מופיע לראשונה: First appears: מפגשSession 15

ערך החזרהreturn valuereturn valueערך החזרה

התשובה שמתודה מחזירה עם return. הטיפוס שלה כתוב לפני שם המתודה.

The answer a method hands back with return. Its type is written before the method name.

מופיע לראשונה: First appears: מפגשSession 7

פולימורפיזםpolymorphismpolymorphismפולימורפיזם

"הרבה צורות": קוד שכתוב מול טיפוס ההורה (Item) עובד עם כל תת-מחלקה, וכל עצם מתנהג לפי הסוג האמיתי שלו.

"Many forms": code written against the parent type (Item) works with every subclass, and each object behaves according to its real type.

מופיע לראשונה: First appears: מפגשSession 21

פירוק recordrecord patternrecord patternפירוק record

case Rect(double w, double h) -> מפרק את ה-record לשדות שלו ישר בתוך ה-case.

case Rect(double w, double h) -> takes the record apart into its fields right in the case.

מופיע לראשונה: First appears: מפגשSession 23

פלטoutputoutputפלט

מה שהתוכנית מציגה החוצה, בדרך כלל על המסך.

What the program shows out, usually on the screen.

מופיע לראשונה: First appears: מפגשSession 1

פעולת בינייםintermediate operationintermediate operationפעולת ביניים

פעולה שמחזירה Stream חדש: filter, map, sorted, distinct, flatMap. לבד היא לא מריצה כלום.

An operation returning a new Stream: filter, map, sorted, distinct, flatMap. On its own it runs nothing.

מופיע לראשונה: First appears: מפגשSession 27

פעולת סיוםterminal operationterminal operationפעולת סיום

הפעולה שמריצה את כל הפס ומחזירה תוצאה: toList, count, sum, collect, findFirst, forEach. אחריה ה-Stream סגור.

The operation that runs the whole line and returns a result: toList, count, sum, collect, findFirst, forEach. After it the Stream is closed.

מופיע לראשונה: First appears: מפגשSession 27

פקודהcommandcommandפקודה

הוראה אחת שמקלידים בטרמינל ולוחצים Enter, למשל javac Main.java או java --version.

One instruction typed in the terminal followed by Enter, for example javac Main.java or java --version.

מופיע לראשונה: First appears: מפגשSession 1

פרמטרparameterparameterפרמטר

משתנה בהגדרת המתודה שמקבל ערך מבחוץ: ב-int add(int a, int b), a ו-b הם פרמטרים.

A variable in the method's definition that receives a value from outside: in int add(int a, int b), a and b are parameters.

מופיע לראשונה: First appears: מפגשSession 7

פרמטר טיפוסtype parametertype parameterפרמטר טיפוס

השם בסוגריים המשולשים (T, A, B, K, V). בתוך המחלקה הוא מתנהג כמו טיפוס רגיל.

The name in angle brackets (T, A, B, K, V). Inside the class it acts like a normal type.

מופיע לראשונה: First appears: מפגשSession 22

צוברaccumulatoraccumulatorצובר

משתנה שאוסף תוצאה לאורך הלולאה, כמו sum += i. מאתחלים אותו לפני הלולאה.

A variable that gathers a result through the loop, like sum += i. Initialize it before the loop.

מופיע לראשונה: First appears: מפגשSession 5

צעד זמן קבועfixed timestepfixed timestepצעד זמן קבוע

צוברים את זמן הפריימים, ומריצים עדכון של, נניח, 20ms בכל פעם שהצטבר מספיק. הפיזיקה יציבה וזהה בכל מחשב.

Accumulate frame time, and run an update of, say, 20ms each time enough has built up. Physics stays stable and identical on every computer.

מופיע לראשונה: First appears: מפגשSession 47

קבועconstantconstantקבוע

static final: ערך אחד למחלקה שאי אפשר לשנות. נהוג לכתוב באותיות גדולות: static final double VAT = 0.17;.

static final: one value per class that can't change. Usually written in capitals: static final double VAT = 0.17;.

מופיע לראשונה: First appears: מפגשSession 10

קובץ ‎.class.class file.class fileקובץ ‎.class

הקובץ שהמהדר יוצר מקובץ ‎.java. הוא מכיל bytecode, ולא נועד לקריאה של בני אדם.

The file the compiler makes from a .java file. It holds bytecode and isn't meant for people to read.

מופיע לראשונה: First appears: מפגשSession 1

קודcodecodeקוד

הטקסט שאנחנו כותבים בשפת תכנות. "לכתוב קוד" זה לכתוב תוכנית.

The text we write in a programming language. "Writing code" means writing a program.

מופיע לראשונה: First appears: מפגשSession 1

קוד סטטוסstatus codestatus codeקוד סטטוס

מספר בתשובת HTTP: 200 הצליח, 201 נוצר, 400 בקשה שגויה, 404 לא נמצא, 500 שגיאת שרת.

A number in an HTTP response: 200 OK, 201 created, 400 bad request, 404 not found, 500 server error.

מופיע לראשונה: First appears: מפגשSession 39

קטע קריטיcritical sectioncritical sectionקטע קריטי

קוד שניגש למשהו משותף, ושרק thread אחד צריך להריץ בכל רגע.

Code touching something shared, that only one thread should run at a time.

מופיע לראשונה: First appears: מפגשSession 32

קיצור דרך (short-circuit)short-circuitshort-circuitקיצור דרך (short-circuit)

ב-&& אם הצד השמאלי false, Java לא בודקת את הימני (התשובה כבר ידועה). ב-|| אם השמאלי true.

With &&, if the left side is false Java doesn't check the right (the answer is already known). With ||, if the left is true.

מופיע לראשונה: First appears: מפגשSession 4

קלטinputinputקלט

מה שהמשתמש מקליד לתוכנית בזמן שהיא רצה. בבדיקות כאן, הקלט מוקלד מראש.

What the user types into the program while it runs. In the checks here, the input is typed in advance.

מופיע לראשונה: First appears: מפגשSession 6

רגיש לאותיות גדולותcase-sensitivecase-sensitiveרגיש לאותיות גדולות

ב-Java אות גדולה וקטנה הן שונות: System ו-system הן שתי מילים שונות לגמרי.

In Java capital and small letters are different: System and system are two completely different words.

מופיע לראשונה: First appears: מפגשSession 1

שגיאת קומפילציהcompile errorcompile errorשגיאת קומפילציה

בעיה שהמהדר javac מוצא לפני שהתוכנית רצה. התוכנית לא תרוץ בכלל עד שמתקנים. ההודעה מתחילה בשם הקובץ ומספר השורה.

A problem the javac compiler finds before the program runs. The program won't run at all until it's fixed. The message starts with the file name and line number.

מופיע לראשונה: First appears: מפגשSession 1

שדהfieldfieldשדה

משתנה שמוגדר בתוך מחלקה, מחוץ למתודות. כל עצם מחזיק ערך משלו: a.title, b.title. שדה מספרי מתחיל ב-0, ושדה של עצם ב-null.

A variable defined inside a class, outside the methods. Each object holds its own value: a.title, b.title. A number field starts at 0, an object field at null.

מופיע לראשונה: First appears: מפגשSession 13

שיאhigh scorehigh scoreשיא

הניקוד הגבוה ביותר, שנשמר בקובץ כדי שיישאר אחרי שסוגרים את המשחק. שומרים רק אם התוצאה החדשה גבוהה יותר.

The highest score, saved in a file so it stays after the game closes. Save only if the new result is higher.

מופיע לראשונה: First appears: מפגשSession 46

שיטה לשאלת ראיוןan interview methodan interview methodשיטה לשאלת ראיון

מבינים את השאלה ושואלים על מקרי קצה, פותרים קודם בדרך הפשוטה, אומרים את הסיבוכיות, משפרים (לרוב עם HashMap או מיון), ובודקים על דוגמה.

Understand the question and ask about edge cases, solve it the simple way first, state the complexity, improve (often with a HashMap or sorting), and test on an example.

מופיע לראשונה: First appears: מפגשSession 42

שכבותlayerslayersשכבות

controller מדבר HTTP (בקשה ותשובה), service מחזיק את הכללים, ו-repository שומר נתונים. כל שכבה מדברת רק עם זו שמתחתיה.

The controller speaks HTTP (request and response), the service holds the rules, and the repository stores data. Each layer talks only to the one below.

מופיע לראשונה: First appears: מפגשSession 40

שני מצביעיםtwo pointerstwo pointersשני מצביעים

שני אינדקסים שזזים על המערך (מהקצוות פנימה, או אחד אחרי השני). פותר הרבה שאלות ב-O(n) במקום O(n²).

Two indexes moving over the array (from the ends inward, or one behind the other). Solves many questions in O(n) instead of O(n²).

מופיע לראשונה: First appears: מפגשSession 42

שפת תכנותprogramming languageprogramming languageשפת תכנות

שפה עם חוקים מדויקים (תחביר) שבה כותבים הוראות למחשב. Java היא שפת תכנות אחת מתוך הרבה.

A language with exact rules (syntax) for writing instructions to a computer. Java is one programming language among many.

מופיע לראשונה: First appears: מפגשSession 1

שרשור בנאיםconstructor chainingconstructor chainingשרשור בנאים

this(...) בשורה הראשונה של בנאי קורא לבנאי אחר של אותה מחלקה. כך כותבים את האתחול פעם אחת, ובנאים קצרים מוסיפים ברירות מחדל.

this(...) on a constructor's first line calls another constructor of the same class. That way the setup is written once, and short constructors add defaults.

מופיע לראשונה: First appears: מפגשSession 14

שתי הפניות לאותו עצםaliasingaliasingשתי הפניות לאותו עצם

int[] b = a; לא מעתיק את המערך: b מצביע על אותו מערך. שינוי דרך b נראה גם דרך a. להעתקה: a.clone().

int[] b = a; doesn't copy the array: b points to the same array. A change through b shows through a too. To copy: a.clone().

מופיע לראשונה: First appears: מפגשSession 8

תבנית עיצובformat specifierformat specifierתבנית עיצוב

החלקים שמתחילים ב-% ב-printf וב-String.format: %s טקסט, %d שלם, %.2f עשרוני, %5d רוחב 5, %-10s צמוד לשמאל.

The % parts in printf and String.format: %s text, %d whole number, %.2f decimal, %5d width 5, %-10s left-aligned.

מופיע לראשונה: First appears: מפגשSession 3

תו בריחהescape sequenceescape sequenceתו בריחה

לוכסן הפוך ואחריו תו, שיחד הם תו מיוחד: \n שורה חדשה, \t טאב, \" מירכאות, \\ לוכסן.

A backslash plus a character that together mean a special character: \n new line, \t tab, \" a quote, \\ a backslash.

מופיע לראשונה: First appears: מפגשSession 3

תוכניתprogramprogramתוכנית

רשימה של הוראות שהמחשב מבצע לפי הסדר. ב-Java תוכנית מתחילה תמיד במתודה main.

A list of instructions the computer carries out in order. In Java a program always starts at the main method.

מופיע לראשונה: First appears: מפגשSession 1

תחבירsyntaxsyntaxתחביר

החוקים של איך כותבים בשפה: איפה שמים סוגריים, נקודה-פסיק ומירכאות. טעות תחביר נתפסת כבר בקומפילציה.

The rules of how to write in the language: where brackets, semicolons and quotes go. A syntax mistake is caught at compile time.

מופיע לראשונה: First appears: מפגשSession 1

תחום (scope)scopescopeתחום (scope)

האזור בקוד שבו משתנה קיים: משתנה שהוגדר בתוך מתודה או בלוק נעלם בסוף שלהם.

The part of the code where a variable exists: a variable declared in a method or block disappears at its end.

מופיע לראשונה: First appears: מפגשSession 7

תכנותprogrammingprogrammingתכנות

כתיבת הוראות מדויקות למחשב בשפה שהוא יודע לבצע, כדי שיפתור בעיה או יעשה משימה.

Writing precise instructions for a computer, in a language it can run, so that it solves a problem or does a task.

מופיע לראשונה: First appears: מפגשSession 1

תמונת מצבsnapshotsnapshotתמונת מצב

עותק בלתי משתנה של העולם (record עם List.copyOf). ה-thread של הלוגיקה בונה חדש בכל טיק ומפרסם דרך volatile; ה-render תמיד רואה עולם שלם, אף פעם לא חצי.

An immutable copy of the world (a record with List.copyOf). The logic thread builds a new one each tick and publishes it through volatile; the renderer always sees a whole world, never half of one.

מופיע לראשונה: First appears: מפגשSession 47

תנאיconditionconditionתנאי

שאלה של כן או לא שהתוכנית בודקת, למשל age >= 18. התשובה היא true או false.

A yes-or-no question the program checks, like age >= 18. The answer is true or false.

מופיע לראשונה: First appears: מפגשSession 4

תשובה מוקלטתrecorded replyrecorded replyתשובה מוקלטת

מימוש של ה-interface שמחזיר תשובות קבועות מראש. כך בודקים את הקוד בלי רשת, בלי עלות ובלי תוצאות משתנות.

An implementation of the interface returning answers fixed in advance. That way you test the code with no network, no cost and no changing results.

מופיע לראשונה: First appears: מפגשSession 41

נבנה על ידיBuilt by Ariel Yohimovich