Interview Questions

QEYD: Bu suallar menim inteview da aldigim ve yaxud tanishlarimin aldigi suallardir.
Resursun daha da genishlemesi uchun elaqe saxlayib suallarinizi qeyd edin :[email]

tag: Spring
1. Spring niye istifade olunur ?
- DI ve IoC a gore Spring istifade olunur. (DI (Autowired) , IoC (obyeklerin yaradilmasina nezaret)). Bu xususiyyetler EJB de de movcuddur. Lakin EJB de yazilmish Appi mutleq web app kimi ishe salmaq lazimdir, Spring ise console applicaiton kimi de ishe salmaq olar. EJB yalniz TomEE destekleyir.

tag: Restful
2. Stateful ve stateless. Ferqleri nedir ? 
- Stateful da browserden muraciet etdiyimiz zaman server ile browser arasinda bir sessiya achilir. ve muraciet edenin datasi bu sessiyada saxlanilir. Stateless ise yalniz database ile ishleyir. hech bir sessiya achilmir. Restful esas ustunluyu stateless olmasindadir.

tag: SE
3. final, finally ve finalize ferqi nedir ?
- final deyishenleri yaratmaq, finally try catch da istifade olunur, finalize Garbage Collector u cagirmaq uchun istifade olunur.

tag: Spring
4. bean nedir ? diger classlardan ferqi nedir ?
- bean annotation ile yaradilanlar spring terefinden idare olunur. obyektler spring container de yaradilir.

tag: Spring
5. @RestController ve @Controller arasinda ferq nedir ?
- @RestController evezine @Controller da istifade etmek mumkundur. Sadece burada elave annotation istfade etmek lazimdir. @ResponseBody

tag: Spring
6. @Component, @Repository, @Service ferqi nedir?
- link 

tag: Spring
7. Spring bean scopes nedir ve ne uchun istifade olunur ?
- Spring de Bean, spring terefinden idare olunan obyektdir. Scopelar da buna gore istifade olunur. Meselen singleton scoep u qeyd etsen, hemin classin obyekti app ayagda oldugu muddetde yalnizca bir defe yaranacaq Prototype da ise her yeni sorgu uchun yeni instance yaradilacaq ve s.

tag: Spring
8. Unit ve Integration test ferqi nedir ?
- Unit de esasen bir classin ishleme prinsipini nezerden kecirdirik, integration test de ise butun classlarin bir biri ile elaqesini test ede bilerik. yeni controllerden bashlayaraq db e qeder getmek mumkundur.

tag: Spring
9. Spring JPA da save ve saveAll arasinda ferq nedir ?
- Performans cehetden ferqleri var. Meselen, bir listi save elemek isteyirik. Eger bu listi bir dovre salib, her bir obyekti ayrica save elemeye calishsaq, tebii ki bir problem chixmaz. Sadece performans cehetden geri dusherik. Buna gore saveAll metoduna listi gonderib? yalniz bir defe tranzaksiya achilmasi ile ishi hell ede bilerik ve performans cehetden guc dushmez.

tag: SE
10. Interface de body li method yaratmaq mumkundur ?
- Beli. Mumkundur, default ve ya static keyword leri vasitesile yaratmaq mumkundur.

tag: SE
11. StringBuilder ve StringBuffer ferqleri nedir ?
- String-leri + vasitesile ile yaratdiqda qarshilashdigimiz problemi hell elemek uchun StringBuilder ve StringBuffer istifade olunur. Ferqleri bundan ibaretdir ki, append methodu StringBuffer de synchorized olunub. Buna gore StringBuffer thread-safe hesab olunur. Eger StringBuffer shared-resource kimi istifade olunursa, bu zaman synchorized methodu race-condition-nun qarshisini alacaq.

tag: SE
12. Functional Interface nedir 
link

tag: SE
13. ArrayList ve LinkedList ferqi nedir ?
link

tag: SE
14. Niye sagda ArrayList ve solda List istifade edirik ?
- Her sheyden evvel istifade etmeyimize imkan yaradan polimorfizmdir. Bundan elave ArrayList ve LinkedList List i implement etdiklerine gore rahatliqla sonradan implementasiyani deyishe bilerik. Meselen, 
List<Integer> list = new ArrayList<>(); olan hisseleri 
List<Integer> list = new LinkedList<>(); cevirmek daha rahatdir. Neyin ki, sag ve sol terefi ArrayList ve ya LinkedList olan bir kodu.
Tebii ki, eger ArrayList daxilinde spesifik methoda ehtiyacimiz olarsa, bu zaman sol terefde ArrayList yazmaq ishimizi gorer. case-den asili bir meseledir

tag: SE
15. Wrapper type ile Primitive type arasindaki ferq nedir ? Boxing ve Unboxing nedir ?
link

16. Array genislene bilir ?
- Xeyr. Array ilk basda uzunluq teleb eden bir strukturdur ve bu uzunluqdan o terefe element qebul ede bilmir.

17. Contract First Approach
18. Decorator Design Pattern

tag: SE
19. what is the difference between Collections.synchronizedMap() vs ConcurrentHashMap ?
- In ConcurrentHashMap, read operations are non-blocking, whereas write operations take a lock on a particular segment or bucket.
- ConcurrentModificationException will not thrown in ConcurrentHashMap. 
- ConcurrentHashMap doesn't allow null in keys or values
- when using Collections.synchronizedMap(), null support depends on the input Map
- Performance Comparison = ConcurrentHashMap performs better than Collections.synchronizedMap().

tag: SE
20. Abstract class la interfeys arasindaki ferq

tag: SE
21. Compare the sleep() and wait() functions in Java.
- sleep block operation-dur. monitor istifade edir ve metoda giren diger threadleri bloklayir. wait sadece oz thread ni verilen saniye qeder bloklayir.

tag: Data Structure
22. 

tag: TODO
-- suallariniz varsa yuxardaki email ile elaqe saxlayin

Popular posts from this blog

Validation for AZ phone numbers with RegEx in Java

Java necə işləyir, kod nədir ?

@Transactional annotation haqqinda. Cascade istifade olunmasi