YouTube2Text

Top 10 Java Interview Questions for 10+ years experience — Transcript

by Interview Happy · 3,549 words · 630 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hello, friends. Based on my overall 15
  2. 0:03plus years of experience, today I'm
  3. 0:05going to share the top 10 Java interview
  4. 0:09questions that I feel are very important
  5. 0:11for senior candidates. Some of these
  6. 0:14questions are also scenario-based. So,
  7. 0:16without wasting time, let's start with
  8. 0:19the first question.
  9. 0:21Explain the concept of item potence in
  10. 0:24restful API. And in my In this This is
  11. 0:27not a very important question, but some
  12. 0:29students say is that they have been
  13. 0:31asked in interview, so let's understand
  14. 0:33it.
  15. 0:34Uh item potent is a Sorry for my
  16. 0:36pronunciation. It's item potent or item
  17. 0:38potent, I don't know.
  18. 0:40So, item potent is a concept that
  19. 0:43guarantees that performing the same
  20. 0:45operation multiple times will always
  21. 0:49give the same output, same response,
  22. 0:51same result. Okay? So, the word is hard,
  23. 0:55but the purpose meaning is easy, okay?
  24. 0:58For example, see here.
  25. 1:00See, if you send this get method request
  26. 1:03100 times again and again, the result
  27. 1:06will always be the same, okay? You will
  28. 1:08get the response with the 100
  29. 1:10the users list, right? Same result. Now,
  30. 1:14similar to get, we have the put and
  31. 1:17delete methods also. Those are also item
  32. 1:19potent. Okay?
  33. 1:21Now, put put because if you send to
  34. 1:24update the same request body again and
  35. 1:26again, so every time the same
  36. 1:28replacement will happen, and the result
  37. 1:31will be same.
  38. 1:33So, that is item potent. Now, what is
  39. 1:36non-item potent methods? For example,
  40. 1:38this post method.
  41. 1:40Because if you send multiple post
  42. 1:43request with the same request body, then
  43. 1:46each time a new user new user with a new
  44. 1:49user ID will be created in the database,
  45. 1:51right?
  46. 1:53That means the result has been changed.
  47. 1:55It is impacted. and it every time it
  48. 1:59will impact. It's different. Okay?
  49. 2:02Great. That is the explanation of this
  50. 2:05concept, and the same thing is written
  51. 2:08here also, which I already explained,
  52. 2:10right?
  53. 2:12All right, my friend. Before moving to
  54. 2:14the next question, I have a challenge
  55. 2:17for you.
  56. 2:18If you are giving interviews, or you are
  57. 2:20planning to give interviews in future,
  58. 2:23then [snorts] you will face many
  59. 2:25obstacles, rejections, especially if you
  60. 2:28have more experience. But, there is only
  61. 2:32one key of interview success, and that
  62. 2:35is never ever give up. So, keep giving
  63. 2:38interviews, and accept my never give up
  64. 2:42challenge by typing never give up in the
  65. 2:45comments right now.
  66. 2:48And that day you crack your interview,
  67. 2:52come back and share your success a story
  68. 2:56in any of my video, like these students
  69. 3:00have [snorts]
  70. 3:01shared who got excellent salary hikes by
  71. 3:05following the never give up mantra.
  72. 3:08I will repost your success story, and
  73. 3:13to inspire others also. So, type never
  74. 3:16give up in the comments now. Let's
  75. 3:20continue.
  76. 3:21What is token-based authentication and
  77. 3:24JWT authentication?
  78. 3:26Nowadays, this is the most popular kind
  79. 3:28of authentication technique used in REST
  80. 3:31APIs.
  81. 3:33Here, token-based authentication is a
  82. 3:35type of authentication,
  83. 3:38and when we use JWT as the token in
  84. 3:41token-based authentication, then that is
  85. 3:45JWT authentication. And you can also say
  86. 3:48like JWT authentication is a type of uh
  87. 3:51token-based authentication, also, okay?
  88. 3:53So, JWT stands for JSON Web Token.
  89. 3:58For interviews, this JWT authentication
  90. 4:01process is very, very important, and
  91. 4:04that I'm going to explain here.
  92. 4:06And here are first the main players in
  93. 4:08the authentication process.
  94. 4:10First is our browser, which will act as
  95. 4:13the front end. You can say also front
  96. 4:16end you can think of it. And then we
  97. 4:18have the REST API,
  98. 4:20which you can also call middleware,
  99. 4:22server side, back end, okay?
  100. 4:25Now, there are eight steps in this
  101. 4:27authentication process of JWT.
  102. 4:31First, user will
  103. 4:33from the client side send the username
  104. 4:36and password through the browser and
  105. 4:39send them to the API with a post
  106. 4:41request.
  107. 4:43Now, of course, I'm not saying that
  108. 4:44browser will send to the client and
  109. 4:46client will send to the server.
  110. 4:48Basically,
  111. 4:50both will together will send to the API
  112. 4:52[clears throat] server, okay?
  113. 4:55Then, in the second step, the API will
  114. 4:59receive these credentials, right? And
  115. 5:01they or they will authenticate, or you
  116. 5:04can say validate those username and
  117. 5:06password, whether it is valid or not.
  118. 5:10If credentials are valid, a JWT token
  119. 5:14will be created, and that will be sent
  120. 5:17back to the client as a response.
  121. 5:21Clear?
  122. 5:22Now, if the credentials are not valid,
  123. 5:24it will not return uh API server will
  124. 5:26not return
  125. 5:27uh and uh JWT token, rather a
  126. 5:31authentication error will be returned.
  127. 5:34Then, as a next uh step, the client will
  128. 5:37store this JWT token in the local
  129. 5:40storage or in the cookies of the
  130. 5:42browser, uh okay?
  131. 5:45Now, listen carefully.
  132. 5:47When the JWT token is stored, then for
  133. 5:51every future or subsequent request for
  134. 5:54the data from client, this token will be
  135. 5:58sent in the header of every request to
  136. 6:02the REST API from the client.
  137. 6:05Okay?
  138. 6:06Got my point? Token will go every time.
  139. 6:09Username and
  140. 6:11password are will not go then.
  141. 6:13So, now when the API will receive the
  142. 6:17token, it will check and validate the
  143. 6:19token signature with the help of some
  144. 6:21algorithm. And if the token is valid, it
  145. 6:26must Valid means it must be the same JWT
  146. 6:29token which
  147. 6:30initially the API has sent to the
  148. 6:32client, okay?
  149. 6:34And if it is valid, then only the API
  150. 6:37will send the data to the client.
  151. 6:40Great. Finally, the client will display
  152. 6:42the data in the browser, and that is the
  153. 6:45whole process which I make simpler for
  154. 6:48you.
  155. 6:49And that's the reason why for any
  156. 6:51website we have to enter username
  157. 6:53password only once because uh first time
  158. 6:58after first time, you will receive the
  159. 7:00token, and then only the token will be
  160. 7:02sent for the validation, not the
  161. 7:04username and password again and again,
  162. 7:06okay?
  163. 7:07So, this is the working of JWT token
  164. 7:10authentication.
  165. 7:12And yes, there are other authentication
  166. 7:14techniques also, but this is the most
  167. 7:17popular one, and that is the answer to
  168. 7:20this question, the steps and the
  169. 7:22explanation. Okay?
  170. 7:25What is dependency injection? How to
  171. 7:28implement it? Now, very, very important
  172. 7:30question, and I mark this question with
  173. 7:33two very important signs because this is
  174. 7:36asked almost in every interview. And
  175. 7:38today we will understand it completely.
  176. 7:41Let me first show you the diagram for
  177. 7:42the dependency injection implementation,
  178. 7:44okay?
  179. 7:45See, normally the dependent class and
  180. 7:48dependency class are tightly coupled
  181. 7:50like this. Okay?
  182. 7:53Here, we directly create the object of
  183. 7:55the dependency class in this dependent
  184. 7:58class.
  185. 7:59You already know that.
  186. 8:00Now, to replace this math student class
  187. 8:03with the science student class, we have
  188. 8:05to change the code of this school class
  189. 8:08itself.
  190. 8:09Right?
  191. 8:10So, this is the example without
  192. 8:13dependency injection.
  193. 8:15Okay? But, when we will use dependency
  194. 8:18injection, then dependency class and
  195. 8:21dependent classes are loosely coupled
  196. 8:24and not dependent on each other like
  197. 8:27this.
  198. 8:28Here, the object of the dependency class
  199. 8:31will not create be created inside school
  200. 8:34class,
  201. 8:34but will be created and managed inside
  202. 8:37the Spring IOC container via the
  203. 8:41appconfig.java
  204. 8:43file.
  205. 8:44Okay?
  206. 8:45Then, you have to create the student
  207. 8:47interface, which is implement by both
  208. 8:50math student and science student
  209. 8:52classes.
  210. 8:54Okay?
  211. 8:55Now, listen carefully.
  212. 8:57Instead of creating the object of
  213. 8:59dependency classes in the dependent
  214. 9:01class,
  215. 9:02you will inject the
  216. 9:04instance of the student interface into
  217. 9:07the dependent class via the school class
  218. 9:10constructor like this.
  219. 9:13Now, you may ask student interface
  220. 9:16instance will carry which instance, math
  221. 9:19student or science student? The answer
  222. 9:21is
  223. 9:22whatever instance you will configure in
  224. 9:25this app.config,
  225. 9:27that instance will be created and
  226. 9:28received by the student interface.
  227. 9:32That's it.
  228. 9:34See, here if you want to replace the
  229. 9:36math student with science student in
  230. 9:38your school class, then change the app
  231. 9:41config for science student object uh
  232. 9:44object creation,
  233. 9:45but you need not to change any any code
  234. 9:49in the school class.
  235. 9:51Right? That was the purpose, okay? Do
  236. 9:54not change the school class.
  237. 9:56Just changing just change by changing
  238. 9:58the container
  239. 10:00and the many classes or controller like
  240. 10:03you do not have to change all the
  241. 10:05controller or classes like a school
  242. 10:07class, okay?
  243. 10:09Great. That is the example and benefit
  244. 10:11of dependency injection.
  245. 10:13And one more learning we had,
  246. 10:15dependency injection implementation, you
  247. 10:18have to code for to the interface, not
  248. 10:22the implementation that dependency
  249. 10:24classes, okay?
  250. 10:26Also, you realize that how inversion of
  251. 10:28control principle is implemented by
  252. 10:31changing the place of object creation
  253. 10:34from the class to the container, okay?
  254. 10:38All right. Finally, here is the simplest
  255. 10:40definition of dependency injection.
  256. 10:43Dependency injection is a design pattern
  257. 10:46that is used to implement the inversion
  258. 10:49of control principle in Java.
  259. 10:52Great. The definition diagram are here
  260. 10:55because I remember how I had a very hard
  261. 10:58time remembering and revising these this
  262. 11:01dependency injection concept for my
  263. 11:03interviews.
  264. 11:05So, that's why all is here.
  265. 11:07Now, in the upcoming question, I will
  266. 11:08show you the code implementation.
  267. 11:12All right. Before we move forward, here
  268. 11:14is a small notification.
  269. 11:17If you don't want to miss anything and
  270. 11:19want to cover top 350 plus Java
  271. 11:23interview questions,
  272. 11:25then I have a full Java interview
  273. 11:28course.
  274. 11:29Here is the complete Java interview road
  275. 11:32map, and in this course, I have covered
  276. 11:35all the interview questions on all the
  277. 11:38Java topics.
  278. 11:40And that is also in a step-by-step
  279. 11:42manner, so that even if you are new to
  280. 11:45Java, you still you will understand
  281. 11:48every every concept.
  282. 11:51Along with this video course, you will
  283. 11:53also receive Java interview PDF book for
  284. 11:57your quick revision.
  285. 12:00Many senior developers have already
  286. 12:02cracked their interviews using my
  287. 12:05interview preparation content. You could
  288. 12:07be the next one. So, if you are
  289. 12:10interested in the course or book, then
  290. 12:14check out the link in the description of
  291. 12:18this video.
  292. 12:19Now, let's continue.
  293. 12:22When to use which type of dependency
  294. 12:24injection? This I already explained in
  295. 12:27the previous question, but here I'm
  296. 12:30writing it all here. Okay? First,
  297. 12:33constructor injection is used for
  298. 12:35mandatory dependencies, and this is the
  299. 12:38most popular one. Second, setter
  300. 12:41injection is used for injecting optional
  301. 12:43dependencies.
  302. 12:45Okay? Third, field injection is there,
  303. 12:49but it is not good as it has testing
  304. 12:52limitations. Okay? And last, method
  305. 12:55injection is used for injecting
  306. 12:58dependencies dynamically or
  307. 13:00conditionally.
  308. 13:02All information written here so that
  309. 13:04your interview revision will be faster
  310. 13:07and quickly faster from the book, and
  311. 13:10you do not forget any of these points in
  312. 13:13your interviews.
  313. 13:15When to use singleton scope? What are
  314. 13:18its its pros and cons?
  315. 13:20Here is the singleton scope, which I
  316. 13:22already explained in the previous
  317. 13:24question.
  318. 13:25The top advantage of using singleton
  319. 13:27scope is performance,
  320. 13:29okay? Because a single bean instance
  321. 13:32created once only and it is reused
  322. 13:35multiple times in multiple modules and
  323. 13:39in multiple requests of your
  324. 13:41applications, okay? Right? So, this will
  325. 13:45basically reduce the object creation
  326. 13:47again and again, which is very good for
  327. 13:50performance. The same thing is written
  328. 13:52here.
  329. 13:53Then the disadvantage is that
  330. 13:56single beans are shared across multiple
  331. 13:59threads, okay? In a multi-threaded
  332. 14:01application. So, like they are shared in
  333. 14:04multiple requests, okay? So, in a
  334. 14:08multi-threaded case, the single bean
  335. 14:10instance can be incorrectly manipulated
  336. 14:13or it's not good for multiple threads
  337. 14:15because it will change the information,
  338. 14:18which is dangerous dangerous for your
  339. 14:20application functionality, okay?
  340. 14:22Therefore, for multi-threaded
  341. 14:24application, single scope singleton
  342. 14:26scope is not recommended, okay? Same is
  343. 14:29written here.
  344. 14:31Finally, the use of singleton scope is
  345. 14:33it is good for stateless based
  346. 14:36application because when your request do
  347. 14:39not maintain or store state or data or
  348. 14:43session, then sharing instances via
  349. 14:46singleton scope is never a problem,
  350. 14:49okay? So, then you you have to use it.
  351. 14:53So, in the case of rest services, it's
  352. 14:56the best singleton, okay? So, that is
  353. 14:58the best answer to this question.
  354. 15:01What are circular dependencies? How does
  355. 15:05Spring handle it?
  356. 15:07First of all, what is circular
  357. 15:09dependency? Here is a diagram. See, if
  358. 15:12in your application, if you have two
  359. 15:14services or classes like service A and
  360. 15:17service B. Now, suppose service A
  361. 15:19depends on service B. That means you
  362. 15:22will inject service B into service A,
  363. 15:25right?
  364. 15:26But then,
  365. 15:27due to some requirement or something,
  366. 15:29you also
  367. 15:30want that service B also depends on
  368. 15:33service A or class A, you can say.
  369. 15:36So, that this is circular dependency,
  370. 15:39okay? Here you will use constructor
  371. 15:41injection, for example, in your service
  372. 15:44A
  373. 15:44to inject the service B, and then you
  374. 15:47will use
  375. 15:48use constructor injection in service B
  376. 15:51class to inject service A.
  377. 15:54So,
  378. 15:55if you will do that, you will get the
  379. 15:56error that being currently some creation
  380. 15:59exception error, that some some error,
  381. 16:01okay? But because then a spring cannot
  382. 16:04resolve the dependencies because both
  383. 16:07class A and class B require each other
  384. 16:09to be instantiated at the same time,
  385. 16:13which can't be done at the same time as
  386. 16:15as I said.
  387. 16:17Now, in order to solve this problem,
  388. 16:19there are two ways.
  389. 16:21If your classes are dependent on each
  390. 16:23other, then either use setter injection
  391. 16:26or you can use lazy annotation.
  392. 16:30Okay? Because setter injection will not
  393. 16:33immediately instantiate the dependency.
  394. 16:37As per setter injection, the dependency
  395. 16:39will be instantiated only when the
  396. 16:42setter method is called. Right? So, you
  397. 16:46have to manage in the code that calling
  398. 16:48the set setter methods of service A and
  399. 16:51B should not happen at the same time.
  400. 16:54Okay?
  401. 16:55Second way is avoiding circular
  402. 16:58dependencies lazy annotation.
  403. 17:02Lazy annotation will basically delay
  404. 17:04injecting the dependencies, which can
  405. 17:06again avoid the circular dependency,
  406. 17:09okay?
  407. 17:10So, great. That is the answer to to this
  408. 17:13question, and all are written here in
  409. 17:16this book.
  410. 17:18What is the difference between bean
  411. 17:20factory and application context? All
  412. 17:23right. Here is the bean factory class
  413. 17:25code that we can use to manage the beans
  414. 17:29of the Spring application. I already
  415. 17:31explained in previous question. And here
  416. 17:33is the application context code, which
  417. 17:37is the recent and more popular way for
  418. 17:40again managing the beans only.
  419. 17:43But as I said, this is more popular and
  420. 17:45advanced way of managing beans.
  421. 17:48So first, the similarity between them is
  422. 17:51bean factory and application context are
  423. 17:55used as the containers for managing and
  424. 17:58accessing the beans. Okay?
  425. 18:01But if you focus on this diagram,
  426. 18:05application context will cover all the
  427. 18:08bean factory features and will provide
  428. 18:11some more features over it. Okay? So
  429. 18:14let's check out the differences between
  430. 18:16them one by one.
  431. 18:18So the first difference between them is
  432. 18:21uh bean bean factory does lazy
  433. 18:24initializations of beans. Okay?
  434. 18:27Meanings, beans are created only when
  435. 18:30they are requested. All right?
  436. 18:33Whichever bean you need, only that you
  437. 18:35can get. Whereas application context
  438. 18:37involves the early initialization of
  439. 18:40beans.
  440. 18:41Meaning, all singleton beans are created
  441. 18:45as soon as the application context
  442. 18:47context is started. All. Okay?
  443. 18:50Second difference is bean factory has
  444. 18:53limited support for other classes.
  445. 18:56Whereas application context has full
  446. 18:59support for message resources,
  447. 19:01transaction management, and many more
  448. 19:04classes. Okay? So that is one advantage
  449. 19:07of application context also.
  450. 19:10Third difference is that minimum
  451. 19:12integration is possible with bean
  452. 19:14factory.
  453. 19:16But application context can also
  454. 19:18integrate a spring's AOP and many other
  455. 19:22features. Integration too much is
  456. 19:24possible. Okay?
  457. 19:26Next advantage is and the differences
  458. 19:29bean factory supports simple resource
  459. 19:32loading from the class path. Okay, there
  460. 19:34is only I think one way.
  461. 19:36But application context has a very good
  462. 19:39mechanism for loading resource for
  463. 19:42loading resource resources from any kind
  464. 19:45of resource like you can use class path,
  465. 19:47file system, URL. Okay, as per your
  466. 19:51requirement project requirement.
  467. 19:53And the last difference is bean factory
  468. 19:56is suitable for small
  469. 19:58application with limited choices,
  470. 20:02whereas application context is preferred
  471. 20:04for enterprise and big applications.
  472. 20:08Okay?
  473. 20:09Great. So, these are the difference as
  474. 20:12as you can see the advantages of the
  475. 20:15applications are also here over the bean
  476. 20:18factory.
  477. 20:19All written here in this book, so that
  478. 20:22while revising you do not have to watch
  479. 20:24the whole video again. Just a look at
  480. 20:28this have a look at this page and that
  481. 20:30is enough.
  482. 20:34Here is a very short but very important
  483. 20:36question. How does a spring boot provide
  484. 20:39auto configuration? You already know the
  485. 20:41answer. This is just a reverse question.
  486. 20:44The answer is via spring boot starters
  487. 20:47like this. And the answer is written
  488. 20:51here also. A spring boot provide auto
  489. 20:52configuration by automatically
  490. 20:54configuring a spring application based
  491. 20:56on the dependency, whichever you add
  492. 20:59here in the class path. Okay? So, that
  493. 21:03will basically reduce the need of manual
  494. 21:06configuration. Okay, which will allow
  495. 21:08the developers to focus more time on
  496. 21:11writing the business logic rather
  497. 21:13focusing on the configuration related
  498. 21:15things, right?
  499. 21:17That's it.
  500. 21:19What is the role of a Spring Boot
  501. 21:21Actuator?
  502. 21:23See, inside your palm deck XML {dot}
  503. 21:26XML, you can add one Spring Boot a
  504. 21:28Starter Actuator like this. Okay? So,
  505. 21:32it's a kind of a Spring Boot a Starter
  506. 21:34only.
  507. 21:35And you can also say that it's like a
  508. 21:37subproject inside the a Spring Boot
  509. 21:40framework. And what it actually does
  510. 21:43after adding this, if you will go inside
  511. 21:46your application {dot} properties file,
  512. 21:48and then you can add here these points,
  513. 21:51health and information.
  514. 21:53Now, if you run the application
  515. 21:55with the URL Actuator
  516. 21:58{slash} health in the URL, you will find
  517. 22:01the application status which is up.
  518. 22:04Okay?
  519. 22:05Meaning, by including Actuator endpoints
  520. 22:09like health, information, extra etc.,
  521. 22:11you can get information about your
  522. 22:13application in the browser itself. Okay?
  523. 22:17In short, you can monitor your
  524. 22:19application.
  525. 22:20And here in the application {dot}
  526. 22:22properties, if you use asterisk, that
  527. 22:26means all the Actuator endpoints are
  528. 22:29included. So, either you can select the
  529. 22:31Actuator endpoints health, info, etc.
  530. 22:35etc., or you can all include all the
  531. 22:38Actuator endpoints by just using the
  532. 22:40asterisk. Okay?
  533. 22:42That's the answer to this question, and
  534. 22:44the simplest definition is here.
  535. 22:47A Spring Boot Actuator is a subproject
  536. 22:50of a Spring Boot that provides
  537. 22:52production-ready features for monitoring
  538. 22:56and managing the Spring Boot application
  539. 22:59through various endpoints. That's it.
  540. 23:02All right, my friend. Now, only the last
  541. 23:05question left. If you have watched till
  542. 23:08here,
  543. 23:09great job. It shows your dedication and
  544. 23:14your focus for the interviews. I wish
  545. 23:17you all the best for your interviews and
  546. 23:20your career. And yes, again, if you
  547. 23:23don't want to miss anything and want to
  548. 23:25cover more topic-wise interview
  549. 23:28questions on Java, then check out my
  550. 23:31full Java interview course, which
  551. 23:34contains more than 350
  552. 23:37plus questions from all these topics.
  553. 23:42Or you can use my book also for your
  554. 23:46interview revision. Link of the full
  555. 23:49course and the book is given in the
  556. 23:52description of this video.
  557. 23:55What is process and thread? What is the
  558. 23:58difference between them? Before
  559. 24:00understanding multi-threading, let's get
  560. 24:02a high-level idea of the process and
  561. 24:05thread by comparing them.
  562. 24:07See, inside every software application,
  563. 24:10there are process and threads. For
  564. 24:12example, like this, I will take the
  565. 24:15example of Windows, which is also a
  566. 24:18system software. Now, suppose you open
  567. 24:21the Chrome browser in your Windows. When
  568. 24:24you open the Chrome browser, one process
  569. 24:27will be started and running like this.
  570. 24:30Now, inside your operating system, you
  571. 24:33can see this process in the task manager
  572. 24:36also, right?
  573. 24:38Now, inside this process, there can be
  574. 24:40many, many tasks executing. For example,
  575. 24:43when you enter the URL in the browser
  576. 24:46and send a request, that is one task.
  577. 24:49And then, the response which you are
  578. 24:51receiving, that is another task.
  579. 24:54Now, these tasks can be dependent on
  580. 24:57each other, okay?
  581. 24:59Now, listen carefully. For handling,
  582. 25:02executing, and finishing those multiple
  583. 25:04tasks, we can have multiple threads like
  584. 25:08this.
  585. 25:09Okay? These threads may or may not be
  586. 25:13dependent on each other. They might
  587. 25:16share the resources with each other.
  588. 25:19Resources means the data, the memory,
  589. 25:21files, etc.
  590. 25:23So, for example, in a browser, if you
  591. 25:26send the request, then that is one
  592. 25:29thread, and when the response is coming,
  593. 25:31so response is dependent on the request.
  594. 25:35That's how threads can be dependent,
  595. 25:37okay? Meaning, threads are dependent on
  596. 25:41each other.
  597. 25:42Now, after the browser example, now
  598. 25:45inside the same window, if you open one
  599. 25:48Excel file, like this.
  600. 25:50That is a different process number two,
  601. 25:54and it has no relation with process
  602. 25:57number one.
  603. 25:58Meaning, processes are independent of
  604. 26:01each other, okay? They do not share the
  605. 26:04resources like memory, data, etc.
  606. 26:07between them. That is process.
  607. 26:10And this process two again can have one
  608. 26:13thread, two thread, multiple threads,
  609. 26:16that depends.
  610. 26:18Now, yes.
  611. 26:19This is process three for opening a text
  612. 26:22file, notepad, okay? And it is also
  613. 26:25possible that a process can have only
  614. 26:28one single thread inside it.
  615. 26:32Remember, at least one thread by default
  616. 26:35will always be there inside a process,
  617. 26:39okay?
  618. 26:40Because
  619. 26:41threads only execute task. Process is
  620. 26:45just like a container, okay?
  621. 26:47So, great. That is the very high-level
  622. 26:49idea of the process and thread. And in
  623. 26:53the next slide here, I have written the
  624. 26:56differences between the process and
  625. 26:58thread. Basically, whatever I have
  626. 27:00explained, that's the same thing is
  627. 27:02written here. So that if you revise
  628. 27:04later, then you do not have to listen
  629. 27:06the whole video again and again. That
  630. 27:09will be very time-taking, right?

About this transcript

This page contains the full transcript of Top 10 Java Interview Questions for 10+ years experience by Interview Happy, generated from the public captions YouTube serves with the video. The transcript has 3,549 words across 630 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.