Tüm uzmanlıklarTeknoloji · İş görüşmesi

Java geliştirici

Java bilmek işin yarısı. Diğer yarısı, bunu baskı altında İngilizce olarak net biçimde anlatabilmek. Bu beş soru tekrar tekrar karşınıza çıkar.

Kelimeler → ifadeler → cümleler → konuşma

SpeakRole’i dene ↗
İş görüşmesiJava geliştirici
V

How does a HashMap work, and when would you not use one?

0:18
Mülakat sorusu

Java geliştirici

Java pozisyonlarında mülakatçılar genellikle dilin temelleri ve koleksiyonlarla başlar, ardından concurrency'ye, Spring'e ve tasarıma geçer. Temel konuların net bir sözlü açıklaması çoğu zaman egzotik bir ayrıntıdan daha önemlidir, çünkü kodun neden çalıştığını anladığınızı gösterir.

Her cevabı üç adımda anlatmaya çalışın: kısa bir tanım, nasıl çalıştığı ve gerçek bir projede ne zaman önem kazandığı. Bu sıra lafı uzatmanızı engeller ve mülakatçıya takip sorusu sormak için kolay bir yer bırakır.

  • ✓Kelimeler → ifadeler → cümleler → konuşma
  • ✓Yanıtın anlamı
  • ✓Dil

Sık sorulan mülakat soruları ve örnek cevaplar

How does a HashMap work, and when would you not use one?

HashMap nasıl çalışır ve hangi durumlarda kullanmazsınız?

Mülakatçı ne duymak ister. Mekanizma (hash, bucket, çakışmalar, yeniden boyutlandırma), karmaşıklık ve sınırlar: sıralama yok, thread güvenliği yok.

Yüksek sesle çalışmak için İngilizce örnek cevap

A HashMap stores entries in an array of buckets. It calls hashCode on the key, turns that into an index and puts the entry in that bucket. If two keys land in the same bucket, they are kept in a list, and in modern Java a long list becomes a tree. When the map is more than 75 percent full, it doubles the array and redistributes the entries. Get and put are O(1) on average. I would not use it when I need ordering, so I choose LinkedHashMap or TreeMap, or when several threads write at the same time, where ConcurrentHashMap is the right choice.

What is the contract between equals and hashCode?

equals ile hashCode arasındaki sözleşme (contract) nedir?

Mülakatçı ne duymak ister. Kuralın kendisi ve bozulduğunda ortaya çıkan hata.

Yüksek sesle çalışmak için İngilizce örnek cevap

If two objects are equal according to equals, they must return the same hashCode. The opposite is not required: different objects may share a hash code. If I override equals but forget hashCode, hash-based collections stop working correctly. For example, I put an object in a HashSet, then create an equal object and call contains, and the result is false, because the second object looks in a different bucket. I also try to base both methods on immutable fields, so the hash code does not change while the object is inside a collection.

What is the difference between ArrayList and LinkedList?

ArrayList ile LinkedList arasındaki fark nedir?

Mülakatçı ne duymak ister. Karmaşıklık, bellek kullanımı ve yalnızca ders kitabı tablosu değil, pratik bir öneri.

Yüksek sesle çalışmak için İngilizce örnek cevap

ArrayList is backed by an array, so reading by index is O(1), and adding to the end is O(1) amortised. Inserting in the middle is O(n), because elements must shift. LinkedList stores nodes with links, so inserting or removing at a known node is fast, but reading by index is O(n), and every element uses more memory. In practice I almost always use ArrayList, because arrays work well with the processor cache. If I need a queue or a stack, I choose ArrayDeque instead of LinkedList.

Why is String immutable in Java?

Java'da String neden değiştirilemezdir (immutable)?

Mülakatçı ne duymak ister. Birkaç avantaj ve en az bir pratik sonuç, örneğin StringBuilder.

Yüksek sesle çalışmak için İngilizce örnek cevap

