YouTube2Text

Java Spring Boot 11 Years Interview Experience — Transcript

by GenZ Career · 4,763 words · 744 segments · language en · Watch on YouTube

Full transcript

  1. 0:00hey guys today we have n and he's having
  2. 0:0211 year of experience in Java spring
  3. 0:04Boot and microservices domain and those
  4. 0:06who want to give same free mock
  5. 0:08interview please fill out the form below
  6. 0:10in the description so now let's get
  7. 0:11started hey hello NES how are you yeah
  8. 0:15I'm am fine how are you yes I'm also
  9. 0:17good shall we start yes sure okay okay
  10. 0:20so nsh can you please introduce yourself
  11. 0:22and your recent project in brief yeah so
  12. 0:26uh I have done my bachelor of
  13. 0:27engineering from Gujarat University
  14. 0:312011 then after I have joined CMC
  15. 0:33limited as a training Java developers
  16. 0:35and after completion of that training I
  17. 0:38have joined aside solution as a same as
  18. 0:42a same position training Java developers
  19. 0:44and currently working in same
  20. 0:46organization till 12 years and my
  21. 0:49current roles and responsibility and my
  22. 0:51position is STL engineering too so yeah
  23. 0:55for the technical perspective I have
  24. 0:57worked on music core Java Advan Java and
  25. 1:01spring boot hyber net and currently
  26. 1:03working on microservices MH uh my major
  27. 1:06role of my in this project is to convert
  28. 1:09the monolithic architecture of my
  29. 1:12product into the microservice base so I
  30. 1:15am the key so this is in progress this
  31. 1:17is in transition phase this is in
  32. 1:20transition phase okay okay and parall
  33. 1:22I'm managing the teams of the five
  34. 1:25peoples who are going to develop new the
  35. 1:29coming up features for that okay so
  36. 1:32basically also that is from the spring
  37. 1:33boot
  38. 1:34side okay okay so uh may I know what are
  39. 1:39the challenges you guys are facing uh
  40. 1:41converting this monolithic to
  41. 1:44microservices yeah the main thing is for
  42. 1:47the uh uh see this is a monolithic
  43. 1:51application so everything will be in a
  44. 1:53one one Services right so we are facing
  45. 1:57for the functionality breaking one of
  46. 1:59the main things so what we did we have
  47. 2:02modularized all functionality into the
  48. 2:04different mod and we have also
  49. 2:08modularize and convert separate database
  50. 2:10for that particular modules and we have
  51. 2:12created independent microservices of
  52. 2:15that and we are also facing the main
  53. 2:19problem for the transaction Rel so micro
  54. 2:22services so we have also overcome that
  55. 2:25uh tolerance using the using the
  56. 2:31uh Saga design pattern as you know that
  57. 2:33Saga design so can you give a brief on
  58. 2:36this Saga design pattern yeah definitely
  59. 2:39so Saga design pattern is work on the
  60. 2:43two two features we can say
  61. 2:45orchestration orchestration and there is
  62. 2:49another one but we have used
  63. 2:50orchestration so Saga is doing what so
  64. 2:54for example two microservices
  65. 2:56communicating between two each other and
  66. 2:58one trans is dependent in second
  67. 3:01microservices MH first micros service a
  68. 3:04transaction is committed but uh B
  69. 3:07transaction was going to fail so we
  70. 3:09obviously need to roll back the
  71. 3:11transaction from the a microservices but
  72. 3:14uh that transaction is already committed
  73. 3:16and we don't know that the transition is
  74. 3:17fair so what we have implemented we have
  75. 3:20implemented Saga design pattern so when
  76. 3:22the first transition is completed then
  77. 3:24it will shot the message M we have we
  78. 3:29have configur One messaging service
  79. 3:32cap so that are going to send the
  80. 3:34message into the capka and if that
  81. 3:39transaction micro service B transaction
  82. 3:41is failed it will going to send fallback
  83. 3:44message to the uh that messaging service
  84. 3:47and micros service a will be received
  85. 3:49that message and that transaction will
  86. 3:51be R back so we have overcome that
  87. 3:53something like that okay in a real time
  88. 3:56example we can say that we can take an
  89. 3:59example of application z m so they are
  90. 4:03working something like that okay order
  91. 4:06is completed but it is not
  92. 4:09deliverable to be so it will
  93. 4:12be okay okay nice so uh in
  94. 4:18microservices uh architecture uh what's
  95. 4:21the difference between fall tolerance
  96. 4:22and
  97. 4:23resilience yeah for for resilience we
  98. 4:27have used resilience 4G for the circuit
  99. 4:29Breakers to imp the circuit breakers for
  100. 4:33example if any micros service or any
  101. 4:36server call is getting failed so and
  102. 4:39client will be not effect of that
  103. 4:41service failure so what we have
  104. 4:43implemented we have implemented circuit
  105. 4:45breaker to overcome that challenges and
  106. 4:48we have return D response to that M that
  107. 4:50end users for that we have implemented
  108. 4:53circuit breakers and circuit breaker is
  109. 4:55working for the three steps first steps
  110. 4:58is close second is half open and third
  111. 5:01one is fully open so we have implemented
  112. 5:04in between some intervals so if that
  113. 5:07call is falling for the three times four
  114. 5:09times continuously failing then it will
  115. 5:12be for the half open then fully open at
  116. 5:17the end okay so that for that we have
  117. 5:20implemented and using the yeah at
  118. 5:24circuit breaker annotations we have
  119. 5:26implemented fall back me and using the
  120. 5:28fallback method we have Returns the dumy
  121. 5:31response to the end client so NES I
  122. 5:34would like to share one important thing
  123. 5:36with you actually we had launched
  124. 5:37complete interview preparation material
  125. 5:39structur step by step by myself experts
  126. 5:41and mnc's interviewers and the best part
  127. 5:44is that now no one need to go anywhere
  128. 5:45else to prepare interviews there's a 99%
  129. 5:48chance that interviewers will ask
  130. 5:50questions from this material so
  131. 5:52basically it contain a lot of material
  132. 5:53categorized by experience level means
  133. 5:55each experience level has different
  134. 5:57material with all possible interview
  135. 5:59question question and answers for Java
  136. 6:00spring framework may1 Gate Spring boot
  137. 6:02Spring Security spring data jpa cka
  138. 6:05microservices Java coding questions
  139. 6:06stream APA coding questions and many
  140. 6:08more I have provided the link to get
  141. 6:10this in the below description and if
  142. 6:11someone need this material plus two real
  143. 6:14client Enterprise projects for reference
  144. 6:16plus one-on-one lifetime doubt sessions
  145. 6:19and referrals to the big mnc's then they
  146. 6:21should check the interview preparation
  147. 6:22kit I will provide the link for this as
  148. 6:24well in the description below so now
  149. 6:26moving to our interview okay so uh M
  150. 6:30what happens in your application if the
  151. 6:32database is down or
  152. 6:34unavailable
  153. 6:38okay uh database down or unavailable you
  154. 6:42yeah yeah database is not available or
  155. 6:45uh databas is down so that code
  156. 6:48operation will be getting fails and in
  157. 6:51that case we if we have implemented that
  158. 6:54circuit then the D response we can send
  159. 6:57to the response in that case
  160. 7:00okay the trans full transaction will be
  161. 7:03getting filed and we can we have also
  162. 7:06implemented fure queue in capka so
  163. 7:10whatever transation is going getting F
  164. 7:12then it will be that message will be
  165. 7:14goes into that particular queue and we
  166. 7:17know that that database is goes down so
  167. 7:20when this this is getting up then then
  168. 7:23that transaction will be initiated from
  169. 7:25that kka and that transaction will be
  170. 7:27completed so we have implemented
  171. 7:29something
  172. 7:34is okay okay so imagine a critical
  173. 7:38service in your application fails
  174. 7:40because it it cannot connect to the
  175. 7:41database so how would you ensure that
  176. 7:44the rest of your applications remains
  177. 7:46functional like what are the uh there
  178. 7:50might have multiple solutions for this
  179. 7:52uh just highlight the solutions only uh
  180. 7:56what so spring using the spring actuator
  181. 7:58we can know that all
  182. 8:00is getting this healthy or not right
  183. 8:02that is the one way and we have also
  184. 8:04implemented the internal console key so
  185. 8:07all the application host is hosted into
  186. 8:09that console and using the console
  187. 8:12console monitor we can find out that all
  188. 8:14application instance is getting up or
  189. 8:16not
  190. 8:18so yeah yeah got it do you know the
  191. 8:21difference between optimistic and uh
  192. 8:23pessimistic
  193. 8:25locking uh no not much okay optimistic
  194. 8:29locking I can give you a brief suppose
  195. 8:32one transaction is going to commit into
  196. 8:33the database and the same time same
  197. 8:36rules is going to update using the
  198. 8:39different transaction but that first
  199. 8:41first transaction is not completed then
  200. 8:42it at that time optimistic loocking
  201. 8:44exception is happening from the database
  202. 8:47M missing is one row is simultaneously
  203. 8:51committed or updating using the two
  204. 8:53transaction but first transaction is not
  205. 8:56committed MH before committing first
  206. 8:59transaction second second transaction is
  207. 9:00going to update that particular Ro so so
  208. 9:03it won't affect the others yeah
  209. 9:06something like that okay okay yeah and
  210. 9:09uh pessimistic
  211. 9:12locking I I don't know
  212. 9:15yeah so basically this it locks
  213. 9:18resources at the start of the
  214. 9:20transaction and preventing other
  215. 9:21transaction from modifying the locked
  216. 9:23resources until the first transaction
  217. 9:25completes yeah so we we can we can know
  218. 9:29we can we have also implemented that
  219. 9:31line for using the Hazel cast locking so
  220. 9:34what Hazel cast Hazel cast will uh stop
  221. 9:38second transaction Hast will lock that
  222. 9:40particular transaction or particular
  223. 9:43blocks to enter second transaction into
  224. 9:46that particular we have implemented like
  225. 9:49nice
  226. 9:50nice okay okay uh okay
  227. 9:55so as you said uh you are aware about
  228. 9:58optim istic locking so can you provide a
  229. 10:01real world scenario where optimistic
  230. 10:03locking would
  231. 10:05fail might
  232. 10:09[Music]
  233. 10:14fail I give a real world scenario see
  234. 10:19uh using the same transaction uh same
  235. 10:22process will be happen
  236. 10:25or if you're using the multi- trading in
  237. 10:28for updating any data into the database
  238. 10:31if First Trade will be not committed and
  239. 10:35will be executed to execute same thing
  240. 10:37then it will be happened but for the
  241. 10:39real time example it will know that real
  242. 10:42time can be uh like in where multiple
  243. 10:45users are attempting to book the last
  244. 10:47seat on
  245. 10:49flight uh and simultaneously uh so
  246. 10:52optimistic locking could fail when the
  247. 10:54last update overr rights a previous one
  248. 10:57yeah but uh uh we if if you know that if
  249. 11:01you're going to book any seats then it
  250. 11:02will be locked for the particular time
  251. 11:04so second user may not going to attempt
  252. 11:06that seat we have locked that particular
  253. 11:09sits for that particular user for
  254. 11:11sometime so it will be not maybe real
  255. 11:13time example but that passive ptic
  256. 11:16accept locking will be not implemented
  257. 11:19then it will be happen for the
  258. 11:21optimistics yeah yeah that is the real
  259. 11:24time you can say that
  260. 11:27uh so
  261. 11:30account no I I need to yeah it's
  262. 11:35fine okay okay so nsh uh can you tell me
  263. 11:39what are the best strategies for
  264. 11:41generating IDs uh in the database with
  265. 11:45GPA uh yeah string data jpa we have used
  266. 11:50that is the best way and we have also
  267. 11:53used the jdbc connection for the Bic for
  268. 11:55the monolithic application we have used
  269. 11:58jdbc
  270. 12:01okay okay so suppose you are designing a
  271. 12:05high traffic application which ID
  272. 12:07generation strategy would you prefer and
  273. 12:12why for the high Tropic ID
  274. 12:15[Music]
  275. 12:18generation strategy so in Spring data
  276. 12:21jpa there is a thing sequence generator
  277. 12:25sequence generator yes yeah yeah so this
  278. 12:27is uh one of the way actually to
  279. 12:29generate uh the IDS IDs means uh common
  280. 12:34ID unique ID unique ID yes yeah yeah
  281. 12:37yeah okay yeah this is actually way so
  282. 12:40have you heard about uu IDs U ID so
  283. 12:43what's the difference between uu IDs and
  284. 12:45sequential IDs so uu ID contains
  285. 12:49[Music]
  286. 12:51some characters and strings and uu ID
  287. 12:54contains some characters and it will be
  288. 12:56a part of the two or three parts I maybe
  289. 12:59and sequence is all contains only
  290. 13:01integers value okay that is
  291. 13:05difference okay so can you tell me how U
  292. 13:09IDs impact database
  293. 13:13performance uh so tell me can uu IDs can
  294. 13:18uh lead to index
  295. 13:19fragmentation yeah definitely because it
  296. 13:22contains large number of string so
  297. 13:25database database need uh database can
  298. 13:27have a trouble to of uh sting or finding
  299. 13:30the uni unique numbers of that ID yeah
  300. 13:34so it may contain a performance issue
  301. 13:36right and uh sequence ID contains only
  302. 13:39integer numbers so it is faster than
  303. 13:43faster than
  304. 13:45ID okay so what the mitigation
  305. 13:47strategies could you apply to solve this
  306. 13:50index fragmentation for the index in my
  307. 13:53project we have only used the not use
  308. 13:55the CU ID we have used the sequences ID
  309. 13:58sequence yeah and we have uh for the
  310. 14:00performance we have implemented uh index
  311. 14:03and something for that into the
  312. 14:05particular tables okay let's say someone
  313. 14:07want to use uu IDs and so then how can
  314. 14:12someone I mean mitigate this uh in index
  315. 14:20[Music]
  316. 14:22fragmentation we yeah for the indexing
  317. 14:25purpose I think we haven't used the uid
  318. 14:28but MH yeah in Aro we have used ID for
  319. 14:32the indexing purpose okay how that I
  320. 14:36don't know yeah it's
  321. 14:38fine uh okay so uh if an API Gateway
  322. 14:43goes down so how would you identify and
  323. 14:45resolve the issue
  324. 14:51uh API gway goes down yes yes yeah as I
  325. 14:56saw that using the spring accor we can
  326. 14:58say that any API is goinging to down or
  327. 15:01or API Gateway goes down then we can
  328. 15:04find that 4 not4 or something like get
  329. 15:08and we we can Implement one uh Monitor
  330. 15:13and in monitor we can also find that
  331. 15:15that API is going to down so uh
  332. 15:18automatically that API will can going to
  333. 15:22start up
  334. 15:23or okay okay
  335. 15:26so uh did you you face any uh this issue
  336. 15:32like API failed issue during your
  337. 15:37career uh so many
  338. 15:40times are facing so many times okay
  339. 15:46since last two to three years we are
  340. 15:47going to develop from we are working on
  341. 15:50micros service and we have that micros
  342. 15:52service into the production environment
  343. 15:55and something like that so in that case
  344. 15:58we have uh Dockers and
  345. 16:01kubernetes for deployment and something
  346. 16:04like that so that all the microservices
  347. 16:07is managing by that as
  348. 16:10well okay okay all
  349. 16:12right okay so moving
  350. 16:16ahead uh in Java why does the static
  351. 16:20block execute before the main
  352. 16:25method static blocks executed before
  353. 16:29yeah
  354. 16:35yeah yeah yeah it's fine fine uh okay so
  355. 16:40uh do you know about system.exit in Java
  356. 16:43system.exit Yes Yes program will be
  357. 16:46terminated
  358. 16:48system okay so do you know what happens
  359. 16:51uh internally when system. exit is
  360. 16:55called uh program terminated and your
  361. 16:58server
  362. 16:59goes down M okay
  363. 17:02but
  364. 17:06onee uh fine fine what is a h collision
  365. 17:11and how it handled
  366. 17:13internally so hash Collision means uh
  367. 17:17hasing it is one of the hasing mechanism
  368. 17:20so hash code and equal method will be
  369. 17:24used using the into the H code so when
  370. 17:27we are using the has map when we are
  371. 17:30using map then ashod method will be
  372. 17:34uh call and it will convert that
  373. 17:37particular Keys into the hash code and
  374. 17:39uh it will put into the particular pool
  375. 17:44and and call the and when another times
  376. 17:47map. put method will be called then it
  377. 17:49will be convert T key into the has hash
  378. 17:52code and equals method will be called so
  379. 17:56it will check that both keys are same or
  380. 18:00not
  381. 18:02so po something like
  382. 18:06that okay
  383. 18:09okay do you know about proxy design
  384. 18:12pattern which proxy design
  385. 18:16pattern no okay okay so basically this
  386. 18:21pattern involves using a serate or
  387. 18:23placeholder object to control access to
  388. 18:25another
  389. 18:26object basically used to enhance
  390. 18:28security lazy initialization logging
  391. 18:31something like that yeah
  392. 18:33yeah okay okay so what happens if an
  393. 18:37exception is thrown by the main
  394. 18:41thread using the main thread yeah
  395. 18:45yeah so we are getting the any
  396. 18:48exceptions
  397. 18:52uhuh okay okay so uh do you know about
  398. 18:57uncaught exceptions
  399. 19:02you mean to say a compile time exception
  400. 19:04and time exception yeah yeah yeah yeah
  401. 19:08okay so can you tell me how you guys are
  402. 19:10uh maintaining or handling the exception
  403. 19:14things yeah so generally uh in a simple
  404. 19:18Java application we can handle using try
  405. 19:21and Cat block okay so using the try and
  406. 19:24catch block we can catch the particular
  407. 19:26exception MH and we can throw our P
  408. 19:29exceptions for example my application
  409. 19:32will be for the accounting and it will
  410. 19:36be IL legal argument exception we are
  411. 19:38thr so we can c that exception using the
  412. 19:40catch block and we can we can uh throw
  413. 19:45we can Define client that you are
  414. 19:47passing the wrong argument for
  415. 19:49the and in the springb micros service we
  416. 19:52have used the controller advisor for the
  417. 19:56uh same way we can ask
  418. 19:59catch and try and catch block but for
  419. 20:01the sending the user defend except
  420. 20:03exception we have used the controller
  421. 20:05adviser and controller advisor we have
  422. 20:10uh cat that particular exception and we
  423. 20:12can throw Uh custom status code and
  424. 20:15custom message
  425. 20:18M and also we have used expect aspect
  426. 20:23for oriented programing okay so uh there
  427. 20:27is annotation at the rate before so
  428. 20:32sorry at the rate after so in that
  429. 20:34method we can Define In from which
  430. 20:36method you you want to throw the
  431. 20:39exception and uh every every exception
  432. 20:43throws that method will be called and we
  433. 20:45can uh throw the ex we can handle
  434. 20:47something like okay
  435. 20:49okay okay so moving ahead
  436. 20:53uh so in uh in a springbot application
  437. 20:57uh you see there is a run
  438. 21:01method uh right uh so can you explain
  439. 21:05that run
  440. 21:07method
  441. 21:08uh I can explain not in but we can say
  442. 21:12that when springboard application run
  443. 21:15method will be called and all the uh
  444. 21:18string boot component will be uh instant
  445. 21:22instant which we haveed using the
  446. 21:25service atate component or uh at theate
  447. 21:30repository so all that classes will be
  448. 21:33instant and uh that variable or that
  449. 21:36class level variables or method static
  450. 21:39method will be instituted at that
  451. 21:42time that is I know and uh at
  452. 21:47application Level we
  453. 21:49can we can
  454. 21:51also Define that which class you want to
  455. 21:54exclude that excl exclusion strategy
  456. 21:58that
  457. 21:59start startup CL application startup
  458. 22:02class before
  459. 22:04the correct
  460. 22:06correct okay so moving ahead
  461. 22:10uh have you implemented all o
  462. 22:14to O2 in your
  463. 22:17application O2 yes we have implemented
  464. 22:21okay so what challenges did you face
  465. 22:22during its
  466. 22:25implementation
  467. 22:26implemented in simple or to there will
  468. 22:29be barrier token using that barrier
  469. 22:32token uh we have used it we have we have
  470. 22:38not implemented rather than we have
  471. 22:41implemented and our custom S ID system M
  472. 22:46okay okay all
  473. 22:48right uh what are the best coding
  474. 22:51principles and practices you have
  475. 22:53applied in your
  476. 22:56project so uh for the Bas coding so we
  477. 23:01first of all we we are always use the
  478. 23:04oops concept we have always try to reuse
  479. 23:08the existing codes MH and uh we are
  480. 23:12always point for the performance M we in
  481. 23:17my company we have defined that every
  482. 23:19every API should be return within one
  483. 23:21second so that that is the
  484. 23:23major we need to identify then uh uh
  485. 23:29any any warnings in a Cod should be not
  486. 23:32there we have for we have us the sonar
  487. 23:35Cube M finding the warnings and
  488. 23:40for method execution or method
  489. 23:43performance we have implemented unit
  490. 23:45test cases M that is the one main thing
  491. 23:48and we have also implemented automation
  492. 23:50testing for particular API testing and
  493. 23:55something are you guys following solid
  494. 23:57principles
  495. 23:59uh we can say yeah we Sol okay
  496. 24:03okay can you give me an example like
  497. 24:06anywhere you have you have applied the
  498. 24:08solid principle any principle in your
  499. 24:11piece of
  500. 24:17code let's go
  501. 24:19substitution simple object let's go
  502. 24:22substition inversion of control V in
  503. 24:26Implement interface segregation we have
  504. 24:29used in my application
  505. 24:32so uh in my application that as I so
  506. 24:35that we have
  507. 24:36implemented different different
  508. 24:38functionality into the different
  509. 24:40different module so we have created one
  510. 24:43root jar Ro Library so which contains
  511. 24:48all the main interfaces and something
  512. 24:50like that we have implemented we have
  513. 24:52use that Library into the different
  514. 24:53different
  515. 24:55modules different micros service and we
  516. 24:58mented that interfaces so that interface
  517. 25:01agregation we have used and let for
  518. 25:05substitution and one module should not
  519. 25:07be dependent
  520. 25:09on uh lower level higher level module
  521. 25:12should be not dep on that will be will
  522. 25:15be we have also implemented so okay
  523. 25:19okay how do you measure code
  524. 25:23quality uh for the code quality we are
  525. 25:26using the sonar Cube okay
  526. 25:28and yeah and we are we are we are going
  527. 25:31to raise the PO request inet so every
  528. 25:35single person has to review and also has
  529. 25:37to review by the developers so that
  530. 25:40developers can understand that what we
  531. 25:43have
  532. 25:44developed so that is the main thing for
  533. 25:47the compilation or Warnings to resolve
  534. 25:50it and for the breaking and something
  535. 25:54like that we have as as I told that unit
  536. 25:56test cases and Auto
  537. 25:59MH okay
  538. 26:02okay okay so
  539. 26:06MH uh as you said uh you recently
  540. 26:11migrating monolitic architecture to
  541. 26:13microservice F uh can you tell me a
  542. 26:16situation where adopting a microservice
  543. 26:19architecture might not be ideal
  544. 26:27[Music]
  545. 26:36yeah in some cases
  546. 26:41uh uh when yeah we have used the
  547. 26:44monolithic
  548. 26:45so we don't need more teams to manage
  549. 26:50that developers should be limited M so
  550. 26:54that is the main uh reason that is the
  551. 26:56main benefits into the monolithic mhm so
  552. 27:00that we can say that it's for the
  553. 27:02costing purposes of that for the compe m
  554. 27:05so in a monolithic everything should be
  555. 27:08in a one uh one one code one services so
  556. 27:14maintaining and managing is easy for
  557. 27:16that MH so that will be not t of steam
  558. 27:20so that is and when we are going to
  559. 27:22migrate it so there would be a different
  560. 27:25different microservices so every modules
  561. 27:28so we have a different team so that is
  562. 27:31the uh and managing it's very harder
  563. 27:35very very difficulties so we can at that
  564. 27:40time we feel that adopting micros servic
  565. 27:42is such a big big issue or not a good
  566. 27:45solution but uh uh at the end we found
  567. 27:50that if we have a good team and we have
  568. 27:52a good knowledge M then we can manage it
  569. 27:55easily but uh MH
  570. 27:58fall fall tolerance is very less if
  571. 28:00you're using the microservices in a
  572. 28:02monolithic what happen if you want to
  573. 28:04make any changes or you want to add any
  574. 28:07functionality so we need to take care
  575. 28:09that another functionality will be going
  576. 28:11to break or not and in a micros service
  577. 28:14that there is
  578. 28:16only single micros service for the
  579. 28:18particular model so we we can easily
  580. 28:22make changes into that particular
  581. 28:24service so that is the good things so
  582. 28:27both both proing cons for the minor EIC
  583. 28:30and
  584. 28:31microservices okay okay nice
  585. 28:34nice okay so NES uh are you comfortable
  586. 28:38in indexes of uh
  587. 28:42squ uh see uh there is I would like to
  588. 28:46be a Frank that would be a database
  589. 28:48developers in my team oh okay so they
  590. 28:51are managing the all the SPs and TBL
  591. 28:55index but I know how to create index and
  592. 28:59uh how to use and how the execution plan
  593. 29:02is executed inside the SQL so I have
  594. 29:06also knowledge about that okay so like
  595. 29:08do you know uh if you uh if we have a
  596. 29:12frequently updated table which type of
  597. 29:14index would you would we would should I
  598. 29:17mean we should use and why see there is
  599. 29:19a table index and column index should be
  600. 29:22there mhm as I noted uh using the table
  601. 29:26index if you creating in table index so
  602. 29:29when we are going to going to fire any
  603. 29:32query then in know SQL in the memory
  604. 29:36they are going to create index for that
  605. 29:38particular tables so when second time
  606. 29:40that same query will be executed then it
  607. 29:42will be use that
  608. 29:44tables in simple way we can say that it
  609. 29:47is working something like the caching
  610. 29:50mechanism if you know that for the
  611. 29:53casing casing mechanism we are not going
  612. 29:55to directly call to the database mhm
  613. 29:58between the API and server we can
  614. 30:00implement the one case casing so when
  615. 30:03first time user call then it directly
  616. 30:05call database and from getting a data it
  617. 30:07will store into the M base or M cach and
  618. 30:10when second time same query will be
  619. 30:12executed then it will be going to take a
  620. 30:14data from the M case same thing indexes
  621. 30:17is working like that so it will be
  622. 30:19become a faster for execution of any
  623. 30:22query that would be a table index and
  624. 30:26uh column index
  625. 30:28that I haven't tried to execute it okay
  626. 30:32okay yeah it's fine have you heard about
  627. 30:36balanced
  628. 30:37index no okay that's fine uh moving
  629. 30:42ahead do you know about circular
  630. 30:45dependency
  631. 30:47yeah go ahead yeah suppose if you are
  632. 30:51going to use any uh dependency and that
  633. 30:55dependency internally going to use that
  634. 30:58C dependency so it will be called a
  635. 31:00circular dependency for example there is
  636. 31:03a library one Library a it dependent on
  637. 31:07Library b Library b is dependent on
  638. 31:09Library C but internally Library C may
  639. 31:13be used the class of Library a so in
  640. 31:16that case it is a circular dependency we
  641. 31:19can say that
  642. 31:22okay
  643. 31:25okay moving ahead
  644. 31:33so why why are unit test cases important
  645. 31:36and uh what's a code coverage in your
  646. 31:39application and what is what is a
  647. 31:42standard percentage for the code
  648. 31:45coverage Yeah so basically standard
  649. 31:48percentage is 85 percentage okay of code
  650. 31:51coverage in standard but we are allowing
  651. 31:54developers to cover code into till 90
  652. 31:56percentage okay because we are going to
  653. 31:59ask developer to also write the unit
  654. 32:01test case for the excep and block Cas
  655. 32:04also and we are also going to ask them
  656. 32:06for the finally blocks will Al execute
  657. 32:10but we are so 90% should be uh
  658. 32:14compulsory but 85 percentage is fine so
  659. 32:17minimum is 85% minimum is and yeah why
  660. 32:20micro why unit this is important so the
  661. 32:23basic is that suppose if we we uh we we
  662. 32:27have mented one method and we have
  663. 32:30writing the unit T case for that right
  664. 32:33so when another developer is going to
  665. 32:35make any changes into that methods so uh
  666. 32:38they know that that functionality is
  667. 32:40already work before into that using that
  668. 32:43unit T cases so we are going to add then
  669. 32:47both the functionality that their
  670. 32:49implementation and previous Implement
  671. 32:50should be work so if they are adding
  672. 32:53then if unit will be failed then we know
  673. 32:56that that functionality is going to to
  674. 32:58break so is also important and it is
  675. 33:01also testing the behavior of methods
  676. 33:07m not actually functional testing but
  677. 33:09behaviors of method behaviors of methods
  678. 33:12business logic we can
  679. 33:15say Okay correct so nsh uh are you
  680. 33:19comfortable in
  681. 33:21writing coding by using uh stream API
  682. 33:25Java yeah I have uh I little bit know
  683. 33:28that
  684. 33:29Java okay so will you be able to write a
  685. 33:33code uh for uh I mean to merge two
  686. 33:37unsorted arrays into a single sorted
  687. 33:40array unsorted let's say you are given
  688. 33:43two unsorted arrays and you have to
  689. 33:45merge these uh unsorted arrays and
  690. 33:51output should be a single sorted array
  691. 33:53after merging these two unsorted array
  692. 34:04for example there is no requires for the
  693. 34:06stream so we can use right directly
  694. 34:08raing the simple Java there is two
  695. 34:11unsorted array and we
  696. 34:13can we can take a third array M third
  697. 34:17array and we can add to this two add all
  698. 34:20using the add all we can add the both
  699. 34:22two array into that third array and
  700. 34:24using the simple collection do sort we
  701. 34:26can sort that into the one so
  702. 34:30stream as I think so no no it's fine uh
  703. 34:34we can do without stream API as well but
  704. 34:36I just want to know like what would be
  705. 34:38your approach if uh you will solve
  706. 34:41through if if the constraint is only
  707. 34:43stream API
  708. 34:46ja yeah stream. collect inside of
  709. 34:49stream. collect that is you can try by
  710. 34:52sharing your screen and
  711. 34:54open Andor
  712. 35:00yes list
  713. 35:04of right
  714. 35:07yeah take list of
  715. 35:11integers and put array like in first
  716. 35:14array like array one take a r
  717. 35:20R1 you can take value 32 1
  718. 35:28and uh initialize second array and with
  719. 35:32the same instead of
  720. 35:46654 now merge these two array and uh add
  721. 35:50all the values uh in Array three and
  722. 35:54that should be sorted but
  723. 35:57I'm not sure but I can
  724. 36:22try uh can we use uh in stream.com
  725. 36:28conat stream. conet in
  726. 36:32in uh
  727. 36:34stream.
  728. 36:37conat caps I then n
  729. 36:43[Music]
  730. 36:47stream yeah then we can put uh two
  731. 36:50arrays
  732. 36:52[Music]
  733. 36:58stream
  734. 37:00stream yeah but before that we have to
  735. 37:02convert that arror into the
  736. 37:04stream AR stream something like
  737. 37:08[Music]
  738. 37:15[Music]
  739. 37:18that yeah okay so yeah nsh let's do uh I
  740. 37:22mean the way you are telling without
  741. 37:24using a stream API uh
  742. 37:33[Laughter]
  743. 37:50[Music]
  744. 38:01[Laughter]

About this transcript

This page contains the full transcript of Java Spring Boot 11 Years Interview Experience by GenZ Career, generated from the public captions YouTube serves with the video. The transcript has 4,763 words across 744 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.