YouTube2Text

Java_D01 - Main Method || Data Types - [18-08-2026] — Transcript

by Tapacadlive · 16,091 words · 2,307 segments · language en · Watch on YouTube

Full transcript

  1. 0:05Great. Thanks for the confirmation.
  2. 0:13Very good afternoon everyone.
  3. 0:16>> No energy on. Good afternoon everyone.
  4. 0:19>> Great. So I think probably
  5. 0:22you might be actually wondering who is
  6. 0:24this fellow who is what he's going to
  7. 0:26teach and all. So let me introduce
  8. 0:28myself. My name is Harshett. I'm a
  9. 0:30senior technical trainer here at TAP
  10. 0:31Academy. So from the last four years I
  11. 0:34have been training multiple students. So
  12. 0:36I have seen different different people
  13. 0:38from different different colleges. So I
  14. 0:40don't statistically remember how many
  15. 0:42people I have trained around 50,000 plus
  16. 0:45uh students easily I could have trained
  17. 0:47in the last four years of my career. So
  18. 0:49the faces which I'm seeing right now
  19. 0:51might be new but the problem the
  20. 0:54struggle everything is already known for
  21. 0:56me and definitely for whatever purpose
  22. 0:59you are sitting in front of me I will
  23. 1:01make sure that that purpose will be
  24. 1:03fulfilled and before leaving this
  25. 1:05classroom definitely you'll get that
  26. 1:07confidence that okay something new we
  27. 1:09have learned today and you'll be
  28. 1:10confident about that as well. So if I'm
  29. 1:12not wrong, I think probably if you're
  30. 1:14sitting in this classroom, you have
  31. 1:16decided Java is going to be my backend
  32. 1:19language. If I'm not wrong, correct?
  33. 1:22Yes. Why particularly Java? I need not
  34. 1:25to say of course technically I'll be
  35. 1:27speaking a lot but non-technically you
  36. 1:30might have judged Python and Java in
  37. 1:32different aspects.
  38. 1:34Probably for the very first time in your
  39. 1:36lifetime also you thought Python only is
  40. 1:38easy if I'm not wrong. Later you
  41. 1:40realized okay to become a amazing
  42. 1:43back-end engineer maybe Java is most
  43. 1:45preferred though it is difficult let us
  44. 1:48compromise on difficulty but you'll get
  45. 1:50a stable growth you'll become a a better
  46. 1:52backend engineer a software engineer
  47. 1:54these might be the decision making
  48. 1:56factors for you people if I'm not wrong
  49. 1:58correct or one more way is how many how
  50. 2:01many of you are computer science
  51. 2:03background students please raise your
  52. 2:04hands oh my god I have just asked the
  53. 2:06wrong question so almost 90% % of the
  54. 2:10people are computer science. Anyone from
  55. 2:12mechanical, civil, electrical
  56. 2:14backgrounds?
  57. 2:16Okay, a couple of them. EC and Ale as
  58. 2:18well. Okay, a couple of them are there.
  59. 2:21But let me tell you Java is one of the
  60. 2:24biggest nightmare for EC, triple E,
  61. 2:27civil, mechanical for them programming
  62. 2:30language means C if not Python. These
  63. 2:32are the only two choices they had in
  64. 2:34college. Not now in college. So then you
  65. 2:38decided okay language means Python we
  66. 2:41never know that Java existed actually to
  67. 2:43be honest this is the reality of non CS
  68. 2:47background students the reality is they
  69. 2:49don't even know Java is there correct me
  70. 2:52if I'm wrong correct so in most of the
  71. 2:54colleges people doesn't even know
  72. 2:56[clears throat] what is Java they might
  73. 2:57have not even seen Java in their
  74. 2:59lifetime but probably for most of you
  75. 3:02already certain classes have been
  76. 3:03happening from a couple of weeks for
  77. 3:06certain people over here Maybe one week
  78. 3:07of classes you might be attending and
  79. 3:09this might be your seventh class or
  80. 3:10eighth class but doesn't matter we are
  81. 3:13going to completely focus on Java from
  82. 3:16scratch. So what is your previous
  83. 3:19knowledge I am not bothered about it
  84. 3:21I'll be actually teaching from scratch
  85. 3:23and let me tell you if you trust Java if
  86. 3:26you have that faith in Java it will take
  87. 3:28you somewhere that you can't even
  88. 3:30imagine. So today even today in the
  89. 3:33world of AI no one even can touch a Java
  90. 3:37developer who is an expertise in spring
  91. 3:39spring boot and all AI will replace and
  92. 3:41all that thing only remove it from your
  93. 3:43brain. Even after 5 years even after 10
  94. 3:46years a person who is an expertise in
  95. 3:48Java will still be relevant in IT
  96. 3:50industry. This is one fact I would like
  97. 3:53to start with. So one more thing why
  98. 3:56particularly Java sir my some of my
  99. 3:58friends are in Python class in SBI maybe
  100. 4:01I just came this to this class to see
  101. 4:03what will what will be there in Java
  102. 4:05maybe tomorrow the same strength can I
  103. 4:07expect or not I'm not sure maybe in the
  104. 4:09one and a half hour you'll decide you'll
  105. 4:11judge should I be in this class or
  106. 4:14should I go to Python you will judge it
  107. 4:15in the next one and a half hours right
  108. 4:17don't worry I will ensure you'll make a
  109. 4:19correct judgment okay don't worry about
  110. 4:21it and one more thing
  111. 4:24Why Java? The main important question
  112. 4:26sir, Python is also there, right? Why
  113. 4:28Java? In my classes, I'll speak about
  114. 4:31Java only. I hope you're understanding.
  115. 4:33I'll not apprise or I'll not appreciate
  116. 4:35Python. See as a language if you notice
  117. 4:38both are equally important and everyone
  118. 4:41has their own use cases situation based.
  119. 4:44But in my classes, I'll appreciate Java
  120. 4:46only. And you should not think this
  121. 4:47fellow is partial. I will be partial
  122. 4:49only. Are you understanding? because you
  123. 4:51have opted you have you have seriously
  124. 4:53selected that I want Java so I should
  125. 4:54speak advantages disadvantages also I'll
  126. 4:57speak but moreover why Java is what I'll
  127. 5:00be focusing on rather than why Python I
  128. 5:03don't want to make you to feel regret
  129. 5:05why you did not select Python I hope
  130. 5:07you're understanding so coming to the
  131. 5:09fact why Java I'll just give you some
  132. 5:12reasons you can just make sure that yes
  133. 5:15I took a right decision today any
  134. 5:18application that you're using if If you
  135. 5:20go to any shop, you'll make payment,
  136. 5:22right? How do you make the payment? UPI,
  137. 5:24which is nothing but phone pay, Google
  138. 5:26pay, uh, razor pay. So, different
  139. 5:28different options you have. All the
  140. 5:30banking application back end is still
  141. 5:33Java only. And even 10 years later also,
  142. 5:36I'm telling you, I can guarantee banking
  143. 5:39application backend code AI will not
  144. 5:42even touch.
  145. 5:44Company will never allow AI to be used
  146. 5:46in the banking softwares. I hope you're
  147. 5:49understanding. So large banking systems
  148. 5:52especially you might have heard JP
  149. 5:54Morgan similarly Goldman Sachs. So like
  150. 5:58this there are top tech banks
  151. 5:59international bank companies where still
  152. 6:02the back end is job still there are so
  153. 6:04many openings even today but the reality
  154. 6:07is that opportunity will meet only the
  155. 6:10right person. Opportunity is there but
  156. 6:12it will only meet the right person. Your
  157. 6:14fundamentals should be super strong and
  158. 6:18your syntax is actually the most
  159. 6:20important thing when you are writing a
  160. 6:22Java code. What is a class? When to
  161. 6:24create a class? When object should be
  162. 6:25created. So different different thought
  163. 6:27processes are very important.
  164. 6:30Architecture level thinking is important
  165. 6:32to get into that companies.
  166. 6:34One more thing today most of you are
  167. 6:37using applications. Whatever phone pay
  168. 6:38you told where are you using in your
  169. 6:40mobile phone every mobile phone will
  170. 6:42have operating system and in India
  171. 6:45almost 70 to 80% of the users are
  172. 6:47Android users and Android is an
  173. 6:50operating system it is a software only
  174. 6:52right the back end of Android is Java
  175. 6:55most of the top tech companies like Meta
  176. 6:58and FA that is what Facebook or Meta
  177. 7:00both are same Google Microsoft and most
  178. 7:04of these companies also they have
  179. 7:05multiple products still Java only is
  180. 7:08preferred. So which means a job which
  181. 7:11can pay you 3.5 lakhs peranom all the
  182. 7:13way till 35 lakhs peranom in this entire
  183. 7:16broad range Java has a lot of relevance.
  184. 7:19So enough appreciating Java let's go
  185. 7:23into technical part and understand all
  186. 7:25these things. Anyways
  187. 7:27already few knowledge you already have
  188. 7:29about Java right. So Java is a
  189. 7:32objectoriented language. It's a platform
  190. 7:34independent language. It's a robust
  191. 7:36programming language. A lot of features
  192. 7:38you might have gone through and we'll go
  193. 7:40deeper into every feature. And few
  194. 7:42things I would like to ask you people
  195. 7:44before me speaking. What do you mean by
  196. 7:46platform independence?
  197. 7:51>> Huh?
  198. 7:55>> Okay. Can you see already problem
  199. 7:57started? What is the problem? Not able
  200. 8:00to answer the question which already you
  201. 8:03know isn't it? Do you know what is
  202. 8:06platform? Yes. So operating system means
  203. 8:08platform. We already know. You know what
  204. 8:10is independent? Yes. Not being
  205. 8:12dependent. So Java is a platform
  206. 8:16independent language. Which means Java
  207. 8:19doesn't care which OS you're using. Long
  208. 8:22story short. So compilation can happen
  209. 8:24in one OS. Execution can happen in any
  210. 8:27OS. This is the feature of Java and
  211. 8:31Python also. But I'll not speak about
  212. 8:32Python. I told you. So why Java is very
  213. 8:36famous if you ask me this is the number
  214. 8:37one reason and trust me today whatever
  215. 8:40software that you built in Windows can
  216. 8:42be used by Mac user also can be used by
  217. 8:45Linux user also but the problem with C
  218. 8:48and C++es you need to compile in every
  219. 8:51operating system to serve all the users
  220. 8:54that is the problem who will develop
  221. 8:55again and again so that is the first
  222. 8:57thing and how did Java achieve this is
  223. 9:00the next question how
  224. 9:02because of to important changes that
  225. 9:04happens the compiler the Java compiler
  226. 9:08will never give you zeros and ones it
  227. 9:10will give you something known as byte
  228. 9:12code and what is the extension of byte
  229. 9:15code
  230. 9:16>> class dot class if you did not
  231. 9:19understand I will write a Java file I'll
  232. 9:21save it what is extension dot Java if I
  233. 9:25save a C program C for C++ CP for Python
  234. 9:29py so for text file notepad you'll type
  235. 9:32something you'll save it. What is
  236. 9:34extension? txt pdf means dot pdf like
  237. 9:37that byte code also will have an
  238. 9:39extension no that is dot class that is
  239. 9:42the extension you can't understand what
  240. 9:44is there inside that who can understand
  241. 9:47only one software can understand that is
  242. 9:49java virtual machine so java virtual
  243. 9:52machine the primary task is to take byte
  244. 9:55code convert into zeros and ones and
  245. 9:57execute it. The next obvious question
  246. 10:00they can ask you is is JVM platform
  247. 10:03dependent or independent?
  248. 10:06Listen to the question very carefully.
  249. 10:08Java you told sir platform independent
  250. 10:10we know it. JVM is it platform dependent
  251. 10:13or independent?
  252. 10:15>> Independent.
  253. 10:17>> Dependent.
  254. 10:18>> Are you sure?
  255. 10:20>> Okay. JVM is platform dependent because
  256. 10:24in my Windows OS I can't install Mac OS
  257. 10:27JVM. Right. It is specific. It is
  258. 10:30dependent on my OS. Are you
  259. 10:32understanding? So this is one thing you
  260. 10:34should understand. Java as a language is
  261. 10:36platform independent. But JVM as a
  262. 10:38software is platform dependent. Don't
  263. 10:41get confused. Are you understanding? So
  264. 10:43this is how the architecture of Java
  265. 10:45looks like. So high level give it to
  266. 10:47compiler. Compiler gives you byte code.
  267. 10:50Byte code will be given to JVM. Next JVM
  268. 10:52will give you zeros and ones. So because
  269. 10:54of this byte code and JVM it was
  270. 10:57possible for you to achieve platform
  271. 10:59independence. So in an interview if they
  272. 11:02ask you can you explain how Java
  273. 11:04achieved platform independence. How
  274. 11:05would you answer simple don't buy heart
  275. 11:09when I give an answer answer like this
  276. 11:11it need not to mean that you should buy
  277. 11:12heart it's a framework oh step one step
  278. 11:15two step three point wise first explain
  279. 11:18what is platform independence. So, Java
  280. 11:20is such a programming language which is
  281. 11:22not dependent on OS. It can be compiled
  282. 11:25in one OS. It can be executed in any OS.
  283. 11:27This is the meaning of platform
  284. 11:28independent. Coming to the point how it
  285. 11:30is achieved. Simple same architecture
  286. 11:33you explain. So, compiler gives me byte
  287. 11:36code. That bite code is given to JVM.
  288. 11:38JVM will actually execute the zeros and
  289. 11:40ones. So, this is how Java has achieved
  290. 11:43platform independence. I can compile in
  291. 11:44one OS, execute in any OS. This is how
  292. 11:47you need to explain. And also Java is
  293. 11:50not dependent on your microprocessor
  294. 11:52also. You use i3, i5, i9, AMD, Ryzen 5
  295. 11:57doesn't matter. So it is architecture
  296. 12:00neutral. Architecture means what?
  297. 12:02Design. Whose design? Not computer
  298. 12:06design. Microprocessor design. I hope if
  299. 12:09you are a computer science student at
  300. 12:11least some somewhat technical knowledge
  301. 12:13you'll be having, right? Every processor
  302. 12:15has a different design, different cores,
  303. 12:18different threads. You might have
  304. 12:20noticed, right? So 60 bit uh 64-bit
  305. 12:23processor, 32-bit processor, every
  306. 12:25processor is unique. And the fun fact is
  307. 12:29just in i5, you know, right? Just in i5
  308. 12:32only 10 variants will be there if you
  309. 12:33don't know. So processors are having
  310. 12:36variety of variants. So is Java
  311. 12:39dependent on it? No. It's architecture
  312. 12:41neutral. It's also known as a portable
  313. 12:44language. Why? Very simple. I can
  314. 12:46compile over here. I can execute in all
  315. 12:48of your systems. It's easily
  316. 12:50transportable. That bite code I can send
  317. 12:52it to you. Are you understanding? Easily
  318. 12:54transported. So these are some essential
  319. 12:56features which you have seen. Later you
  320. 13:00understood there is something called as
  321. 13:01object orientation. The most important
  322. 13:04principle. I think some fundamentals
  323. 13:06were explained for you. What is object
  324. 13:08orientation?
  325. 13:11C++ is object-oriented. Java is
  326. 13:13object-oriented. JavaScript is
  327. 13:15object-oriented. Python is
  328. 13:16object-oriented. Scala is
  329. 13:17object-oriented. All the languages which
  330. 13:19are there right now are object-oriented
  331. 13:21only. What is object oriented?
  332. 13:23>> Perception.
  333. 13:26>> Okay. Great. Yes. Next.
  334. 13:29>> Perception.
  335. 13:30>> Perception. What perception?
  336. 13:33>> How we see?
  337. 13:35>> So basically how we see something as an
  338. 13:37object. Great. Any other answers?
  339. 13:40Okay, very simple. There are three
  340. 13:41points which you have learned. One is
  341. 13:44this any this world whatever you see
  342. 13:46it's a collection of objects everything
  343. 13:48is an object including me including you
  344. 13:50also everything is a collection of
  345. 13:52objects and every object if you notice
  346. 13:54belongs to one category I belong to
  347. 13:56teacher category you belong to you're
  348. 13:58not a student anymore fresher category
  349. 14:00remove that from mind first you're not a
  350. 14:02student you're a fresher you are a you
  351. 14:04are you have graduated that is how I
  352. 14:06think I never see you people as a
  353. 14:08student I'll be very clear I have here I
  354. 14:11have I'm there over to serve one purpose
  355. 14:14to get you placed at any cost. At any
  356. 14:16cost but are you really ready to put
  357. 14:19that effort is the question you answer
  358. 14:21yourself. So I am here to place you as
  359. 14:24fast as possible and equally you should
  360. 14:27also put effort. So that is the only
  361. 14:29purpose. You in my eyes maybe you can
  362. 14:32think you are my student but I think you
  363. 14:35are a candidate who came out of college
  364. 14:38in this city where it's very expensive
  365. 14:41and you are here to hustle to get a job
  366. 14:44as soon as possible to make your dreams
  367. 14:46fulfilled. So let's work to that
  368. 14:48particular goal. Don't get distracted
  369. 14:50unnecessarily. Now itself I'm saying
  370. 14:53everyday motivational talks I'll not
  371. 14:55give. I'm saying right now I'm not such
  372. 14:57person who will come and give
  373. 14:58motivational talks. Don't you think if I
  374. 15:02motivate for 10 minutes I personally
  375. 15:05feel it is time waste. Why sir if you
  376. 15:07ask me in that 10 minutes I could have
  377. 15:09taught you a concept which can be asked
  378. 15:11in an interview. Are you understanding?
  379. 15:14And again, don't get me wrong. If you're
  380. 15:18expecting someone else to motivate, your
  381. 15:21mindset is weak. I'm repeating this. If
  382. 15:25you're expecting, sir, someone will
  383. 15:27motivate, I'll become motivated, then I
  384. 15:29will start. Which means already you have
  385. 15:32told to yourself, I'm weak. Please stop
  386. 15:35pretending all these things. So don't
  387. 15:38wait for others to motivate. Why should
  388. 15:40someone motivate you?
  389. 15:42So this is what you have done in your
  390. 15:44last four years of engineering
  391. 15:46motivation then only study. So enough no
  392. 15:50one is going to motivate have self
  393. 15:51motivation I should do that's it there
  394. 15:53is no uh what do you call reasons for
  395. 15:55giving that so please do it if it is
  396. 15:57required you should do it at any cost
  397. 15:59anyways coming back to the point so next
  398. 16:02every object belongs to a category is
  399. 16:04what we understood what is a category
  400. 16:06basically I belong to teacher you belong
  401. 16:08to fresher next this belongs to
  402. 16:10electronic gadget whatever it belongs to
  403. 16:13furniture so like the different
  404. 16:14categories you can categorize in Java
  405. 16:18Specifically that category we call it as
  406. 16:20class.
  407. 16:22Class is not real. It is imaginary. If
  408. 16:25you did not understand you want to
  409. 16:27construct a house. Basically there is a
  410. 16:30blueprint. Is it reality? No. It is just
  411. 16:33an imagination. Okay. Architect has
  412. 16:35thought. This can be the plot. Maybe 4
  413. 16:38BHK duplex. Just thought is thought only
  414. 16:42right? It is it is it real? No. It takes
  415. 16:448 months or 1 year to bring it to
  416. 16:48reality. Maybe in Bangalore if you want
  417. 16:50to do that at least three crores you
  418. 16:52require only building I'm saying land 1
  419. 16:5515 crores you require this is the
  420. 16:57reality especially in BTM core Mangala
  421. 17:01JP Nagar Jagar one square ft will touch
  422. 17:0530,000 if you don't know 30,000 is one
  423. 17:09square one square ft you know how much
  424. 17:12it comes if you want to construct a very
  425. 17:14good house at least they said 30 40 site
  426. 17:17you remember what do you mean by 30 40
  427. 17:2030 + 40 1 1200 square ft² you require in
  428. 17:24that case 8 9 crores just for land that
  429. 17:27is a reality where are we we should
  430. 17:30think are you understanding can we
  431. 17:33achieve it yes you should hustle a lot
  432. 17:36it is possible one day but when is that
  433. 17:38one day I don't know you you should
  434. 17:41answer for yourself are you
  435. 17:42understanding so anyways that is not the
  436. 17:46point so I was just speaking about
  437. 17:48something that whatever object you are
  438. 17:51able to see it belongs to class. Class
  439. 17:53is not real. It is just imaginary. But
  440. 17:55what is real? That house which you
  441. 17:57construct is real. The object is real.
  442. 18:00When I say real in reality in your
  443. 18:02computer, in your RAM, it is created.
  444. 18:05Some storage, some space is created. It
  445. 18:08is real. Are you understanding? Later
  446. 18:12you understood one most important point.
  447. 18:14Every object has something some
  448. 18:17properties name, age, gender, which
  449. 18:20technologies I teach. These are all my
  450. 18:22properties. I can also do something. I
  451. 18:25can teach, I can run, I can sing, I can
  452. 18:28dance. So different different actions
  453. 18:29also I can perform. But coming to Java's
  454. 18:32perspective, whatever I told has is
  455. 18:35taken care by variables or data types
  456. 18:38basically. So using data types, you can
  457. 18:40store the properties. Sir what about
  458. 18:43behavior methods don't use function
  459. 18:47function is not the terminology of Java
  460. 18:49we call the math method I think some
  461. 18:51glimpse might be given by your sasar
  462. 18:53correct so this was understood for you
  463. 18:56by Java that's it nothing extra you have
  464. 18:59learned and completely you focused on
  465. 19:01logic building problem solving arrays
  466. 19:04all those things but I'll be completely
  467. 19:07teaching you the theoretical part where
  468. 19:09in technical facetoface 100 cross
  469. 19:12questions they can ask you every
  470. 19:14question they ask you can answer that is
  471. 19:16my guarantee by the end of these Java
  472. 19:17classes so but one expectation from
  473. 19:20today I'll make it very clear so in my
  474. 19:24classes I will not tolerate people using
  475. 19:27mobile phones unnecessarily unless if
  476. 19:29anything is important you can take a
  477. 19:31picture I have no problem next if you
  478. 19:34want you can take notes when I say notes
  479. 19:37for example I'll teach something known
  480. 19:38as encapsulation let us assume sir
  481. 19:40encapsulation Sir please tell me what is
  482. 19:42a definition sir please tell me what is
  483. 19:44a spelling no in my class notes means
  484. 19:48important points maybe two three points
  485. 19:50that's it I will give you a descriptive
  486. 19:52comprehensive notes already printed
  487. 19:55notes is given for you people on the top
  488. 19:57of which whatever I speak in this class
  489. 20:00you want that also that also will be
  490. 20:02provided I'll tell you how exactly as
  491. 20:04days progresses so notes don't think too
  492. 20:07much about notes in my class you should
  493. 20:09only think about one
  494. 20:11understanding the concept. How will they
  495. 20:14ask in the interview? Why will they ask
  496. 20:16in the interview? Where is it used in
  497. 20:18the real world software application?
  498. 20:20That's it. So later recording is there,
  499. 20:23notes is there. You prepare for yourself
  500. 20:26in the class. Don't deviate yourself.
  501. 20:29Your friend did not understand asking
  502. 20:31you. No, no problem. After the class
  503. 20:34half an hour, I'll wait there itself.
  504. 20:35You can come and ask me any doubt. Are
  505. 20:38you understanding? in Java sir python
  506. 20:40dot go to that classroom understood so
  507. 20:43this is what I expect so let's continue
  508. 20:48and let's start a quick revision is
  509. 20:50required before me directly starting
  510. 20:52today's concept so I think probably some
  511. 20:55programs you might have solved data
  512. 20:57types introduction was given for you you
  513. 20:59remember so what is a data type
  514. 21:01according to you simple sir usually this
  515. 21:03world is not of binary your name my name
  516. 21:07my mobile number your height, your
  517. 21:09weight, is it in zeros and ones? No. But
  518. 21:12unfortunately, my computer cannot
  519. 21:15understand all these things. It can't
  520. 21:17understand my name. It can't it can't
  521. 21:20store my number. So, it can only store
  522. 21:22zeros and ones. My processor can process
  523. 21:25only zeros and ones. My RAM can store
  524. 21:28only zeros and ones. So, what to do?
  525. 21:30They understood we require a converter.
  526. 21:33In every programming language, there is
  527. 21:35a converter. So data type is a facility
  528. 21:38where it will convert the real world
  529. 21:40data into zeros and ones as simple as
  530. 21:42that. Are you understanding? So that is
  531. 21:45the purpose of data types. In every
  532. 21:47language data type is there. But in some
  533. 21:50languages like Python and JavaScript
  534. 21:53explicitly you will not mention int a
  535. 21:55equal to and all you will not say that
  536. 21:58is the syntax basically but data types
  537. 22:00will be there. Are you understanding? So
  538. 22:02anyways, let's start writing our first
  539. 22:05Java program today. Understand
  540. 22:07technically. So what I'll be doing is in
  541. 22:09my classes to teach Java, I'll be using
  542. 22:12Eclipse. I think you might also have
  543. 22:14been familiar with this. You can use
  544. 22:16Eclipse. You can use IntelliJ also if
  545. 22:19you want. Okay. But I'll be preferring
  546. 22:21Eclipse itself. So this is how the
  547. 22:23Eclipse looks like. I will show you how
  548. 22:25to set up the project also if you don't
  549. 22:27know. So quickly I'll just open my
  550. 22:31screen.
  551. 22:33Okay.
  552. 22:36Okay. So this is how the Eclipse
  553. 22:38interface looks like for a first time.
  554. 22:40All these things will not be there. I'll
  555. 22:42just remove everything. This is how
  556. 22:44blank it will be like. Okay. Step one.
  557. 22:46Can you see on the top? There is
  558. 22:47something as file. Click on the file.
  559. 22:50You can see new. When you see new, you
  560. 22:52can see Java project. Now sir, what is
  561. 22:54that Maven project? What is that spring?
  562. 22:56It's not for today. We'll keep it for
  563. 22:59later in project building sessions in
  564. 23:01your advanced Java. You'll get to know
  565. 23:04all those things. But for today, what is
  566. 23:06Java project? You need to understand
  567. 23:08very simple. It's a place where I can
  568. 23:10write my Java code. As simple as that.
  569. 23:12But some people might come for me and
  570. 23:14say, "Sir, I'm not able to see the Java
  571. 23:16project. There is a problem with my
  572. 23:18Eclipse." No problem. Sometimes the
  573. 23:20perspective might have been changed.
  574. 23:22There are two perspectives. One is Java,
  575. 23:25one is Java E. In Java double if I click
  576. 23:28on file and new obviously I'll not see
  577. 23:30Java project. So if you got the problem
  578. 23:33what you should do just go over here and
  579. 23:35click on Java project. So Java project
  580. 23:38that icon only I'm not able to see. Then
  581. 23:40what should I do for that? Go to window
  582. 23:43go to perspective and click on open
  583. 23:46perspective and you can get Java. Are
  584. 23:48you understanding here also you can get
  585. 23:50it. Anyways we are already in Java. It
  586. 23:51will not show. Next click on file new
  587. 23:55Java project. It will show you a pop-up.
  588. 23:59What is the name? For example, I'll say
  589. 24:01Java.
  590. 24:03Uh maybe I'll say what is the month for
  591. 24:05today. I'll say August. So I'll say Java
  592. 24:08August like this. Uh and I'll say new
  593. 24:10just for example. Next it is asking what
  594. 24:13JRE do we want? All those things are
  595. 24:15none of our business for today. Let's
  596. 24:17ignore it. So directly I'll click on
  597. 24:19finish. But wait module info on Java.
  598. 24:23You're able to see right? Never ticket.
  599. 24:25So keep it like that itself. Okay. So
  600. 24:27I'll just click on finish. So brand new
  601. 24:30Java project got created. Now once Java
  602. 24:33project is created, you should type you
  603. 24:35should start typing. So you need to type
  604. 24:36it in a class. So I'll just create a new
  605. 24:40class like this. And the name of the
  606. 24:41class today is your day one of Java
  607. 24:43class. So I'll say day one. And as I
  608. 24:45want main method, I'll say finish.
  609. 24:48This is how you can set up your Eclipse.
  610. 24:51Clear? Great. Now the moment I actually
  611. 24:55open this code, you can see one thing
  612. 24:57already. It is available. What is class?
  613. 25:00I hope all of you know it. Class is
  614. 25:02something which is imaginary. And let me
  615. 25:04tell you, every line of code in Java
  616. 25:08should compulsory be inside class. Are
  617. 25:11you understanding? One line outside
  618. 25:13class you can't write. I hope you're
  619. 25:16getting the point. Now 100 questions you
  620. 25:18might have. Sir, can we create more than
  621. 25:20one class? Can we create 100 classes?
  622. 25:22All those answers you will get it. Don't
  623. 25:24worry. Are you understanding? So what is
  624. 25:26the first rule? Every line of code
  625. 25:28should be inside a class itself. Outside
  626. 25:30you cannot write. This is the first rule
  627. 25:32of Java. Next, if you want your Java
  628. 25:36program to execute compulsory, there
  629. 25:38should be one method. What is that
  630. 25:40method? Main method. What is main
  631. 25:42method? Very simple. See if you notice
  632. 25:46public static void main string arcs.
  633. 25:50What is this public static void main
  634. 25:52string arcs? I just want to give a
  635. 25:54glimpse then we can start actually
  636. 25:55continuing. So let me close this
  637. 26:00observe.
  638. 26:02See I think probably this was the code
  639. 26:05when you have seen I think uh on the day
  640. 26:07of object orientation you remember. So
  641. 26:10there is something as class car. We have
  642. 26:13name, cost, mileage, start, accelerate,
  643. 26:17stop. Some methods are also there. Now,
  644. 26:20unfortunately, this code if I execute it
  645. 26:23will not work. Why? If you ask me in my
  646. 26:25computer, yes, there is my J JVM and all
  647. 26:29all those things also might happen, but
  648. 26:31especially JVM will tell you I cannot
  649. 26:33execute it because main method is not
  650. 26:37found. Now, why exactly is that problem?
  651. 26:39If you ask me, observe very carefully.
  652. 26:41See I have Windows operating system I
  653. 26:44also have something known as uh what do
  654. 26:46you call Mac OS at the same time I also
  655. 26:48have Linux operating system was it
  656. 26:50already taught for you earlier yes so
  657. 26:53I'll just give a glimpse again I don't
  658. 26:55want to go deeper because already you
  659. 26:56know every operating system if you
  660. 26:58notice definitely who is the boss of
  661. 27:01your computer operating system your RAM
  662. 27:04your hard disk your GPU your CPU
  663. 27:07whatever you name OS only will control
  664. 27:10it similar Clearly think about it. I
  665. 27:12will write one Java code. Where is it
  666. 27:15stored? Where is it stored? Inside RAM
  667. 27:18itself. Sir, I don't know what you are
  668. 27:20speaking about. I'll show you. Observe.
  669. 27:22See if I just search for something
  670. 27:24called as task manager.
  671. 27:28I hope everyone might have seen at least
  672. 27:30this once in a lifetime. This is only
  673. 27:32the virtual representation of your RAM.
  674. 27:35If you notice one thing, out of 32GB is
  675. 27:38the RAM. out of that 47% of the RAM is
  676. 27:42used by whom? By any desk, by eclipse,
  677. 27:45by chrome, by mirroring 360. So all the
  678. 27:48softwares are using my RAM currently.
  679. 27:51And somewhere I'll type my Java program.
  680. 27:53It is in Eclipse only, right? Where is
  681. 27:54Eclipse inside RAM? So, so what I'm
  682. 27:57trying to say is the Java program which
  683. 27:59I typed currently it is in my RAM. So
  684. 28:02who should give permission for the RAM?
  685. 28:03Operating system. Now operating system
  686. 28:06will not give anywhere it want. it'll
  687. 28:08give to main method. Are you
  688. 28:10understanding? So whatever you call your
  689. 28:12main method is the entry point of your
  690. 28:15Java program. Clear? So let me close
  691. 28:18this. Yes. So what I'm trying to say is
  692. 28:22for all the programming languages of
  693. 28:23this world main method is compulsory. Of
  694. 28:26course something like Python and
  695. 28:28JavaScript is exclusive for the main
  696. 28:31method is not required. Internally it
  697. 28:32will be already there. So the permission
  698. 28:34whichever is required is provided by
  699. 28:37something called as main method or main
  700. 28:40function. Are you understanding? Let's
  701. 28:42understand. Imagine in C programming if
  702. 28:45I want to print hello world already you
  703. 28:47know include std io. Something you'll
  704. 28:49say right and some void main you'll
  705. 28:51write and you'll say quickly print f
  706. 28:53hello world. And your teacher used to
  707. 28:56say void main compulsory. You never
  708. 28:58cross question why compulsory no answer.
  709. 29:01Why is it compulsory? Because my
  710. 29:04operating system should give permission
  711. 29:06for my program and that control of
  712. 29:09execution will always be given only for
  713. 29:12one function that is main function. Are
  714. 29:15you understanding? No problem. Even if
  715. 29:17you know all of this just think today is
  716. 29:19a revision class from tomorrow we'll go
  717. 29:21much deeper. Don't worry about it. So
  718. 29:24now this main function is exists right?
  719. 29:26That is the reason permission is given
  720. 29:28printing will happen on the screen. But
  721. 29:30same thing if I should write it in
  722. 29:32Python simply you'll say print that's it
  723. 29:35but same thing if I should write in Java
  724. 29:37observe carefully
  725. 29:40include and all I should not I'll just
  726. 29:41ignore it in Java first and foremost
  727. 29:45void main is compulsory but before void
  728. 29:48main something you should write already
  729. 29:49you know it so it is none other than
  730. 29:51public and static but why public and
  731. 29:54static might be the question let us
  732. 29:56understand in the easiest way possible
  733. 29:58now before understanding Learning public
  734. 30:00static to print something in Java you
  735. 30:03should understand something there are
  736. 30:05two things you should understand one is
  737. 30:07input one is output printing is an
  738. 30:10output thing right it is output so you
  739. 30:13should actually attach one pipe I think
  740. 30:15you might have learned that pipe
  741. 30:17technically is called as output stream
  742. 30:20what is that output stream and the name
  743. 30:22of that stream is system out so
  744. 30:26system.out out is an output string and
  745. 30:29ultimately what you want to do I want to
  746. 30:31print something so I should call
  747. 30:33system.out out output string and I'll
  748. 30:35say dot print or print ln or print f
  749. 30:39also you can say so print print ln print
  750. 30:42f there are three print statements what
  751. 30:45is the difference you'll understand next
  752. 30:47I want to print hello world I'll
  753. 30:48directly say clear next now observe
  754. 30:52control will be given but unfortunately
  755. 30:55I told you the most important rule in
  756. 30:56Java what is that without a class can
  757. 31:00you write this no so what is expectation
  758. 31:02if you ask me Java will not allow it
  759. 31:05expect something where is class so I'll
  760. 31:08write class demo opening closing
  761. 31:12understand one thing what do you mean by
  762. 31:14opening bracket and closing bracket this
  763. 31:16is the starting of the class this is the
  764. 31:18ending of the class technically this we
  765. 31:21call it as a block
  766. 31:23unfortunately in Python that block does
  767. 31:25not exist you'll use colon okay anyways
  768. 31:27ignore so void main opening closing
  769. 31:31understood so this is So we write now
  770. 31:34observe yes class is there main method
  771. 31:36is there it will work right? No it will
  772. 31:37not work because class is there but main
  773. 31:40method is not visible for your operating
  774. 31:43system. Are you understanding? So main
  775. 31:46method should definitely be public. You
  776. 31:49just think about it. Public means what?
  777. 31:51Forget about Java for the time. Public
  778. 31:53means what?
  779. 31:55>> Public transport. Public toilet.
  780. 31:57Basically everyone can access it.
  781. 32:01Public transportation is accessible by
  782. 32:03everyone right but unfortunately right
  783. 32:05now in Bangalore and Hyderabad it is not
  784. 32:07accessible by everyone only accessible
  785. 32:09by such people who can use it for free I
  786. 32:12hope you're understanding so today a
  787. 32:15person even I'll pay 50 rupees please
  788. 32:17give me seat no you'll not get it that
  789. 32:20is how the situation has happened but
  790. 32:21anyways what I'm trying to say is public
  791. 32:24is accessible by everyone and whatever
  792. 32:27public you're seeing over here also
  793. 32:29serves the same purpose public is for
  794. 32:32accessibility only. It's called as an
  795. 32:35access modifier
  796. 32:37which will help your Java to access this
  797. 32:40main anywhere in the Java project. Are
  798. 32:44you understanding? Anywhere in your
  799. 32:46entire Java project, you can access main
  800. 32:48method because it is public. It is
  801. 32:49available for everyone. Clear? But
  802. 32:53unfortunately, think about it very
  803. 32:55carefully. I want you to go back and
  804. 32:57understand that object orientation
  805. 32:59class.
  806. 33:00If you want to call a method, imagine I
  807. 33:03want to start the car. Tell me how did
  808. 33:05you start the car? I don't I'll put key
  809. 33:07and I'll start. No, that is not what I'm
  810. 33:09asking. I'm asking in Java, how do you
  811. 33:11start a car?
  812. 33:14>> First thing I'll create an object of the
  813. 33:16car. Then I'll say C1 is the reference.
  814. 33:20C1 dot start. You told you remember. But
  815. 33:24if you notice one thing, main is also
  816. 33:26method only. Start also was method only.
  817. 33:29Now the question is if main method
  818. 33:31should be called first create an object
  819. 33:33of demo which means if you really wanted
  820. 33:36to call main method what you should do
  821. 33:38I'll just go over here. I'll say let me
  822. 33:41create a brand new object of car.
  823. 33:45This is how you used to do earlier but
  824. 33:47this time it is not car over here. It is
  825. 33:49demo because demo class. So I'll just go
  826. 33:52and say new demo. Next for every object
  827. 33:56naming is compulsory. If you did not
  828. 33:58understand you people have names right.
  829. 34:01Why?
  830. 34:03Simply
  831. 34:05because I can access your data. I want
  832. 34:08to know your CGP. Your name your height.
  833. 34:10I'll access through your name. Object is
  834. 34:12there but no name. How will you access
  835. 34:14it? Name is compulsory. That name we
  836. 34:16call it as a reference. I will name it
  837. 34:19as D. and D is of type demo
  838. 34:24clear sir why are we saying this type
  839. 34:27and all you'll understand don't worry
  840. 34:28about it now object is ready can I call
  841. 34:31this method yes so I should just go and
  842. 34:34say d dot main
  843. 34:39now just think about it who should do
  844. 34:41all these things will os do all these
  845. 34:44things why operating system should do
  846. 34:47all those things is operating system a
  847. 34:48Java developer know then who should do
  848. 34:52you should only do it as a developer I
  849. 34:54should only do all these things but I
  850. 34:56don't want to do it so I want to
  851. 34:59completely skip this
  852. 35:02just to print one statement object
  853. 35:05already you people are frustrated this
  854. 35:06is so so complicated again object should
  855. 35:09be created main method should be called
  856. 35:12so how to skip all these things they
  857. 35:13told don't worry
  858. 35:16how to access this method without object
  859. 35:18creation I'll give you one keyword that
  860. 35:21keyword is none other than static. So of
  861. 35:24course without static it will not work.
  862. 35:26So compulsory static is should be used.
  863. 35:29So which means let me rewrite it. Main
  864. 35:31method should compulsory be public. It
  865. 35:34should be static and void main as it is.
  866. 35:38And now think about it. Simply open
  867. 35:40bracket close bracket you should not
  868. 35:42say. You should say something called as
  869. 35:44string arts. Now what is the string
  870. 35:46arts? I'll tell you don't worry. Clear?
  871. 35:49Why is it public?
  872. 35:52>> So that it can be accessible by
  873. 35:54everyone. Why is it static? So that I
  874. 35:56can call this method without object
  875. 35:59creation. That is the most important
  876. 36:00point. And void in English is nothing.
  877. 36:06Do you see this method returning
  878. 36:08anything for you? No. Do you see any
  879. 36:10return statement? I don't see anything.
  880. 36:12So it is not returning. Nothing means
  881. 36:14void. Name of the method is main. That
  882. 36:17is my main string arcs in RS. I'll teach
  883. 36:20you. Are you understanding? So this is
  884. 36:22how the main method got evolved. Simply
  885. 36:25by hearting public static void main is
  886. 36:27one set of people. Understanding the
  887. 36:30true meaning is another set of people.
  888. 36:32And such people who understand every
  889. 36:34word use case will become better
  890. 36:36engineers. As simple as that. People who
  891. 36:39just buyarted and become an engineer
  892. 36:41will still be there only floating. They
  893. 36:43will never a they will be never able to
  894. 36:45solve the real problems always someone
  895. 36:48should give them the task they should do
  896. 36:49it but I want you people to be in such a
  897. 36:52position where you should be able to
  898. 36:53give the tasks for others that is only
  899. 36:56possible if you know in and out of a
  900. 36:57software every word you should know it
  901. 37:00and I'll ensure you'll understand clear
  902. 37:03so anyways now public static void main
  903. 37:05everything is great now print statement
  904. 37:06will definitely be executed
  905. 37:09clear so this is the story of your main
  906. 37:12method
  907. 37:13So which means over here if I just go
  908. 37:16back
  909. 37:19if I want to execute anything definitely
  910. 37:21it should be public static void main
  911. 37:23next sometimes if main method is not
  912. 37:25there in your program you can use a
  913. 37:28shortcut what is that if you ask me just
  914. 37:30go and say main control space you'll get
  915. 37:33one shortcut you can say enter so I'll
  916. 37:36also explain you all the shortcuts that
  917. 37:38is used by Java developers clear so what
  918. 37:40is a shortcut if you ask me Always just
  919. 37:43go and say main name of the method you
  920. 37:44should know. Control space enter. Is
  921. 37:48this clear? That's it. Now you want to
  922. 37:51print something. Tell me how do you
  923. 37:52print something? Uh system dot very
  924. 37:55boring statement, right? So do one
  925. 37:57thing. Just go and say sis out. Sis out
  926. 38:00is the shortcut. Again control space
  927. 38:03enter.
  928. 38:04Clear. So let me show you uh show it for
  929. 38:07you people. So observe. So if I want any
  930. 38:11shortcut just go and say sy
  931. 38:14control space if you you'll get
  932. 38:15suggestions enter
  933. 38:18clear but then in your pycharm and all
  934. 38:20you'll get suggestions there itself
  935. 38:22inline suggestions all such options in
  936. 38:24eclipse you don't have understood so if
  937. 38:26you want to print anything you can just
  938. 38:28go and say hello to day one but oh sorry
  939. 38:33traditional way we need to do it so
  940. 38:35hello world only is the first program I
  941. 38:37want to print so I'll say hello world
  942. 38:39click clear after that I can start with
  943. 38:41the second thing so I'll say hello to
  944. 38:43day one
  945. 38:46any confusions of course very basic but
  946. 38:49very important why do you think people
  947. 38:51always teach hello world only at
  948. 38:53starting
  949. 38:55why
  950. 38:57it's the tradition okay I'll ask you a
  951. 38:59very simple question if anyone calls you
  952. 39:01what is the first word you speak
  953. 39:03>> why tradition
  954. 39:06>> I'll tell you the fact hello is the name
  955. 39:08of a I mean
  956. 39:11you know or you don't I don't know like
  957. 39:14you only I also saw in a so basically
  958. 39:17the person who actually invented the
  959. 39:18mobile I mean telephone back then he
  960. 39:21don't know what to speak with his wife
  961. 39:23he told hello from then it started to
  962. 39:25become a tradition today also hello so
  963. 39:28every time we speak with a person we are
  964. 39:31remembering her name hello anyways
  965. 39:33similarly like that for every program
  966. 39:35any language hello world is the first
  967. 39:37program tradition okay anyways
  968. 39:40So I hope this much clarity got it
  969. 39:42great. I think in the previous classes
  970. 39:45you might have done something like this
  971. 39:46int a equal to 100
  972. 39:49and then you'll just go and say
  973. 39:51system.out.print ln you'll say a. What
  974. 39:53is the answer 100? Obviously now the
  975. 39:55question is what is this int? It's a
  976. 39:58data type. But the question is is int
  977. 40:01the only option? No. You have something
  978. 40:03called as bite. Byte also will give the
  979. 40:06same output. But observe very carefully.
  980. 40:09I'll just go over here and say 128. The
  981. 40:12moment I say 128, it is not working.
  982. 40:15Some problem. It seems type mismatch.
  983. 40:17But same thing if I make it as int.
  984. 40:20Absolutely there is no problem. Why
  985. 40:24we'll understand. Don't worry.
  986. 40:26Similarly, for example, I'll just go
  987. 40:29over here and say 45.5
  988. 40:32and I'll just store it in a variable
  989. 40:34known as a. and a is of a type double.
  990. 40:37I'll say double. I will save it. I'll
  991. 40:40click on run button. No problem. But
  992. 40:4245.5 can be float also. I'll save it.
  993. 40:45I'll click on the run button. There is a
  994. 40:47problem. What is the problem?
  995. 40:50>> So some people are able to answer
  996. 40:52because they might have known Java. But
  997. 40:54many people have a question mark. So
  998. 40:56you're pretending you know data types
  999. 40:58but the reality is we don't know data
  1000. 41:00types. We should go deeper and
  1001. 41:03understand every inch of data type. Yes,
  1002. 41:05it's a very simple silly concept but lot
  1003. 41:07of MCQs will be asked. Predict the
  1004. 41:10output. One more question I would like
  1005. 41:12to ask you. Let me see whether you can
  1006. 41:14answer it or not. I'll just go and say
  1007. 41:16bite a 128 was a problem. Right? So I'll
  1008. 41:19say 127 semicolon. Is it allowed? Yes,
  1009. 41:22it is allowed. I'll click on run button.
  1010. 41:25Now that is not the question. I'll just
  1011. 41:27go and say a++
  1012. 41:30again. I'll just go and say a++. Now
  1013. 41:32tell me what is the answer.
  1014. 41:35US.
  1015. 41:35>> Huh?
  1016. 41:36>> So some people are very clever already.
  1017. 41:38They're answering correctly. Minus 127
  1018. 41:40it says. Now why is it happening? Simply
  1019. 41:43if you buy and put the right mark in the
  1020. 41:45MCQs it doesn't help you what is
  1021. 41:47happening internally. Let's go deeper.
  1022. 41:50So the first concept for today is your
  1023. 41:52data types and the interview questions
  1024. 41:55they can ask you. Okay let's understand.
  1025. 41:57So let me close Eclipse for the time
  1026. 41:59being.
  1027. 42:01Okay. First and foremost already you
  1028. 42:04might have known that integer type data
  1029. 42:06exist in this world. Your h is an
  1030. 42:10integer value or real number.
  1031. 42:13>> Integer only not real number. What is
  1032. 42:16the difference between integer and real
  1033. 42:17number?
  1034. 42:20>> Why I'm asking this question? You know
  1035. 42:22some people who comes from engineering
  1036. 42:24background don't know number systems
  1037. 42:26also. That is the reality in which we
  1038. 42:28are living.
  1039. 42:30Even many of you who are sitting over
  1040. 42:32here still don't know very simple
  1041. 42:35integer whole numbers means basically a
  1042. 42:38number without decimal point is known as
  1043. 42:40an integer value a decimal value are you
  1044. 42:43understanding decimal means today what
  1045. 42:45you and me are using right it's a
  1046. 42:47decimal number system any number that we
  1047. 42:49use will be between 0 and 9 only decimal
  1048. 42:52number system are you understanding and
  1049. 42:54integer decimal numbers numbers means a
  1050. 42:57number without point that is inte
  1051. 43:00integer category. So in Java we have
  1052. 43:02four data types bite, short, int and
  1053. 43:05long. Four data types. So these are four
  1054. 43:08options. We'll understand. Similarly,
  1055. 43:10real numbers means what? Which has a
  1056. 43:12decimal point. Your height, your weight,
  1057. 43:15your CGPA, there are two options. One is
  1058. 43:18float, one is double. To store
  1059. 43:20characters,
  1060. 43:22we use a car data type. So we have car
  1061. 43:25data type. Similarly, yes or no. In
  1062. 43:28programming we call it as true or false
  1063. 43:30we use boolean for others we don't have
  1064. 43:33data types we have something called as
  1065. 43:34built-in libraries basically so that
  1066. 43:36you'll understand advanced Java classes
  1067. 43:39how to use audio file in Java all those
  1068. 43:41things clear this these are the eight
  1069. 43:44data types in Java don't by heart
  1070. 43:48whenever someone asks you no one will
  1071. 43:49ask you by the way but how do you answer
  1072. 43:52in Java there are eight data types to
  1073. 43:55store integers we have four data types
  1074. 43:57bite which occupies one bite short which
  1075. 44:01occupies two bytes similarly int which
  1076. 44:04occupies four bytes long which occupies
  1077. 44:08eight bytes of memory now what exactly I
  1078. 44:11meant by this memory I'll tell you this
  1079. 44:13is how you should answer coming to real
  1080. 44:14numbers in Java we have two options one
  1081. 44:17is float one is double to store
  1082. 44:19characters we have car data type to
  1083. 44:21store boolean we have boolean data type
  1084. 44:23this is how you should answer now let's
  1085. 44:25start with the first cate category that
  1086. 44:27is your integer category and first data
  1087. 44:30type which is bite. Now what exactly do
  1088. 44:33you mean by bite? I'll go to my Java
  1089. 44:36program. I'll say bite A. When I say
  1090. 44:38bite A, what happens? Back side. What
  1091. 44:41happens? Simple. Now byte a means this
  1092. 44:45is my RAM. Example 2 GB RAM. How many
  1093. 44:48bytes are there in 2GB? 200 CR bytes.
  1094. 44:54Giga means 10 ^ of 9. 10 ^ of 9 means
  1095. 44:58100 cr. So 200 cr bytes are there. Now
  1096. 45:02in this 200 core bytes I don't want
  1097. 45:04anyone. I just want one bite. So when
  1098. 45:08you say bite a in java one bite is given
  1099. 45:11for you and tell me what do you mean by
  1100. 45:13one bite? It's a combination of eight
  1101. 45:16bits.
  1102. 45:18Please keep your mobiles in silent in my
  1103. 45:21classes. Okay. Anyways,
  1104. 45:25so one bite is equivalent to 8 bits. So
  1105. 45:27I'm just dividing it to eight bits. Now
  1106. 45:30my question is in your entire RAM there
  1107. 45:33are crows and cres of bits right but
  1108. 45:36correctly how will you identify this is
  1109. 45:38only your bite because you told a right
  1110. 45:40that a will act like an identifier in
  1111. 45:44your language variable. Are you
  1112. 45:46understanding that a is the identifier?
  1113. 45:48So when I say byte a in my entire
  1114. 45:50program this bite only will be tell me
  1115. 45:54imagine there are two rahuls in this
  1116. 45:56class. I'll tell Rahul which Rahul
  1117. 45:58should respond. Both will respond.
  1118. 46:00Confusion. That's why I cannot create
  1119. 46:03one more a in my Java program. Duplicate
  1120. 46:05variable error you will get because
  1121. 46:08confusion will happen. Right? I hope
  1122. 46:09you're getting the point. But that is
  1123. 46:11not the point. In the number system,
  1124. 46:14negative infinity is the least negative
  1125. 46:16number and positive in infinity is the
  1126. 46:19highest positive number. Correct? Now,
  1127. 46:21in one bite, there should be a
  1128. 46:24threshold. There should be a capacity
  1129. 46:26this much only I can store. How much is
  1130. 46:28that?
  1131. 46:30That is the question. In one liter water
  1132. 46:32bottle only one liter only I can store.
  1133. 46:351.1 liter also I can't store. What is
  1134. 46:38the least possible thing in one liter?
  1135. 46:41>> Negative one liter zero lit right?
  1136. 46:44Basically similarly in one bite I can
  1137. 46:47store one highest positive value. I can
  1138. 46:50store one least negative value. What is
  1139. 46:52that number? There is a simple formula
  1140. 46:55which you should definitely not by
  1141. 46:56heart. Okay. So n bits are there. The
  1142. 46:59least negative number is minus 2 ^ of n
  1143. 47:02minus one. The highest positive number
  1144. 47:04is 2 ^ of n -1 minus one. Now tell me
  1145. 47:08what is n over here? One by means 8
  1146. 47:11bits. If I substitute that 8 bits 2 ^ of
  1147. 47:167 - 2 ^ of 7 + 2 ^ of 7 - 1 which is
  1148. 47:21nothing but 128 to 127 that is the
  1149. 47:27reason my Java compiler did not allow me
  1150. 47:30to store one value extra one value
  1151. 47:33lesser.
  1152. 47:35Are you understanding? So in the number
  1153. 47:36line also if I show you what is the
  1154. 47:38highest positive number I can store in
  1155. 47:40bite 127. What is the least negative
  1156. 47:43value minus 128. So let's see this in
  1157. 47:46practical. So I'll just go over here.
  1158. 47:50So I'll just go and say byte a is equal
  1159. 47:53to 127. No problem. If I just go and say
  1160. 47:56system.out.print ln absolutely I can see
  1161. 47:59the output. But if I just make it as 128
  1162. 48:04already you can see there is a red
  1163. 48:05underline in Eclipse. If you see red
  1164. 48:08underline this means there is a mistake
  1165. 48:11already which has identified by the
  1166. 48:13compiler. Forget about JVM. Compiler
  1167. 48:16only told I cannot proceed because you
  1168. 48:18have done a mistake. So if I save it if
  1169. 48:20I click on the run button you can see
  1170. 48:22sir what is this error? Can you read it?
  1171. 48:25Definitely unresolved compilation
  1172. 48:28problem. What is the problem? Type
  1173. 48:30mismatch. Data type mismatch it seems.
  1174. 48:33What do you mean by mismatch? LHS and
  1175. 48:35RHS are not equal to each other. Why?
  1176. 48:38Because cannot convert int to bite its.
  1177. 48:41Now this is a statement which might be
  1178. 48:43confusing. In the next few minutes
  1179. 48:46you'll understand what is that clear?
  1180. 48:48Okay sir. But if I make it as a negative
  1181. 48:51value this is no problem. If I save it
  1182. 48:54click on run button. Tell me what is one
  1183. 48:57value lesser than minus 128
  1184. 49:00minus 127
  1185. 49:02- 129. Okay, good. So if I click on run
  1186. 49:06button, not possible. Clear? So this is
  1187. 49:08very very clear that bite has only one
  1188. 49:11bite of memory. I can only store that
  1189. 49:14much value. Clear? But what if I want to
  1190. 49:17store more than 127 and less than minus
  1191. 49:20128? There is another option for that
  1192. 49:22also. So we have the second data type
  1193. 49:25that is your short. Same thing. Now when
  1194. 49:28it says short a this time it is not one
  1195. 49:31bite double the bytes. How many bytes?
  1196. 49:34Two bytes which means in my 200 crores
  1197. 49:37of bytes correctly only two bytes is
  1198. 49:39given for me. Two bytes means you know
  1199. 49:4116 bits 2 into 8. These two bytes
  1200. 49:45combined together is called as a. Now
  1201. 49:48same formula if I apply I'll get a
  1202. 49:50positive and negative value. Let's
  1203. 49:52quickly see that also. Again, let's not
  1204. 49:54go by the formulas and all. It's very
  1205. 49:56simple. - 2 ^ 15 to the positive 2 ^ 15
  1206. 50:00minus 1, which is nothing but some
  1207. 50:0232,536.
  1208. 50:05So, basically, it's negative sorry
  1209. 50:0832,768
  1210. 50:10to all the way till 32,767.
  1211. 50:12See, no one is going to bother about
  1212. 50:14what are these numbers, but you should
  1213. 50:16be knowing. Clear? So, this is what is
  1214. 50:19the value. Let's quickly execute this
  1215. 50:21also and check it. So I'll just go over
  1216. 50:23here
  1217. 50:25and I'll say I want short and instead of
  1218. 50:28minus 129 I'll say 32,000 767 is
  1219. 50:32allowed. If I save it you can clearly
  1220. 50:35notice one value extra is not allowed.
  1221. 50:39You can see already same error you will
  1222. 50:41get. But if I make it as a negative
  1223. 50:44value no problem if I save it. If I
  1224. 50:47click on the run button, you can see
  1225. 50:49clear. Great. So sir, what if I want a
  1226. 50:53better option that is a very frequently
  1227. 50:56used option also that is none other than
  1228. 50:59int. int is a commonly used integer data
  1229. 51:03type anywhere. You'll understand why
  1230. 51:06simple when I say int a what is the
  1231. 51:08meaning of it? Double the bytes of last
  1232. 51:10time four bytes will be given. Which
  1233. 51:12means in my corres of bytes correctly
  1234. 51:16four bytes are given for 4 into 8 32
  1235. 51:20bits. So 32 bits put together is called
  1236. 51:23as a and again if I put the same formula
  1237. 51:26you'll get the certain value some 214
  1238. 51:30crange you'll get. So you can clearly
  1239. 51:33notice - 2 ^ of 31 to the positive 2 ^
  1240. 51:38of 31 minus 1 which is nothing but 214
  1241. 51:41cr change
  1242. 51:43which means the highest positive value
  1243. 51:45and the least negative numbers you got
  1244. 51:46it I think I need now to type it and
  1245. 51:49show you I hope you understood one value
  1246. 51:52extra I cannot one value lesser I cannot
  1247. 51:55I don't think so in any programs that
  1248. 51:56you solve the values will be that
  1249. 51:58extremely huge that is why we prefer int
  1250. 52:02But what if I want to store 500 cr 1,000
  1251. 52:06cr what should I do? There is a last
  1252. 52:09option that is none other than long. So
  1253. 52:12when I say long a 8 bytes is given for
  1254. 52:15you which means if you notice in the
  1255. 52:17corres and of bytes correctly 8 bytes is
  1256. 52:19given and 8 into 8 is 64 bits. If I put
  1257. 52:23that formula no need to calculate
  1258. 52:24directly I'm showing you it's an
  1259. 52:26extremely huge value.
  1260. 52:29So 64 bits means uh almost uh count tens
  1261. 52:33or tw uh sorry tens hundreds thousands
  1262. 52:3610,000 like this you keep counting but
  1263. 52:38not required extremely huge value are
  1264. 52:41you understanding now you want me to
  1265. 52:44type this I will type it so let's see
  1266. 52:47how exactly this actually works in Java
  1267. 52:50so I'll just go over here I'm I'm also
  1268. 52:53human being itself I don't remember that
  1269. 52:55number I'll just Google it okay so I'll
  1270. 52:57just go and a long uh range in Java.
  1271. 53:04So that number I'm just typing it over
  1272. 53:06here.
  1273. 53:11Okay. So I'll just go over here and say
  1274. 53:14uh I'll say long a is equal to this is
  1275. 53:17the highest positive value possible and
  1276. 53:20I'll say system.out.print ln I'll say a.
  1277. 53:24Now the question is sir why there is an
  1278. 53:26error? Have you given correctly only? I
  1279. 53:29have given correctly only. So if I save
  1280. 53:32it up so carefully. If I click on run
  1281. 53:34button, same error you'll get. This time
  1282. 53:37I want you to read the error very
  1283. 53:39carefully. Of course it's a compilation
  1284. 53:42problem. I do understand. But what the
  1285. 53:44literal
  1286. 53:46remember what is this literal sir? In
  1287. 53:49your language it is called as value.
  1288. 53:52In computer science it is called as
  1289. 53:53literal. The literal whatever number you
  1290. 53:57gave is of type int is out of range. It
  1291. 54:02seems one thing is very clear somewhat
  1292. 54:05clue you are getting sir this is
  1293. 54:06definitely more than 214 cr that is why
  1294. 54:09it is saying int is out of range but why
  1295. 54:12did that error come for my long is the
  1296. 54:14question. The most important rule you
  1297. 54:17should remember is any number that you
  1298. 54:19type in Eclipse or Java. Basically any
  1299. 54:21number automatically by default it is
  1300. 54:25int only. I repeat it any number any
  1301. 54:31integer number you type in Java by
  1302. 54:34default it is int. By default it is int.
  1303. 54:37Not bite not short not long it is int.
  1304. 54:40Now don't you think the number which I
  1305. 54:42gave is definitely outside the range of
  1306. 54:44int only. Now I should tell to my
  1307. 54:46compiler listen this is not int value
  1308. 54:48I'm intended to do it is a long value at
  1309. 54:52last I should go and say l are you
  1310. 54:55understanding just a second
  1311. 54:59uh what is the problem okay I think I
  1312. 55:02have given a wrong number just a second
  1313. 55:04yeah it's not one okay now you can see
  1314. 55:07same problem only you will see so now I
  1315. 55:09need to just go and say l are you
  1316. 55:11understanding l means long now is it
  1317. 55:13allowed This if I click on the run
  1318. 55:15button you can see. So this is called as
  1319. 55:20a prefix. Sorry it is called as a
  1320. 55:22suffix. Are you understanding? Something
  1321. 55:24which you give before is known as
  1322. 55:25prefix. Something which you give after
  1323. 55:27is called a suffix. Prefix. Prepaid
  1324. 55:31means what? First pay and then use. Post
  1325. 55:33paid means first use and then pay.
  1326. 55:35Similarly prefix suffix. You can use
  1327. 55:38small L also. No problem. It will also
  1328. 55:40work
  1329. 55:42but not preferred. Why? Look at that and
  1330. 55:45tell me does it look like L? It looks
  1331. 55:47like one. So that is the reason they
  1332. 55:49told better use capital L. Any
  1333. 55:52confusion? So the first point new thing
  1334. 55:54that you have learned today is any
  1335. 55:57integer number if you give in Java by
  1336. 55:59default it is int. If you want long you
  1337. 56:02should say L. Are you understanding? But
  1338. 56:04sir for short and bite you did not say
  1339. 56:06no. It is within the range of int only.
  1340. 56:08Right? So no problem. Are you
  1341. 56:10understanding? So this was your
  1342. 56:12integers. So we have seen four types of
  1343. 56:16data types especially for inteious bite
  1344. 56:18short int long and their memory as well.
  1345. 56:20What next up
  1346. 56:25anyways this was already clear for us.
  1347. 56:27Now I'm just showing some people in
  1348. 56:29front of you and why am I showing this
  1349. 56:32if you ask me? I want to write a program
  1350. 56:34to store their ages.
  1351. 56:37Now which data type is preferred?
  1352. 56:40Integer category only. But in integer
  1353. 56:42you have four types right? Which one?
  1354. 56:45Int. But think about it very carefully.
  1355. 56:48Now from today you should start thinking
  1356. 56:50like a programmer like a developer from
  1357. 56:53the company perspective from the cost
  1358. 56:55perspective also.
  1359. 56:58Remember very important statements I'll
  1360. 57:00be making here and there. As a developer
  1361. 57:03every bit matters. Forget about bytes.
  1362. 57:06Every bit also matters. How effectively
  1363. 57:10can you utilize the bits. The bytes is a
  1364. 57:13very important thing for a developer.
  1365. 57:15Which means you people are saying saying
  1366. 57:17sir use int. I can use long also. I can
  1367. 57:20use short also. But I would like to
  1368. 57:22prefer bite. Why? Tell me what is the
  1369. 57:26maximum age you want to live on this
  1370. 57:28planet?
  1371. 57:30>> 100 century. Wow. God bless you.
  1372. 57:35So on an average statistically speaking
  1373. 57:3885 is more 75 is average actually in
  1374. 57:42India 75 to 80 you can think but extreme
  1375. 57:46case you are in a city where every day
  1376. 57:49you're getting fresh air you're eating
  1377. 57:51organic fruits every day whatever lunch
  1378. 57:54you have has a lot of protein so you're
  1379. 57:57eating a very healthy food right every
  1380. 57:59day 1 hour you do workout also so
  1381. 58:01guaranteed 100 years correct
  1382. 58:04So as a matter of fact definitely 100 if
  1383. 58:08you take also
  1384. 58:10world record is some 120 to 123. So 127
  1385. 58:14is more than sufficient. So when you
  1386. 58:16told int why did you say int I'll tell
  1387. 58:18you because you told sir these many int
  1388. 58:21we have used but if you think in a
  1389. 58:23different perspective bite occupies one
  1390. 58:25bite int o occupies four bytes don't you
  1391. 58:29think three bytes extra you're wasting
  1392. 58:31you are wasting and the three bytes may
  1393. 58:34seem very simple sir see three bytes
  1394. 58:37only no sir 200 cr bytes are there one
  1395. 58:41user three bytes thousand users one lakh
  1396. 58:43users one cr us users 100 crore users
  1397. 58:47think scalability also you should think
  1398. 58:49that is how you become a true engineer
  1399. 58:51are you understanding three bits also
  1400. 58:53matters so don't you think I can easily
  1401. 58:56use for ages I can use a bite are you
  1402. 58:59understanding next one more example for
  1403. 59:03storing the salaries fresher average
  1404. 59:05salary I'm saying I'll ask what is your
  1405. 59:08salary and
  1406. 59:11no one will throw money like this very
  1407. 59:13important so basically what is an
  1408. 59:14Average salary of a fresher if you ask
  1409. 59:16me somewhere between 30,000 it can be
  1410. 59:18more it can be less but average I'm
  1411. 59:20speaking in India short is more than
  1412. 59:23sufficient 30 to,000 it can store so I
  1413. 59:25can use short so you can see based on
  1414. 59:27use case I'm differentiating
  1415. 59:30some people are not happy with our
  1416. 59:32planet are create creating plans are
  1417. 59:35creating different different
  1418. 59:36technologies to go to some other planet
  1419. 59:41people are not happy over here people
  1420. 59:43are thinking in Next thousand years
  1421. 59:45earth will become inhabitable.
  1422. 59:48Mars is already inhabitable but they'll
  1423. 59:50make it habitable. It seems by creating
  1424. 59:52atmosphere by creating oceans. They are
  1425. 59:54doing some experiments. So people wants
  1426. 59:56to travel from earth to Mars. Some
  1427. 59:59distance should be calculated. Now the
  1428. 1:00:01distance probably will be in lacks of
  1429. 1:00:03kilometers if not of kilometers. So int
  1430. 1:00:07will be more than sufficient.
  1431. 1:00:10Clear? If you want you can also go.
  1432. 1:00:12Okay. But if I zoom out these planets,
  1433. 1:00:14they belong to Milky Way galaxy. There
  1434. 1:00:17there are millions of galaxies in our
  1435. 1:00:19particular universe. The distance
  1436. 1:00:21between galaxies will be in thousands
  1437. 1:00:23lacks of crows kilometers. Probably I
  1438. 1:00:27can use long.
  1439. 1:00:29This is just an example. But what did
  1440. 1:00:31you understand from this four four data
  1441. 1:00:34type simply they did not give for
  1442. 1:00:36utilization of memory efficiently. They
  1443. 1:00:39have given four types. So depending upon
  1444. 1:00:42situation various magnitude of data you
  1445. 1:00:45might have seen right one is a very
  1446. 1:00:47simple small number one is an extremely
  1447. 1:00:49large number that we call it as various
  1448. 1:00:52magnitude of the data for that you have
  1449. 1:00:54four data types simply they did not give
  1450. 1:00:56are you understanding so which situation
  1451. 1:00:59suits you better use that data type
  1452. 1:01:02clear always think from the memory
  1453. 1:01:03perspective never waste memory
  1454. 1:01:06understood anyways so I think this much
  1455. 1:01:09clarity you got it
  1456. 1:01:11But I have a very important question to
  1457. 1:01:12ask you. Imagine I'll say bite a equal
  1458. 1:01:16to 24.
  1459. 1:01:1824 is your age. Maybe next year or the
  1460. 1:01:21next year you'll get it. Now 24 if I
  1461. 1:01:23type in my Eclipse in my RAM directly 24
  1462. 1:01:26will be stored.
  1463. 1:01:28>> No. Right. This is high level. High
  1464. 1:01:31level is converted into byte code. Byte
  1465. 1:01:33code is converted into zeros and ones.
  1466. 1:01:35That zeros and ones is stored in the
  1467. 1:01:37RAM. My question is how is the 24
  1468. 1:01:40converted into zeros and ones is the
  1469. 1:01:42question.
  1470. 1:01:44>> Very simple. So whatever 24 you are able
  1471. 1:01:47to see in how many bytes are you
  1472. 1:01:49storing?
  1473. 1:01:51>> Eight bits or one bite. Now in this one
  1474. 1:01:53by eight bits are there. What is each
  1475. 1:01:56bit? Either zero or one. Now how do you
  1476. 1:01:59calculate? It's very simple. See
  1477. 1:02:02internally all these things will happen.
  1478. 1:02:03One bite I'm showing you as eight bits.
  1479. 1:02:06So first I'll take the 24.
  1480. 1:02:09There is something called as base two
  1481. 1:02:11format. What is this base two format if
  1482. 1:02:13you ask me? Take the number and divide
  1483. 1:02:15with the two. As long as you get the
  1484. 1:02:17remainder as one. If you did not
  1485. 1:02:19understand I'll take 24. I'll divide
  1486. 1:02:22this 24 with two. How many times? 12. So
  1487. 1:02:25next again I'll divide it. What is the
  1488. 1:02:26remainder by the way? 0. Again I'll
  1489. 1:02:28divide. What is the remainder? 0. Again
  1490. 1:02:31I'll divide. What is the remainder? 0
  1491. 1:02:33only. Again I'll divide. This time 2 1
  1492. 1:02:36are is two and remainder is going to be
  1493. 1:02:38one. When the original number becomes
  1494. 1:02:40one, you should stop the division. Now
  1495. 1:02:43if you notice from bottom to top if you
  1496. 1:02:46take that is nothing but 1 1 0 0. I will
  1497. 1:02:49put it over here for you people that 1 1
  1498. 1:02:520 0 is the binary of 24.
  1499. 1:02:57Uh okay, one more zero. Oh, that's it.
  1500. 1:02:59So 1 1 0 0. But think about it. How many
  1501. 1:03:02bits I got? Five
  1502. 1:03:04>> five bits. How many bits in one bite you
  1503. 1:03:07have?
  1504. 1:03:08>> Eight bits. So all these things I'll put
  1505. 1:03:10it over here. But that extra three bits
  1506. 1:03:12are nothing but your zeros.
  1507. 1:03:15Are you understanding? So this is how
  1508. 1:03:17for you it is 24. But how RAM looks at
  1509. 1:03:20it? 0 0 0 1 1 0 0 0.
  1510. 1:03:23So computers will only store this not
  1511. 1:03:26this. But sir, when I'm printing I'll
  1512. 1:03:30get 24 only. Then what happens? Again
  1513. 1:03:32the same zeros and ones will get
  1514. 1:03:33converted into 20 internally it will
  1515. 1:03:36happen. See why I'm speaking all these
  1516. 1:03:39things you know no one will teach you
  1517. 1:03:40all these things but these are the
  1518. 1:03:43fundamentals you should learn because
  1519. 1:03:45again and again will you learn all these
  1520. 1:03:47things no only once you will learn so
  1521. 1:03:49you should focus on larger things right
  1522. 1:03:51now but since the background that you
  1523. 1:03:54come from the colleges amazing colleges
  1524. 1:03:58right so unfortunately we should again
  1525. 1:04:00start the foundation otherwise by now we
  1526. 1:04:03could have started greater technologies
  1527. 1:04:04but anyways no problem we can quickly
  1528. 1:04:06complete all these things any confusion
  1529. 1:04:09great you might ask me a question sir
  1530. 1:04:12ask RAM to give only five bits no it
  1531. 1:04:15will not give because the minimum memory
  1532. 1:04:19that that can be given for you is one
  1533. 1:04:21bite half bite and all it will not give
  1534. 1:04:23you okay full ticket only half ticket
  1535. 1:04:25and all that option is not there so one
  1536. 1:04:28bite is the minimum memory so I will
  1537. 1:04:30obviously get eight bits that extra
  1538. 1:04:32spaces will be zeros
  1539. 1:04:34but if you carefully observe sir this I
  1540. 1:04:36understood
  1541. 1:04:38There is something called as most
  1542. 1:04:40significant bit. Observe carefully most
  1543. 1:04:42significant bit. What is this zero? If
  1544. 1:04:45it is zero, you should understand it's a
  1545. 1:04:48positive value. It's a positive value.
  1546. 1:04:51But if it is one, it's a negative value.
  1547. 1:04:55Now on this note, what is minus4?
  1548. 1:05:02Huh? 1 0 0 0 1 1 1 0 0 0 Wow it doesn't
  1549. 1:05:08work like that just I'll substitute that
  1550. 1:05:100 with one it is minus4 then you and me
  1551. 1:05:13no need to be here itself it's not like
  1552. 1:05:16that there is a separate calculation for
  1553. 1:05:18that also already existing base to
  1554. 1:05:20format you have right we need to
  1555. 1:05:22actually add a two's complement of it so
  1556. 1:05:25what is this all things observe what is
  1557. 1:05:28positive 24 binary 0 0 1 1 0 0 0 don't I
  1558. 1:05:32heart. Okay. So basically 0 0 0 0 1 1 0
  1559. 1:05:360 0. What is two's complement? If you
  1560. 1:05:39ask me first you should understand what
  1561. 1:05:41is one's complement. Basically if you
  1562. 1:05:43want to know the second part first part
  1563. 1:05:45is important. Bahubali one after that
  1564. 1:05:48only bahubali 2 pushp one after that
  1565. 1:05:50only pushpa two. Like the different
  1566. 1:05:52different things you have for first let
  1567. 1:05:54us understand what is one's complement.
  1568. 1:05:56Okay what is one compliment? Very
  1569. 1:05:58simple. You have all these bits. Flip
  1570. 1:06:02it. Flip it in the sense 0 will become
  1571. 1:06:05one. One will become zero. So which
  1572. 1:06:07means 1 1 1 0 0 1 1. That is 1's
  1573. 1:06:12complement. What is 2's complement? Plus
  1574. 1:06:14one. I should add
  1575. 1:06:17just add + one. Huh. Now tell me what is
  1576. 1:06:191 + 1?
  1577. 1:06:21>> Two is a wrong answer.
  1578. 1:06:23This is not normal mathematics. It's
  1579. 1:06:26binary maths.
  1580. 1:06:28Now again should I teach binary maths?
  1581. 1:06:31It's very simple. Remember one simple
  1582. 1:06:33rule. Whenever it comes to binary
  1583. 1:06:36addition, only four things you should
  1584. 1:06:38remember. Okay? What if I add one? I
  1585. 1:06:42mean, let's start from absolute scratch.
  1586. 1:06:450 + 0. That is one uh formation. Next 0
  1587. 1:06:52+ 1. Next 1 + 0. Next 1 + 1. These are
  1588. 1:06:56the only combinations in two digits. 0 +
  1589. 1:07:000 is 0. 0 + 1 is 1. 1 + 0 is not 1. It
  1590. 1:07:06is 1. Oh, sorry. My bad. My bad. My bad.
  1591. 1:07:10Sorry. So, basically over here 0 + 1 is
  1592. 1:07:131. And 1 + 0 is also 1. But 1 + 1 is not
  1593. 1:07:17two. It is actually
  1594. 1:07:23see listen.
  1595. 1:07:261 + 1 is 1 and 0 over here. Basically
  1596. 1:07:30two you will not get. I hope you're
  1597. 1:07:32understanding. So basically 1 + 1 is 1
  1598. 1:07:360. Don't read it as 10. It is not 10. It
  1599. 1:07:40is 1 0 only. Are you understanding? So
  1600. 1:07:43this table if you remember it is very
  1601. 1:07:44very easy for you. 0 0 means always 0. 0
  1602. 1:07:47with 1 is always 1 and 1 + 1 is always 1
  1603. 1:07:510. This you remember. Okay. Keeping this
  1604. 1:07:53in the thing. Let us add it right now.
  1605. 1:07:56What is 1 + 1? 1 1 0. Like how you do
  1606. 1:07:59normal mathematics. Take 1 and over here
  1607. 1:08:01it is 0. Carry is 1. Again what is 1 +
  1608. 1:08:031? Uh 1 0. Again what is 1 + 1? 1 0. Now
  1609. 1:08:08what is 1 + 0? 1. So I'll keep it as it
  1610. 1:08:10is. Next. If you notice 0 1 1. So if I
  1611. 1:08:14put it over here, this is your
  1612. 1:08:184. If you notice one thing, what is the
  1613. 1:08:20most significant bit? one which is a
  1614. 1:08:23negative number. Now why did I teach you
  1615. 1:08:26this if you ask me? No one will ask you
  1616. 1:08:28in the interview but you as an engineer,
  1617. 1:08:30as a software engineer, you should know
  1618. 1:08:32a positive number how it is stored. A
  1619. 1:08:34negative number how it is stored. Are
  1620. 1:08:37you understanding? This is your version.
  1621. 1:08:40This is RAM version, computer version.
  1622. 1:08:43Clear? So this is what I just wanted to
  1623. 1:08:46explain. So that's it. Any confusions?
  1624. 1:08:49Great.
  1625. 1:08:51Next, real number category. So in this
  1626. 1:08:55world you have already seen whole
  1627. 1:08:58basically integer numbers. But now you
  1628. 1:09:00can also understand in this world
  1629. 1:09:03integers only does not exist. Real
  1630. 1:09:05numbers also exist. Now all these real
  1631. 1:09:08numbers which you are able to see in
  1632. 1:09:09front of you.
  1633. 1:09:11Okay. Anyways no issues. They can be
  1634. 1:09:14stored in two data types. One is float,
  1635. 1:09:16one is double. Let's start by
  1636. 1:09:18understanding what is this float.
  1637. 1:09:21Float means floating on the ocean not
  1638. 1:09:25like that floating point shortcut is
  1639. 1:09:28float understood float means don't think
  1640. 1:09:30that float so floating point is the full
  1641. 1:09:33form shortcut is float whichever has a
  1642. 1:09:35decimal point now the question is I'll
  1643. 1:09:38say float a what is the meaning of it
  1644. 1:09:40simple in my RAM four bytes will be
  1645. 1:09:43given for understood so this is my RAM
  1646. 1:09:46and corres of bytes are there already
  1647. 1:09:48you know it so four bytes put together
  1648. 1:09:50is called as a now sir what is the range
  1649. 1:09:54like how you have for integers should we
  1650. 1:09:57calculate that not required so I'll
  1651. 1:09:59directly show you the range this is the
  1652. 1:10:01range minus 3.4 10 ^ of 38 to the
  1653. 1:10:06positive 3.4 4 into 10 ^ of 30 extremely
  1654. 1:10:09large one but in some mathematics
  1655. 1:10:13you might have seen E also what is E
  1656. 1:10:15exponent sir how did we get this tell me
  1657. 1:10:18the formula not required because
  1658. 1:10:21remember one thing how do you store
  1659. 1:10:24integers inside your RAM which format
  1660. 1:10:28base 2 format
  1661. 1:10:31this is for integers
  1662. 1:10:36now what about This float and double if
  1663. 1:10:38you ask me they use something called as
  1664. 1:10:41Ile E format
  1665. 1:10:45are you understanding IL E format
  1666. 1:10:48now when I say it E your college will
  1667. 1:10:50come into your brain sir we had some ILE
  1668. 1:10:53E conference IL E projects so definitely
  1669. 1:10:57my guide told E guidance only I should
  1670. 1:11:00follow even if margin little bit also
  1671. 1:11:03let's go and get one more copy senseless
  1672. 1:11:06Yes to be honest has it given any value
  1673. 1:11:09for you? I'm just asking seriously okay
  1674. 1:11:11I don't no comments so what I'm trying
  1675. 1:11:15to say is whatever inteious you have
  1676. 1:11:17seen which format they use base to
  1677. 1:11:19format what about this float and double
  1678. 1:11:21if you ask me i format now observe one
  1679. 1:11:23thing formula is not required range also
  1680. 1:11:26no need to remember this is about all
  1681. 1:11:28about your float let me speak about
  1682. 1:11:30double right now sorry
  1683. 1:11:33online students
  1684. 1:11:43Anyways
  1685. 1:11:44speaking about double double the memory
  1686. 1:11:47eight bytes you'll get and directly I'm
  1687. 1:11:49showing you in 200 course of bite
  1688. 1:11:51correctly 8 bits if I take so extremely
  1689. 1:11:54huge range if you notice minus 1.7 into
  1690. 1:11:5810 ^ of 308
  1691. 1:12:00don't go by 1.7 go by the power
  1692. 1:12:03extremely extremely huge range. This
  1693. 1:12:05also uses it. Now the question is float
  1694. 1:12:09also can store extremely large value.
  1695. 1:12:11Double also can store extremely large
  1696. 1:12:13value. Now when to use what is the
  1697. 1:12:17question for inteious? You clearly
  1698. 1:12:19understood when to use what. But what
  1699. 1:12:20about float and double is the question.
  1700. 1:12:22For that one simple analogy. What is
  1701. 1:12:25your percentage?
  1702. 1:12:28No in percentage have you calculated
  1703. 1:12:32>> 80
  1704. 1:12:33>> 70 something 70.2
  1705. 1:12:37>> Okay. What is your percentage?
  1706. 1:12:41>> 80 back seat white shirt
  1707. 1:12:45>> 70.1
  1708. 1:12:46yellow shirt back seat huh you
  1709. 1:12:52>> in percentage 95
  1710. 1:12:56no idea. Oh, you people only know CGPS.
  1711. 1:12:59Okay. Okay. But in my days we are having
  1712. 1:13:02percentages basically. So the decision
  1713. 1:13:06between float and double when to use
  1714. 1:13:08what? I'll tell you. It is all for one
  1715. 1:13:11word. Precision. What is that?
  1716. 1:13:13Precision. What is this precision? Sir,
  1717. 1:13:15if you ask me. Imagine I'll ask
  1718. 1:13:17percentage. Unfortunately, we're taking
  1719. 1:13:19CGPS
  1720. 1:13:22online students. What is the problem?
  1721. 1:13:26Okay. Anyways, so
  1722. 1:13:29one student will say 65 is my
  1723. 1:13:31percentage. One more student will say my
  1724. 1:13:33percentage is 65.2. One more person will
  1725. 1:13:36say my percentage is 65.2836
  1726. 1:13:40so and so forth. Now if I ask you who is
  1727. 1:13:43more precise
  1728. 1:13:46last student is more precise. How can
  1729. 1:13:49you say is more precise? Because low
  1730. 1:13:52many decimal points if you see more
  1731. 1:13:54precise more accurate.
  1732. 1:13:56Still if you did not understand what is
  1733. 1:13:58this precision today if you open rapido
  1734. 1:14:01or Uber or any application which
  1735. 1:14:03requires maps two options it will give
  1736. 1:14:06you do you want to give precise location
  1737. 1:14:08or approximate location. What is the
  1738. 1:14:11difference?
  1739. 1:14:13>> Approximate means 100 m radius it will
  1740. 1:14:16provide not exact location. Precise
  1741. 1:14:19means with latitude and longitude
  1742. 1:14:21correct little pin and it will give you
  1743. 1:14:23precise means more detailed. So over
  1744. 1:14:26here the last student is more detailed
  1745. 1:14:29more memory is required. So use double
  1746. 1:14:32less precision use float. Are you
  1747. 1:14:36understanding? So the choice between
  1748. 1:14:38float and double is up to four decimal
  1749. 1:14:41points. If you want use float more than
  1750. 1:14:44four decimal points if you want use
  1751. 1:14:46double. So there is a difference are you
  1752. 1:14:49understanding? But in most of the
  1753. 1:14:51situations we'll be using float and we
  1754. 1:14:53call it a single precision that is
  1755. 1:14:55double the precision. Okay. So let's try
  1756. 1:14:58to type this as well as a program. Just
  1757. 1:15:02a second.
  1758. 1:15:44Anyways, some internet issue. No issues.
  1759. 1:15:47Let's continue.
  1760. 1:15:49So, I'll just go and open my editor
  1761. 1:15:53and I'll just go and say for example
  1762. 1:15:5545.5
  1763. 1:15:57I want to store. Let us assume I want to
  1764. 1:16:00store in a variable a and what is the
  1765. 1:16:02type of A? If you ask me double and I'll
  1766. 1:16:04just go to the next line. I'll say
  1767. 1:16:05system.out.tprint ln. I'll print a. I
  1768. 1:16:08will save it. I'll click on the run
  1769. 1:16:10button. You can see it is absolutely
  1770. 1:16:13printing as per our expectation. But
  1771. 1:16:15don't you think this small value can be
  1772. 1:16:17stored in float also. So I'll just go
  1773. 1:16:19and say float. But the moment I do this,
  1774. 1:16:21there is an error. What is an error? If
  1775. 1:16:24you notice, if you look at the error,
  1776. 1:16:26you can answer it. Again, same type of
  1777. 1:16:29error you have seen just before. Type
  1778. 1:16:32mismatch cannot convert from double to
  1779. 1:16:35float. Which means what is the meaning
  1780. 1:16:38of it? Any real number in Java by
  1781. 1:16:41default it is double. Any integer number
  1782. 1:16:45in Java by default it is int. But sir I
  1783. 1:16:48want it to be treated as float. Do one
  1784. 1:16:51thing go and say you are float. F you
  1785. 1:16:54should say compulsory. So there is a
  1786. 1:16:56reason for it. So if I click on the run
  1787. 1:16:58button you can see. So at any given
  1788. 1:17:01point in Java if you want to write float
  1789. 1:17:03value compulsory you should do this
  1790. 1:17:06clear any confusions great so that's it
  1791. 1:17:10this is all about your double and float
  1792. 1:17:11so you should just know when to use what
  1793. 1:17:14clear okay next you also have something
  1794. 1:17:17called as true or false it's very simple
  1795. 1:17:20I'll just go and say true means yes it
  1796. 1:17:23is true I'll just go and say I want to
  1797. 1:17:25store it in a variable it is of type
  1798. 1:17:27boolean boolean means true or false. So
  1799. 1:17:30I'll just go and say system.out.print ln
  1800. 1:17:32I'll say a. Now obviously what is
  1801. 1:17:35output? True. If I want it can be false
  1802. 1:17:38also. If I save it I can click on the
  1803. 1:17:41run button. It is false. Any confusion?
  1804. 1:17:44Now the question is what is the size of
  1805. 1:17:47boolean?
  1806. 1:17:51>> Size of bite is one bite. Short is two
  1807. 1:17:53bytes. Int is four bytes. Long is four
  1808. 1:17:56by eight bytes. Next float is four
  1809. 1:17:58bytes, double is eight bytes. What about
  1810. 1:18:01boolean?
  1811. 1:18:02>> Depends on the
  1812. 1:18:03>> Now you can say one bite because only
  1813. 1:18:05true and false. No, it's not like that.
  1814. 1:18:07The size of boolean is undetermined in
  1815. 1:18:10Java. It depends upon the operating
  1816. 1:18:12system or it depends upon the JVM which
  1817. 1:18:15you are using. Basically platform
  1818. 1:18:17dependent.
  1819. 1:18:19So boolean size is not determined.
  1820. 1:18:21Clear? So it changes from OS to OS.
  1821. 1:18:24Maybe in Windows it is one bite. Maybe
  1822. 1:18:26in Mac OS it can be two bytes. Size is
  1823. 1:18:28not determined. It keeps on varying.
  1824. 1:18:30Clear? Great. Last but not least, the
  1825. 1:18:34final data type is your character data
  1826. 1:18:37type. One of the most important data
  1827. 1:18:39type you should know. If you are someone
  1828. 1:18:42strings started for any batch
  1829. 1:18:45programming on strings not yet started
  1830. 1:18:47for some people it has started. If you
  1831. 1:18:50want to solve any program on strings,
  1832. 1:18:53the next 10 minutes what I'm going to
  1833. 1:18:54speak is very very very important
  1834. 1:18:56because it is not just concept it is
  1835. 1:18:59thinking also. Why does we actually use
  1836. 1:19:02all these things today? So please make
  1837. 1:19:04sure you are understanding extremely
  1838. 1:19:07important. Observe
  1839. 1:19:10your perspective only will change.
  1840. 1:19:13Now of course that 45.5 already that you
  1841. 1:19:17have understood. Let us ignore that for
  1842. 1:19:18the time being.
  1843. 1:19:23Okay. Observe. What do you mean by
  1844. 1:19:25character? According to you,
  1845. 1:19:28these are all characters only. Whatever
  1846. 1:19:31you can see on your keyboard,
  1847. 1:19:34there are three types. Alphabetical
  1848. 1:19:37characters, numerical characters,
  1849. 1:19:39special characters. These are only three
  1850. 1:19:41categories. So any character that you
  1851. 1:19:43can see why do they exist on my keyboard
  1852. 1:19:47today? Why not some other characters?
  1853. 1:19:49You might be having a question. Why
  1854. 1:19:50don't I have Telugu, Canada, Hindi,
  1855. 1:19:52Mallayalam? Why only English? So many
  1856. 1:19:55questions are there. The next 10 minutes
  1857. 1:19:57is the answer for that. Absa. See, let
  1858. 1:19:59us imagine a hypothetical situation.
  1859. 1:20:02Just a second.
  1860. 1:20:08Okay, a hypothetical situation where you
  1861. 1:20:12and me should speak with each other. No
  1862. 1:20:15Canada, no Telugu, no Hindi, no Malanam.
  1863. 1:20:17Only one language exists in this world
  1864. 1:20:19that is English. But unfortunately 26
  1865. 1:20:23alphabets are not there. How many
  1866. 1:20:25alphabets are there? Alphabets I'm
  1867. 1:20:27saying it as symbols. Only four symbols
  1868. 1:20:30are there. A B C D. anything I should
  1869. 1:20:33speak with you in ABCD only I should
  1870. 1:20:35speak A B C D F E G something like that.
  1871. 1:20:38So E is not there by the way only in
  1872. 1:20:40four letters I should speak. Now the
  1873. 1:20:42question is this four symbols I and you
  1874. 1:20:46can speak but I want to store it in the
  1875. 1:20:48computer. How will you store? Can my RAM
  1876. 1:20:51understand A? No. B C D no don't you
  1877. 1:20:55think a binary version should be there
  1878. 1:20:57for that? Now if you notice for A I will
  1879. 1:21:00only think what value can I give? I will
  1880. 1:21:02only decide I will say for a if anyone
  1881. 1:21:05types a on the keyboard it should be
  1882. 1:21:07stored in the RAM. So what I will do is
  1883. 1:21:09in my RAM I know ABCD can't be stored.
  1884. 1:21:13So I will take a decision if anyone
  1885. 1:21:15types ABCD I will ensure the zero and
  1886. 1:21:18one version of it is stored. What is
  1887. 1:21:20that if you ask me? Let me assign some
  1888. 1:21:23binary code for it. For A the code is 0
  1889. 1:21:270. For B it is 0 1. I will only decide
  1890. 1:21:31it. Next for C it is 1 0. For D it is 1
  1891. 1:21:34one. Do you agree with me? Which means I
  1892. 1:21:37will type D but for my RAM it is 1 one.
  1893. 1:21:40I will type A but for my RAM it is 0 0.
  1894. 1:21:44Understand? [music]
  1895. 1:21:45Understanding? Okay. But let us assume
  1896. 1:21:48ears evolved. Four letters not
  1897. 1:21:51sufficient. We need to communicate
  1898. 1:21:53better. Let us assume the number of
  1899. 1:21:55symbols doubled.
  1900. 1:21:57E F G H also came. But my question is
  1901. 1:22:02can I use any binary number of twodigit
  1902. 1:22:05combination? Yes or no? I cannot because
  1903. 1:22:08already I have lost the combinations
  1904. 1:22:10completed. Right? So what should I do?
  1905. 1:22:13Can I increase the length of this code?
  1906. 1:22:15Yes. So what I will do is I'll make
  1907. 1:22:18everything as a three-digit code over
  1908. 1:22:19here. I'll make I'll just add a zero.
  1909. 1:22:22Just a situation. Okay. Now can you tell
  1910. 1:22:25me what is the first I mean what is the
  1911. 1:22:27next piece of code? Huh? Very simple. 1
  1912. 1:22:290 0. Next 1 0 1. Next 1 1 1 0. Last but
  1913. 1:22:35not least 1 1.
  1914. 1:22:37Like this it started to evolve but again
  1915. 1:22:40eight symbols not sufficient. Number of
  1916. 1:22:42symbols doubled. This time 16 symbols
  1917. 1:22:45are there. Can you tell me what should
  1918. 1:22:48be the symbol one?
  1919. 1:22:50>> Very simple. Three-digit combination not
  1920. 1:22:53sufficient. I'll just increase the
  1921. 1:22:55length of the code. This time the new
  1922. 1:22:57set of permutation and combination is 1
  1923. 1:23:000 0 all the way till 1 one. Again if it
  1924. 1:23:04doubles I hope you got the story clear.
  1925. 1:23:08So this is how it got evolved like this.
  1926. 1:23:11Whatever alphabets or symbols you are
  1927. 1:23:14able to see how many such symbols are
  1928. 1:23:16there is the question. So let us
  1929. 1:23:19understand one most important thing. How
  1930. 1:23:22did I decide two? Next, the length
  1931. 1:23:24should be four. The length should be
  1932. 1:23:26three. How did I decide? Very simple.
  1933. 1:23:28There is a simple formula. Imagine four
  1934. 1:23:30symbols are there. What was the length
  1935. 1:23:33of the code? Two. How did you decide?
  1936. 1:23:36There is a formula. Very simple. So the
  1937. 1:23:39number of symbols four. How to write it?
  1938. 1:23:422 to the power 2 to the^ of two. So I
  1939. 1:23:46can write it as 2 to the^ of two. So
  1940. 1:23:48which means that four is nothing but 2 ^
  1941. 1:23:51of two. That power is two, right? That
  1942. 1:23:53is why length was two. Clear? That is
  1943. 1:23:56very important to understand. Okay?
  1944. 1:23:58Next, number of symbols doubled. Now
  1945. 1:24:00tell me what is the length? Eight.
  1946. 1:24:03Sorry, the number of symbols are eight.
  1947. 1:24:05What is the length? Three. How did you
  1948. 1:24:07decide? Simple. Eight can be written as
  1949. 1:24:102 ^ of 3.
  1950. 1:24:13Next, we had something called as 16
  1951. 1:24:15symbols. What was the length? Four. How?
  1952. 1:24:18Simple. 16 can be written as 2 ^ of 4
  1953. 1:24:22which means can you tell me if I give
  1954. 1:24:25you number of symbols can you predict
  1955. 1:24:27and tell me what could be the length
  1956. 1:24:29that number how can I write it in the 2
  1957. 1:24:31to the power of this much clarity got it
  1958. 1:24:34let's continue the story now of course
  1959. 1:24:36that you understood there is one flag
  1960. 1:24:39which I'm trying to show you in front of
  1961. 1:24:41you which is that flag America one of
  1962. 1:24:44the greatest and most futuristic country
  1963. 1:24:48in the world is what people treat today
  1964. 1:24:51I don't know the story but today also
  1965. 1:24:52same story only but already some
  1966. 1:24:54negative impact has been started on this
  1967. 1:24:56country which entire world is suffering
  1968. 1:25:00today if you don't know today if you
  1969. 1:25:04just open the gold price it have been
  1970. 1:25:06skyrocketed like anything and you will
  1971. 1:25:08think that a gold means it will increase
  1972. 1:25:11there is a reason for it also and if you
  1973. 1:25:13don't know America is the reason are you
  1974. 1:25:16understanding So how America is the
  1975. 1:25:18reason not directly but indirectly.
  1976. 1:25:21If a war situation happens remember one
  1977. 1:25:24thing whenever war situation happens
  1978. 1:25:27entire world will go through
  1979. 1:25:29uncertaintity. What do I mean by
  1980. 1:25:31uncertaintity? Stability will not be
  1981. 1:25:33there in the economy. What do you mean
  1982. 1:25:35by this if you ask me? Simple as simple
  1983. 1:25:38as stopping straight of harness. What is
  1984. 1:25:41the straight of harness? Usually
  1985. 1:25:4480 to 90% of the crude oil supply for
  1986. 1:25:48this entire world happens through that
  1987. 1:25:50straight off harmas. Now what is this
  1988. 1:25:53crude oil today? Petrol, LPG, gas,
  1989. 1:25:56diesel, all these things if you are
  1990. 1:25:58using that is a byproduct of a fossil
  1991. 1:26:01fuel refine refinement. Now if that
  1992. 1:26:03crude oil supply is not there for this
  1993. 1:26:05world that is why LPG gas in Bangalore
  1994. 1:26:08which was 845 was paying last 3 months
  1995. 1:26:10back today it is 970
  1996. 1:26:13are you understanding but in your hope
  1997. 1:26:16now it'll be even more costlier actually
  1998. 1:26:18in urban cities actually the cost will
  1999. 1:26:20be less petrol in Bangalore just 3 to 7
  2000. 1:26:25I mean 3 to 5 months back it was 102
  2001. 1:26:28rupees today 111 rupees are you
  2002. 1:26:32understanding
  2003. 1:26:33in your cities three entire three cities
  2004. 1:26:35already will be 120 or 122 just go and
  2005. 1:26:38check. So that is how the prices will
  2006. 1:26:40get impacted.
  2007. 1:26:42Are you understanding? Why sir prices
  2008. 1:26:44will increase? Just think about it. If
  2009. 1:26:47petrol prices increases, diesel prices
  2010. 1:26:50increases, logistic cost also will
  2011. 1:26:52increase. The truck which will actually
  2012. 1:26:54deliver from one point to another, their
  2013. 1:26:56cost will increase automatically. Goods
  2014. 1:26:58cost also will increase. Who will pay it
  2015. 1:27:01ultimately? Consumer only should pay it.
  2016. 1:27:03No loss for the companies. At the end,
  2017. 1:27:07consumer only will suffer. The whoever
  2018. 1:27:10is going to use that product, purchase
  2019. 1:27:12at last only will suffer. Which means
  2020. 1:27:15today if some two countries are fighting
  2021. 1:27:17with each other, leaders have no problem
  2022. 1:27:20at all. They will live their lavish
  2023. 1:27:22life. But who will suffer? The people of
  2024. 1:27:24that country will suffer. And this they
  2025. 1:27:28don't understand
  2026. 1:27:29because money is everything right. So
  2027. 1:27:32that is how the people live. But anyways
  2028. 1:27:35long back like how today it is trying to
  2029. 1:27:38dominate. It is pretending it is
  2030. 1:27:40dominating this world but not. Okay. So
  2031. 1:27:42there are many dominating countries for
  2032. 1:27:44example China, Russia so many dominating
  2033. 1:27:47countries are equal. Of course India
  2034. 1:27:49also but comparatively the nuclear
  2035. 1:27:52powers the nuclear weapons missiles
  2036. 1:27:55these are the comparisons they do
  2037. 1:27:57usually one of the strongest country
  2038. 1:27:59America Russia and China and India now
  2039. 1:28:03they this American president you know
  2040. 1:28:06so-called Donald Trump he wants to
  2041. 1:28:07dominate this world by showing that Iran
  2042. 1:28:10has is in my control but nothing over
  2043. 1:28:13there so because of two countries
  2044. 1:28:16egoistic mindset
  2045. 1:28:18entire world is suffering today. Are you
  2046. 1:28:20understanding? Now long back in the year
  2047. 1:28:251990s, 1940s, 1950s, same dominance they
  2048. 1:28:29wanted to show.
  2049. 1:28:31What there was one country called as
  2050. 1:28:33Japan, I hope you know it. America went
  2051. 1:28:36and told whatever I said you should
  2052. 1:28:37listen, they said get lost. Okay, no
  2053. 1:28:40problem. They just throw uh two atom
  2054. 1:28:43bombs on Hiroshima and Nagasaki. Then
  2055. 1:28:46the entire world witnessed the true
  2056. 1:28:50disaster that can happen with an atom
  2057. 1:28:51bomb. Countries got collapsed. They
  2058. 1:28:54should again start from scratch. Civiliz
  2059. 1:28:57civilization got vanished. Are you
  2060. 1:28:59understanding? Then they treated oh
  2061. 1:29:02America means we should be a bit careful
  2062. 1:29:05otherwise same situation will happen.
  2063. 1:29:07Then America started to dominate this
  2064. 1:29:09world. This world should only follow one
  2065. 1:29:11currency, one language, dollar, English.
  2066. 1:29:16And today even today
  2067. 1:29:1890% of the transactions that India does
  2068. 1:29:21with other countries in trade is in
  2069. 1:29:23dollars only. We buy crude in dollars.
  2070. 1:29:25We buy gold in dollars. Rupee keeps
  2071. 1:29:28falling today. Why rupees in alltime
  2072. 1:29:30high? It is not a good thing. 96 rupees
  2073. 1:29:3397 rupees. Sooner it will hit 100 rupees
  2074. 1:29:36also. Worst thing. But 30 40 years back
  2075. 1:29:40rupee was 30 rupees. 40 rupees. Uh again
  2076. 1:29:43is the dollar. But today but other
  2077. 1:29:46countries they are actually becoming
  2078. 1:29:48better like yan Chinese currencies
  2079. 1:29:51Russian currencies and all. So always
  2080. 1:29:53remember a country can only grow if we
  2081. 1:29:55are net exporter not importer. Are you
  2082. 1:29:59understanding? So what I'm trying to say
  2083. 1:30:00is this country so-called America wanted
  2084. 1:30:03to dominate this world. They told
  2085. 1:30:05English is the language for this world.
  2086. 1:30:07That's why I'm speaking in English.
  2087. 1:30:09You're listening in English. Your
  2088. 1:30:11interview also will happen in English
  2089. 1:30:12only.
  2090. 1:30:14If that could have been not happened
  2091. 1:30:15maybe I could have taught you in Telugu,
  2092. 1:30:17Canada or any other regional Indian
  2093. 1:30:19language or maybe Hindi but
  2094. 1:30:22unfortunately companies don't accept it
  2095. 1:30:24right so since you are in India you
  2096. 1:30:27should take interview in Hindi they'll
  2097. 1:30:28say get lost are you understanding so
  2098. 1:30:30all those patriotism we can't show for
  2099. 1:30:33our language because the clients the
  2100. 1:30:35projects will be other countries people
  2101. 1:30:37so unfortunately interview will happen
  2102. 1:30:39in English only whether you like it or
  2103. 1:30:41you don't like
  2104. 1:30:43So you should only adjust for that. So
  2105. 1:30:45that is what they have also decided that
  2106. 1:30:47is why today your default language of
  2107. 1:30:50your mobile phone is English keyboard
  2108. 1:30:52has English keyboard. So everything is
  2109. 1:30:54English only right including the brand
  2110. 1:30:56name that you see blue star everything
  2111. 1:30:58is dominated but back then if you if we
  2112. 1:31:01have dominated the world maybe
  2113. 1:31:03everywhere Hindi you might have seen
  2114. 1:31:04maybe Canada or Telugu or whatever but
  2115. 1:31:07that was not the situation. So what I'm
  2116. 1:31:09trying to say is America told on a
  2117. 1:31:12keyboard whatever is required to
  2118. 1:31:14communicate with a computer in total you
  2119. 1:31:17require some numerical characters some
  2120. 1:31:20alphabetical characters and some special
  2121. 1:31:23characters. How many total symbols if
  2122. 1:31:26you ask me 128 symbols are sufficient.
  2123. 1:31:29That is what they gave the conclusion
  2124. 1:31:31and they told this 128 symbols include 0
  2125. 1:31:36to 9 some 10 digits. Next small A to
  2126. 1:31:40small Z 26. Next capital A to capital Z
  2127. 1:31:44one more 26 some special characters like
  2128. 1:31:47that if you add everything 128 symbols
  2129. 1:31:50you will find are you understanding and
  2130. 1:31:53this 128 symbols what you are able to
  2131. 1:31:55see can you just predict what will be
  2132. 1:31:59the length of the code binary code I'm
  2133. 1:32:02asking you huh what is the length of the
  2134. 1:32:06first symbol
  2135. 1:32:08uh seventh symbol 128th symbol Just now
  2136. 1:32:12I told you right 128 if you have can you
  2137. 1:32:15calculate the length how how can I write
  2138. 1:32:18128 in the power of two simple so what
  2139. 1:32:21I'll be doing is number of symbols are
  2140. 1:32:24128 how can I write 128 2 to the^ of 7
  2141. 1:32:29so will be the length of the code or not
  2142. 1:32:32on that note can you predict what will
  2143. 1:32:34be the first code
  2144. 1:32:36>> seven zeros what will be the last code
  2145. 1:32:39seven ones in between the combinations.
  2146. 1:32:42So what I'm trying to say is symbol one
  2147. 1:32:45is 7 zeros which I'm trying to show you
  2148. 1:32:47right now
  2149. 1:32:49like that symbol two is 6 zeros 1 next
  2150. 1:32:53five zeros 1 zero like that somewhere a
  2151. 1:32:5865
  2152. 1:33:00version of zeros and ones you'll get b
  2153. 1:33:0366 like that small a 97 like that you'll
  2154. 1:33:08get all the characters are you
  2155. 1:33:10understanding sir can you Show all this
  2156. 1:33:12particular thing. Of course, last one is
  2157. 1:33:14one one 7 ones. These all 128 symbols
  2158. 1:33:18are these guys only. If you notice few
  2159. 1:33:22things you ignore. If you start directly
  2160. 1:33:24from here space, exclamatory, quote,
  2161. 1:33:28hash, dollar, percentage, all these
  2162. 1:33:31symbols you know. Next 0 to 9 colon
  2163. 1:33:34semicolon less than equal to greater
  2164. 1:33:36than question mark. Next add the rate
  2165. 1:33:39capital A2 capital Z again bracket slash
  2166. 1:33:43cap all these things you know small A2
  2167. 1:33:46small Z again braces
  2168. 1:33:49almost 90% of the symbols you know right
  2169. 1:33:51and whatever you're able to witness in
  2170. 1:33:54front of you you can see symbol number
  2171. 1:33:56zero symbol number 127 0 to 127 128
  2172. 1:34:01symbols who gave this America gave it
  2173. 1:34:05and told this world should Follow this
  2174. 1:34:07only standard
  2175. 1:34:09and this is nothing but the code. For
  2176. 1:34:12example, I will say capital A but for my
  2177. 1:34:16computer 65 0 and1 version will be
  2178. 1:34:19there. I will say small Z somewhere over
  2179. 1:34:23here for me it is Z but for my computer
  2180. 1:34:26122 if I ask you to convert to binary
  2181. 1:34:29can you convert it? That is what RAM
  2182. 1:34:31will store. So information is getting
  2183. 1:34:33interchanged and this table what you are
  2184. 1:34:36able to see in hi-fi terms we call it as
  2185. 1:34:39ASKI table and what is the full form of
  2186. 1:34:42ASI American standard code for
  2187. 1:34:45information interchange
  2188. 1:34:48why is this called as AS as simple
  2189. 1:34:51America gave it to standardize this
  2190. 1:34:54world everyone should use this only this
  2191. 1:34:56is the code for information interchange
  2192. 1:34:58only between binary and human
  2193. 1:35:00understandable so if I take All the
  2194. 1:35:02starting letters it's your ASKI. This is
  2195. 1:35:05your ASKI table.
  2196. 1:35:08This ASKI what you're not hearing for
  2197. 1:35:10the first time in colleges you have
  2198. 1:35:12heard right. Huh? What did you
  2199. 1:35:15understand in college? Asky. Ask
  2200. 1:35:18important asky. CS aski. That's it. That
  2201. 1:35:20is all we know.
  2202. 1:35:23So this is nothing but your ask. But the
  2203. 1:35:26real question is I'm just asking what
  2204. 1:35:29you know already. Does C programming
  2205. 1:35:31language follow ASKI?
  2206. 1:35:33>> Yes, it follows ASK only. So C
  2207. 1:35:35programming language is English biased.
  2208. 1:35:39Any software you build using C can only
  2209. 1:35:43support English. But the good news is
  2210. 1:35:46Java will not follow ASKI. So then this
  2211. 1:35:50much buildup you gave no listen to that
  2212. 1:35:53Java does not follow ASKI because today
  2213. 1:35:56whatever Android you're using you have
  2214. 1:35:58multiple language support. WhatsApp is
  2215. 1:36:00supported in multiple languages. Your
  2216. 1:36:01Google keyboard can support all the
  2217. 1:36:03languages. So Java will support multi-
  2218. 1:36:06languages. Multilingual programming
  2219. 1:36:09language is your Java. So if ASKI is not
  2220. 1:36:13followed then what is followed sir? If
  2221. 1:36:15you ask me let's understand that as
  2222. 1:36:17well.
  2223. 1:36:19See before understanding that when I say
  2224. 1:36:21a just same question in my computer can
  2225. 1:36:24I directly store a in my RAM?
  2226. 1:36:26Impossible. So what is going to happen
  2227. 1:36:28if you ask me? A will get converted into
  2228. 1:36:31zeros and ones. How? Observe. If I just
  2229. 1:36:34go back to that ASKI table once again
  2230. 1:36:36have a look at it. Where is A? If you
  2231. 1:36:38ask me somewhere over there for you, I
  2232. 1:36:40bought one binocular lens also a
  2233. 1:36:42magnifying lens 65. My question is if I
  2234. 1:36:46ask you to convert 65 to zeros and ones
  2235. 1:36:48you can do it, right? Same thing
  2236. 1:36:50internally also will happen. So for you
  2237. 1:36:53it is a but for my RAM 65 is divided
  2238. 1:36:57with two 2 32 times again I'll divide it
  2239. 1:37:01remainder is 1. Next 2 16 are what is
  2240. 1:37:04the remainder? Zero. 2 8 are what is the
  2241. 1:37:06remainder? Zero. Again 2 4 are remainder
  2242. 1:37:09is zero. Last but not least two 2's are
  2243. 1:37:12zero and two 1's are. And if you notice
  2244. 1:37:16one thing for you it is a for my RAM it
  2245. 1:37:20is 1 0 0 0 1. Are you understanding?
  2246. 1:37:25Everything that you type including your
  2247. 1:37:28Android mobile phone also the message
  2248. 1:37:30that you send. Hi, how are you? Missing
  2249. 1:37:32you and all. Also, every character will
  2250. 1:37:35be converted into zeros and ones. Are
  2251. 1:37:38you understanding? So that is what I'm
  2252. 1:37:40trying to say.
  2253. 1:37:41Any doubts? Of course, that is your
  2254. 1:37:43binary. But my question is this is the
  2255. 1:37:45most important question. How many bits
  2256. 1:37:47did I get?
  2257. 1:37:49>> Seven bits. What is the minimum memory I
  2258. 1:37:52can get from my RAM?
  2259. 1:37:54>> One bite. Eight bits. Which means in
  2260. 1:37:57this one bite I will try to fit all the
  2261. 1:38:00eight bits but one space is empty what
  2262. 1:38:02will be there? Zero. This comes to the
  2263. 1:38:05most controversial question in the
  2264. 1:38:06interview. Is ASKI seven bit or 8 bit?
  2265. 1:38:11Think and answer
  2266. 1:38:14smartly.
  2267. 1:38:16This question I think you might have got
  2268. 1:38:17somewhere. No, they'll ask. I'm saying
  2269. 1:38:21no. Tell me is ASKI code a seven bit
  2270. 1:38:26code or 8 bit code?
  2271. 1:38:29>> If you are smart how you will answer is
  2272. 1:38:31ASI is a seven bit code but in the RAM
  2273. 1:38:34it is stored as 8 bits because the
  2274. 1:38:36minimum memory my RAM can give is 8
  2275. 1:38:38bits. Are you understanding? ASI itself
  2276. 1:38:41is 7 bit only but in the memory it is 8
  2277. 1:38:44bits. Why? I hope you understood. So
  2278. 1:38:46this is how you can answer clear but
  2279. 1:38:49anyways
  2280. 1:38:51my A whatever you are able to see
  2281. 1:38:54this is how you write even in C also
  2282. 1:38:56character CH equal to A correct now the
  2283. 1:39:00question is look at the memory and tell
  2284. 1:39:02me how many bytes will it occupy
  2285. 1:39:06look at that and tell me one bite so in
  2286. 1:39:09C programming language how many bytes
  2287. 1:39:12does my character data type occupy if
  2288. 1:39:14you ask me one bite No doubt about it.
  2289. 1:39:17So one bite. But what about Java?
  2290. 1:39:20One bite or some other answer.
  2291. 1:39:24So in Java same code only you'll write
  2292. 1:39:27character CH equal to A. In Java it is
  2293. 1:39:30not one bite. Sir how many bytes sir?
  2294. 1:39:33Two bytes. Sir why sir? Two bytes. A a
  2295. 1:39:3765 right? In Java also 65 only. Then why
  2296. 1:39:40sir? What is the problem? To understand
  2297. 1:39:42this you attend my tomorrow's class. I
  2298. 1:39:44hope you understood. So in tomorrow's
  2299. 1:39:46class, we'll understand why Java
  2300. 1:39:48supports all the languages and why it is
  2301. 1:39:50not one bite, it is two bytes. So we'll
  2302. 1:39:53continue with interview questions on
  2303. 1:39:55data types in tomorrow's class. Okay? So
  2304. 1:39:57thank you very much. If you have any
  2305. 1:39:59questions, please come and meet me. Same
  2306. 1:40:01place, same time. Tomorrow we'll meet.
  2307. 1:40:03Thank you.

About this transcript

This page contains the full transcript of Java_D01 - Main Method || Data Types - [18-08-2026] by Tapacadlive, generated from the public captions YouTube serves with the video. The transcript has 16,091 words across 2,307 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 translate the transcript into 100+ languages.

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, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.