Once a String is created, its content cannot change. This gives us a few benefits. Strings are thread-safe without any locks. They can be used safely as HashMap keys, and the hash code can be cached. The JVM can also reuse equal strings from the string pool to save memory, and values like file paths cannot be changed after they have been checked. The price is that concatenation in a loop creates many objects, so for that case I use StringBuilder.

What is the difference between checked and unchecked exceptions?

Checked ve unchecked exception'lar arasındaki fark nedir?

Mülakatçı ne duymak ister. Derleyici kuralları, her türün ne zaman kullanılacağı ve ekibinizin neyi tercih ettiği.

Yüksek sesle çalışmak için İngilizce örnek cevap

Checked exceptions extend Exception but not RuntimeException. The compiler forces you to catch them or declare them. Unchecked exceptions extend RuntimeException, and the compiler does not check them. Checked exceptions are meant for situations the caller can reasonably recover from, like a missing file. Unchecked ones usually mean a programming error, like a null pointer. In modern projects, especially with Spring, many teams prefer unchecked exceptions, because checked ones make method signatures noisy. What matters is to be consistent and never to swallow an exception silently.

Anahtar terimler nasıl telaffuz edilir

Java
CA-vı
hashCode
HEŞ-kod
immutable
i-MYU-tı-bıl
queue
kyu
amortised
EM-ır-tayzd
iterator
İT-ı-rey-tır

Cevap vermek için kullanışlı kalıplar

  • Let me explain how it works step by step.Nasıl çalıştığını adım adım anlatayım.
  • The main idea is…Temel fikir şu:…
  • In practice, I usually…Pratikte genellikle…
  • The trade-off here is…Buradaki ödünleşim (trade-off) şu:…
  • That depends on the use case.Bu, kullanım senaryosuna bağlı.
  • I haven't used that in production, but as far as I know…Bunu canlı ortamda kullanmadım ama bildiğim kadarıyla…
  • Under the hood, it…Arka planda bu şöyle çalışır:…

Sık yapılan hatalar

  • “Duruma göre değişir” deyip susmak. Neye göre değiştiğini söyleyin ve her iki taraf için birer örnek verin.
  • Örneksiz tanım okumak. Gerçek işten bir cümle ekleyin: "In our service we used…"
  • queue, cache ya da thread gibi temel terimleri yanlış telaffuz etmek. Mülakatçılar aksanı hoş görür ama anlaşılmayan bir anahtar kelime tüm cevabı takip etmeyi zorlaştırır.
  • Bilmediğiniz hâlde biliyormuş gibi yapmak. "I have not worked with that, but I would start by…" bir tahminden çok daha güçlü bir cevaptır.

Sıkça sorulan sorular

Mülakat için Java 21 özelliklerini bilmem gerekir mi?

Çoğu pozisyon için temel düzeyde evet. Record'lar, sealed class'lar, pattern matching ve virtual thread'ler sık gelen takip konularıdır. Son projenizde hangi sürümü kullandığınızı ve yeni sürümlerde neyi beğendiğinizi söylemeye hazır olun.

Kod mu yazacağım yoksa yalnızca konuşacak mıyım?

Çoğu zaman ikisi de. Yazarken ne yaptığınızı söyleyin: "First I will handle the empty input, then…" Kod yazarken konuşmak pratik gerektiren bir beceridir, çünkü çoğu geliştirici sessizce kod yazar.

İngilizcem Java bilgimden zayıfsa nasıl hazırlanmalıyım?

15–20 temel konu seçin ve her birini İngilizce olarak birkaç kez yüksek sesle anlatın. Kendinizi kaydedin, anahtar terimleri kontrol edin ve kusursuz dilbilgisi yerine yapıya odaklanın.

Bir cevabı okumak ile onu söylemek aynı şey değildir. Her soruyu yüksek sesle çalışın, ardından kendi cevabınızın anlamını ve dilini karşılaştırın.

SpeakRole’i dene ↗

Bu alandaki diğer konular