Java_D01 - Main Method || Data Types - [18-08-2026] — Transcript
Full transcript
- 0:05Great. Thanks for the confirmation.
- 0:13Very good afternoon everyone.
- 0:16>> No energy on. Good afternoon everyone.
- 0:19>> Great. So I think probably
- 0:22you might be actually wondering who is
- 0:24this fellow who is what he's going to
- 0:26teach and all. So let me introduce
- 0:28myself. My name is Harshett. I'm a
- 0:30senior technical trainer here at TAP
- 0:31Academy. So from the last four years I
- 0:34have been training multiple students. So
- 0:36I have seen different different people
- 0:38from different different colleges. So I
- 0:40don't statistically remember how many
- 0:42people I have trained around 50,000 plus
- 0:45uh students easily I could have trained
- 0:47in the last four years of my career. So
- 0:49the faces which I'm seeing right now
- 0:51might be new but the problem the
- 0:54struggle everything is already known for
- 0:56me and definitely for whatever purpose
- 0:59you are sitting in front of me I will
- 1:01make sure that that purpose will be
- 1:03fulfilled and before leaving this
- 1:05classroom definitely you'll get that
- 1:07confidence that okay something new we
- 1:09have learned today and you'll be
- 1:10confident about that as well. So if I'm
- 1:12not wrong, I think probably if you're
- 1:14sitting in this classroom, you have
- 1:16decided Java is going to be my backend
- 1:19language. If I'm not wrong, correct?
- 1:22Yes. Why particularly Java? I need not
- 1:25to say of course technically I'll be
- 1:27speaking a lot but non-technically you
- 1:30might have judged Python and Java in
- 1:32different aspects.
- 1:34Probably for the very first time in your
- 1:36lifetime also you thought Python only is
- 1:38easy if I'm not wrong. Later you
- 1:40realized okay to become a amazing
- 1:43back-end engineer maybe Java is most
- 1:45preferred though it is difficult let us
- 1:48compromise on difficulty but you'll get
- 1:50a stable growth you'll become a a better
- 1:52backend engineer a software engineer
- 1:54these might be the decision making
- 1:56factors for you people if I'm not wrong
- 1:58correct or one more way is how many how
- 2:01many of you are computer science
- 2:03background students please raise your
- 2:04hands oh my god I have just asked the
- 2:06wrong question so almost 90% % of the
- 2:10people are computer science. Anyone from
- 2:12mechanical, civil, electrical
- 2:14backgrounds?
- 2:16Okay, a couple of them. EC and Ale as
- 2:18well. Okay, a couple of them are there.
- 2:21But let me tell you Java is one of the
- 2:24biggest nightmare for EC, triple E,
- 2:27civil, mechanical for them programming
- 2:30language means C if not Python. These
- 2:32are the only two choices they had in
- 2:34college. Not now in college. So then you
- 2:38decided okay language means Python we
- 2:41never know that Java existed actually to
- 2:43be honest this is the reality of non CS
- 2:47background students the reality is they
- 2:49don't even know Java is there correct me
- 2:52if I'm wrong correct so in most of the
- 2:54colleges people doesn't even know
- 2:56[clears throat] what is Java they might
- 2:57have not even seen Java in their
- 2:59lifetime but probably for most of you
- 3:02already certain classes have been
- 3:03happening from a couple of weeks for
- 3:06certain people over here Maybe one week
- 3:07of classes you might be attending and
- 3:09this might be your seventh class or
- 3:10eighth class but doesn't matter we are
- 3:13going to completely focus on Java from
- 3:16scratch. So what is your previous
- 3:19knowledge I am not bothered about it
- 3:21I'll be actually teaching from scratch
- 3:23and let me tell you if you trust Java if
- 3:26you have that faith in Java it will take
- 3:28you somewhere that you can't even
- 3:30imagine. So today even today in the
- 3:33world of AI no one even can touch a Java
- 3:37developer who is an expertise in spring
- 3:39spring boot and all AI will replace and
- 3:41all that thing only remove it from your
- 3:43brain. Even after 5 years even after 10
- 3:46years a person who is an expertise in
- 3:48Java will still be relevant in IT
- 3:50industry. This is one fact I would like
- 3:53to start with. So one more thing why
- 3:56particularly Java sir my some of my
- 3:58friends are in Python class in SBI maybe
- 4:01I just came this to this class to see
- 4:03what will what will be there in Java
- 4:05maybe tomorrow the same strength can I
- 4:07expect or not I'm not sure maybe in the
- 4:09one and a half hour you'll decide you'll
- 4:11judge should I be in this class or
- 4:14should I go to Python you will judge it
- 4:15in the next one and a half hours right
- 4:17don't worry I will ensure you'll make a
- 4:19correct judgment okay don't worry about
- 4:21it and one more thing
- 4:24Why Java? The main important question
- 4:26sir, Python is also there, right? Why
- 4:28Java? In my classes, I'll speak about
- 4:31Java only. I hope you're understanding.
- 4:33I'll not apprise or I'll not appreciate
- 4:35Python. See as a language if you notice
- 4:38both are equally important and everyone
- 4:41has their own use cases situation based.
- 4:44But in my classes, I'll appreciate Java
- 4:46only. And you should not think this
- 4:47fellow is partial. I will be partial
- 4:49only. Are you understanding? because you
- 4:51have opted you have you have seriously
- 4:53selected that I want Java so I should
- 4:54speak advantages disadvantages also I'll
- 4:57speak but moreover why Java is what I'll
- 5:00be focusing on rather than why Python I
- 5:03don't want to make you to feel regret
- 5:05why you did not select Python I hope
- 5:07you're understanding so coming to the
- 5:09fact why Java I'll just give you some
- 5:12reasons you can just make sure that yes
- 5:15I took a right decision today any
- 5:18application that you're using if If you
- 5:20go to any shop, you'll make payment,
- 5:22right? How do you make the payment? UPI,
- 5:24which is nothing but phone pay, Google
- 5:26pay, uh, razor pay. So, different
- 5:28different options you have. All the
- 5:30banking application back end is still
- 5:33Java only. And even 10 years later also,
- 5:36I'm telling you, I can guarantee banking
- 5:39application backend code AI will not
- 5:42even touch.
- 5:44Company will never allow AI to be used
- 5:46in the banking softwares. I hope you're
- 5:49understanding. So large banking systems
- 5:52especially you might have heard JP
- 5:54Morgan similarly Goldman Sachs. So like
- 5:58this there are top tech banks
- 5:59international bank companies where still
- 6:02the back end is job still there are so
- 6:04many openings even today but the reality
- 6:07is that opportunity will meet only the
- 6:10right person. Opportunity is there but
- 6:12it will only meet the right person. Your
- 6:14fundamentals should be super strong and
- 6:18your syntax is actually the most
- 6:20important thing when you are writing a
- 6:22Java code. What is a class? When to
- 6:24create a class? When object should be
- 6:25created. So different different thought
- 6:27processes are very important.
- 6:30Architecture level thinking is important
- 6:32to get into that companies.
- 6:34One more thing today most of you are
- 6:37using applications. Whatever phone pay
- 6:38you told where are you using in your
- 6:40mobile phone every mobile phone will
- 6:42have operating system and in India
- 6:45almost 70 to 80% of the users are
- 6:47Android users and Android is an
- 6:50operating system it is a software only
- 6:52right the back end of Android is Java
- 6:55most of the top tech companies like Meta
- 6:58and FA that is what Facebook or Meta
- 7:00both are same Google Microsoft and most
- 7:04of these companies also they have
- 7:05multiple products still Java only is
- 7:08preferred. So which means a job which
- 7:11can pay you 3.5 lakhs peranom all the
- 7:13way till 35 lakhs peranom in this entire
- 7:16broad range Java has a lot of relevance.
- 7:19So enough appreciating Java let's go
- 7:23into technical part and understand all
- 7:25these things. Anyways
- 7:27already few knowledge you already have
- 7:29about Java right. So Java is a
- 7:32objectoriented language. It's a platform
- 7:34independent language. It's a robust
- 7:36programming language. A lot of features
- 7:38you might have gone through and we'll go
- 7:40deeper into every feature. And few
- 7:42things I would like to ask you people
- 7:44before me speaking. What do you mean by
- 7:46platform independence?
- 7:51>> Huh?
- 7:55>> Okay. Can you see already problem
- 7:57started? What is the problem? Not able
- 8:00to answer the question which already you
- 8:03know isn't it? Do you know what is
- 8:06platform? Yes. So operating system means
- 8:08platform. We already know. You know what
- 8:10is independent? Yes. Not being
- 8:12dependent. So Java is a platform
- 8:16independent language. Which means Java
- 8:19doesn't care which OS you're using. Long
- 8:22story short. So compilation can happen
- 8:24in one OS. Execution can happen in any
- 8:27OS. This is the feature of Java and
- 8:31Python also. But I'll not speak about
- 8:32Python. I told you. So why Java is very
- 8:36famous if you ask me this is the number
- 8:37one reason and trust me today whatever
- 8:40software that you built in Windows can
- 8:42be used by Mac user also can be used by
- 8:45Linux user also but the problem with C
- 8:48and C++es you need to compile in every
- 8:51operating system to serve all the users
- 8:54that is the problem who will develop
- 8:55again and again so that is the first
- 8:57thing and how did Java achieve this is
- 9:00the next question how
- 9:02because of to important changes that
- 9:04happens the compiler the Java compiler
- 9:08will never give you zeros and ones it
- 9:10will give you something known as byte
- 9:12code and what is the extension of byte
- 9:15code
- 9:16>> class dot class if you did not
- 9:19understand I will write a Java file I'll
- 9:21save it what is extension dot Java if I
- 9:25save a C program C for C++ CP for Python
- 9:29py so for text file notepad you'll type
- 9:32something you'll save it. What is
- 9:34extension? txt pdf means dot pdf like
- 9:37that byte code also will have an
- 9:39extension no that is dot class that is
- 9:42the extension you can't understand what
- 9:44is there inside that who can understand
- 9:47only one software can understand that is
- 9:49java virtual machine so java virtual
- 9:52machine the primary task is to take byte
- 9:55code convert into zeros and ones and
- 9:57execute it. The next obvious question
- 10:00they can ask you is is JVM platform
- 10:03dependent or independent?
- 10:06Listen to the question very carefully.
- 10:08Java you told sir platform independent
- 10:10we know it. JVM is it platform dependent
- 10:13or independent?
- 10:15>> Independent.
- 10:17>> Dependent.
- 10:18>> Are you sure?
- 10:20>> Okay. JVM is platform dependent because
- 10:24in my Windows OS I can't install Mac OS
- 10:27JVM. Right. It is specific. It is
- 10:30dependent on my OS. Are you
- 10:32understanding? So this is one thing you
- 10:34should understand. Java as a language is
- 10:36platform independent. But JVM as a
- 10:38software is platform dependent. Don't
- 10:41get confused. Are you understanding? So
- 10:43this is how the architecture of Java
- 10:45looks like. So high level give it to
- 10:47compiler. Compiler gives you byte code.
- 10:50Byte code will be given to JVM. Next JVM
- 10:52will give you zeros and ones. So because
- 10:54of this byte code and JVM it was
- 10:57possible for you to achieve platform
- 10:59independence. So in an interview if they
- 11:02ask you can you explain how Java
- 11:04achieved platform independence. How
- 11:05would you answer simple don't buy heart
- 11:09when I give an answer answer like this
- 11:11it need not to mean that you should buy
- 11:12heart it's a framework oh step one step
- 11:15two step three point wise first explain
- 11:18what is platform independence. So, Java
- 11:20is such a programming language which is
- 11:22not dependent on OS. It can be compiled
- 11:25in one OS. It can be executed in any OS.
- 11:27This is the meaning of platform
- 11:28independent. Coming to the point how it
- 11:30is achieved. Simple same architecture
- 11:33you explain. So, compiler gives me byte
- 11:36code. That bite code is given to JVM.
- 11:38JVM will actually execute the zeros and
- 11:40ones. So, this is how Java has achieved
- 11:43platform independence. I can compile in
- 11:44one OS, execute in any OS. This is how
- 11:47you need to explain. And also Java is
- 11:50not dependent on your microprocessor
- 11:52also. You use i3, i5, i9, AMD, Ryzen 5
- 11:57doesn't matter. So it is architecture
- 12:00neutral. Architecture means what?
- 12:02Design. Whose design? Not computer
- 12:06design. Microprocessor design. I hope if
- 12:09you are a computer science student at
- 12:11least some somewhat technical knowledge
- 12:13you'll be having, right? Every processor
- 12:15has a different design, different cores,
- 12:18different threads. You might have
- 12:20noticed, right? So 60 bit uh 64-bit
- 12:23processor, 32-bit processor, every
- 12:25processor is unique. And the fun fact is
- 12:29just in i5, you know, right? Just in i5
- 12:32only 10 variants will be there if you
- 12:33don't know. So processors are having
- 12:36variety of variants. So is Java
- 12:39dependent on it? No. It's architecture
- 12:41neutral. It's also known as a portable
- 12:44language. Why? Very simple. I can
- 12:46compile over here. I can execute in all
- 12:48of your systems. It's easily
- 12:50transportable. That bite code I can send
- 12:52it to you. Are you understanding? Easily
- 12:54transported. So these are some essential
- 12:56features which you have seen. Later you
- 13:00understood there is something called as
- 13:01object orientation. The most important
- 13:04principle. I think some fundamentals
- 13:06were explained for you. What is object
- 13:08orientation?
- 13:11C++ is object-oriented. Java is
- 13:13object-oriented. JavaScript is
- 13:15object-oriented. Python is
- 13:16object-oriented. Scala is
- 13:17object-oriented. All the languages which
- 13:19are there right now are object-oriented
- 13:21only. What is object oriented?
- 13:23>> Perception.
- 13:26>> Okay. Great. Yes. Next.
- 13:29>> Perception.
- 13:30>> Perception. What perception?
- 13:33>> How we see?
- 13:35>> So basically how we see something as an
- 13:37object. Great. Any other answers?
- 13:40Okay, very simple. There are three
- 13:41points which you have learned. One is
- 13:44this any this world whatever you see
- 13:46it's a collection of objects everything
- 13:48is an object including me including you
- 13:50also everything is a collection of
- 13:52objects and every object if you notice
- 13:54belongs to one category I belong to
- 13:56teacher category you belong to you're
- 13:58not a student anymore fresher category
- 14:00remove that from mind first you're not a
- 14:02student you're a fresher you are a you
- 14:04are you have graduated that is how I
- 14:06think I never see you people as a
- 14:08student I'll be very clear I have here I
- 14:11have I'm there over to serve one purpose
- 14:14to get you placed at any cost. At any
- 14:16cost but are you really ready to put
- 14:19that effort is the question you answer
- 14:21yourself. So I am here to place you as
- 14:24fast as possible and equally you should
- 14:27also put effort. So that is the only
- 14:29purpose. You in my eyes maybe you can
- 14:32think you are my student but I think you
- 14:35are a candidate who came out of college
- 14:38in this city where it's very expensive
- 14:41and you are here to hustle to get a job
- 14:44as soon as possible to make your dreams
- 14:46fulfilled. So let's work to that
- 14:48particular goal. Don't get distracted
- 14:50unnecessarily. Now itself I'm saying
- 14:53everyday motivational talks I'll not
- 14:55give. I'm saying right now I'm not such
- 14:57person who will come and give
- 14:58motivational talks. Don't you think if I
- 15:02motivate for 10 minutes I personally
- 15:05feel it is time waste. Why sir if you
- 15:07ask me in that 10 minutes I could have
- 15:09taught you a concept which can be asked
- 15:11in an interview. Are you understanding?
- 15:14And again, don't get me wrong. If you're
- 15:18expecting someone else to motivate, your
- 15:21mindset is weak. I'm repeating this. If
- 15:25you're expecting, sir, someone will
- 15:27motivate, I'll become motivated, then I
- 15:29will start. Which means already you have
- 15:32told to yourself, I'm weak. Please stop
- 15:35pretending all these things. So don't
- 15:38wait for others to motivate. Why should
- 15:40someone motivate you?
- 15:42So this is what you have done in your
- 15:44last four years of engineering
- 15:46motivation then only study. So enough no
- 15:50one is going to motivate have self
- 15:51motivation I should do that's it there
- 15:53is no uh what do you call reasons for
- 15:55giving that so please do it if it is
- 15:57required you should do it at any cost
- 15:59anyways coming back to the point so next
- 16:02every object belongs to a category is
- 16:04what we understood what is a category
- 16:06basically I belong to teacher you belong
- 16:08to fresher next this belongs to
- 16:10electronic gadget whatever it belongs to
- 16:13furniture so like the different
- 16:14categories you can categorize in Java
- 16:18Specifically that category we call it as
- 16:20class.
- 16:22Class is not real. It is imaginary. If
- 16:25you did not understand you want to
- 16:27construct a house. Basically there is a
- 16:30blueprint. Is it reality? No. It is just
- 16:33an imagination. Okay. Architect has
- 16:35thought. This can be the plot. Maybe 4
- 16:38BHK duplex. Just thought is thought only
- 16:42right? It is it is it real? No. It takes
- 16:448 months or 1 year to bring it to
- 16:48reality. Maybe in Bangalore if you want
- 16:50to do that at least three crores you
- 16:52require only building I'm saying land 1
- 16:5515 crores you require this is the
- 16:57reality especially in BTM core Mangala
- 17:01JP Nagar Jagar one square ft will touch
- 17:0530,000 if you don't know 30,000 is one
- 17:09square one square ft you know how much
- 17:12it comes if you want to construct a very
- 17:14good house at least they said 30 40 site
- 17:17you remember what do you mean by 30 40
- 17:2030 + 40 1 1200 square ft² you require in
- 17:24that case 8 9 crores just for land that
- 17:27is a reality where are we we should
- 17:30think are you understanding can we
- 17:33achieve it yes you should hustle a lot
- 17:36it is possible one day but when is that
- 17:38one day I don't know you you should
- 17:41answer for yourself are you
- 17:42understanding so anyways that is not the
- 17:46point so I was just speaking about
- 17:48something that whatever object you are
- 17:51able to see it belongs to class. Class
- 17:53is not real. It is just imaginary. But
- 17:55what is real? That house which you
- 17:57construct is real. The object is real.
- 18:00When I say real in reality in your
- 18:02computer, in your RAM, it is created.
- 18:05Some storage, some space is created. It
- 18:08is real. Are you understanding? Later
- 18:12you understood one most important point.
- 18:14Every object has something some
- 18:17properties name, age, gender, which
- 18:20technologies I teach. These are all my
- 18:22properties. I can also do something. I
- 18:25can teach, I can run, I can sing, I can
- 18:28dance. So different different actions
- 18:29also I can perform. But coming to Java's
- 18:32perspective, whatever I told has is
- 18:35taken care by variables or data types
- 18:38basically. So using data types, you can
- 18:40store the properties. Sir what about
- 18:43behavior methods don't use function
- 18:47function is not the terminology of Java
- 18:49we call the math method I think some
- 18:51glimpse might be given by your sasar
- 18:53correct so this was understood for you
- 18:56by Java that's it nothing extra you have
- 18:59learned and completely you focused on
- 19:01logic building problem solving arrays
- 19:04all those things but I'll be completely
- 19:07teaching you the theoretical part where
- 19:09in technical facetoface 100 cross
- 19:12questions they can ask you every
- 19:14question they ask you can answer that is
- 19:16my guarantee by the end of these Java
- 19:17classes so but one expectation from
- 19:20today I'll make it very clear so in my
- 19:24classes I will not tolerate people using
- 19:27mobile phones unnecessarily unless if
- 19:29anything is important you can take a
- 19:31picture I have no problem next if you
- 19:34want you can take notes when I say notes
- 19:37for example I'll teach something known
- 19:38as encapsulation let us assume sir
- 19:40encapsulation Sir please tell me what is
- 19:42a definition sir please tell me what is
- 19:44a spelling no in my class notes means
- 19:48important points maybe two three points
- 19:50that's it I will give you a descriptive
- 19:52comprehensive notes already printed
- 19:55notes is given for you people on the top
- 19:57of which whatever I speak in this class
- 20:00you want that also that also will be
- 20:02provided I'll tell you how exactly as
- 20:04days progresses so notes don't think too
- 20:07much about notes in my class you should
- 20:09only think about one
- 20:11understanding the concept. How will they
- 20:14ask in the interview? Why will they ask
- 20:16in the interview? Where is it used in
- 20:18the real world software application?
- 20:20That's it. So later recording is there,
- 20:23notes is there. You prepare for yourself
- 20:26in the class. Don't deviate yourself.
- 20:29Your friend did not understand asking
- 20:31you. No, no problem. After the class
- 20:34half an hour, I'll wait there itself.
- 20:35You can come and ask me any doubt. Are
- 20:38you understanding? in Java sir python
- 20:40dot go to that classroom understood so
- 20:43this is what I expect so let's continue
- 20:48and let's start a quick revision is
- 20:50required before me directly starting
- 20:52today's concept so I think probably some
- 20:55programs you might have solved data
- 20:57types introduction was given for you you
- 20:59remember so what is a data type
- 21:01according to you simple sir usually this
- 21:03world is not of binary your name my name
- 21:07my mobile number your height, your
- 21:09weight, is it in zeros and ones? No. But
- 21:12unfortunately, my computer cannot
- 21:15understand all these things. It can't
- 21:17understand my name. It can't it can't
- 21:20store my number. So, it can only store
- 21:22zeros and ones. My processor can process
- 21:25only zeros and ones. My RAM can store
- 21:28only zeros and ones. So, what to do?
- 21:30They understood we require a converter.
- 21:33In every programming language, there is
- 21:35a converter. So data type is a facility
- 21:38where it will convert the real world
- 21:40data into zeros and ones as simple as
- 21:42that. Are you understanding? So that is
- 21:45the purpose of data types. In every
- 21:47language data type is there. But in some
- 21:50languages like Python and JavaScript
- 21:53explicitly you will not mention int a
- 21:55equal to and all you will not say that
- 21:58is the syntax basically but data types
- 22:00will be there. Are you understanding? So
- 22:02anyways, let's start writing our first
- 22:05Java program today. Understand
- 22:07technically. So what I'll be doing is in
- 22:09my classes to teach Java, I'll be using
- 22:12Eclipse. I think you might also have
- 22:14been familiar with this. You can use
- 22:16Eclipse. You can use IntelliJ also if
- 22:19you want. Okay. But I'll be preferring
- 22:21Eclipse itself. So this is how the
- 22:23Eclipse looks like. I will show you how
- 22:25to set up the project also if you don't
- 22:27know. So quickly I'll just open my
- 22:31screen.
- 22:33Okay.
- 22:36Okay. So this is how the Eclipse
- 22:38interface looks like for a first time.
- 22:40All these things will not be there. I'll
- 22:42just remove everything. This is how
- 22:44blank it will be like. Okay. Step one.
- 22:46Can you see on the top? There is
- 22:47something as file. Click on the file.
- 22:50You can see new. When you see new, you
- 22:52can see Java project. Now sir, what is
- 22:54that Maven project? What is that spring?
- 22:56It's not for today. We'll keep it for
- 22:59later in project building sessions in
- 23:01your advanced Java. You'll get to know
- 23:04all those things. But for today, what is
- 23:06Java project? You need to understand
- 23:08very simple. It's a place where I can
- 23:10write my Java code. As simple as that.
- 23:12But some people might come for me and
- 23:14say, "Sir, I'm not able to see the Java
- 23:16project. There is a problem with my
- 23:18Eclipse." No problem. Sometimes the
- 23:20perspective might have been changed.
- 23:22There are two perspectives. One is Java,
- 23:25one is Java E. In Java double if I click
- 23:28on file and new obviously I'll not see
- 23:30Java project. So if you got the problem
- 23:33what you should do just go over here and
- 23:35click on Java project. So Java project
- 23:38that icon only I'm not able to see. Then
- 23:40what should I do for that? Go to window
- 23:43go to perspective and click on open
- 23:46perspective and you can get Java. Are
- 23:48you understanding here also you can get
- 23:50it. Anyways we are already in Java. It
- 23:51will not show. Next click on file new
- 23:55Java project. It will show you a pop-up.
- 23:59What is the name? For example, I'll say
- 24:01Java.
- 24:03Uh maybe I'll say what is the month for
- 24:05today. I'll say August. So I'll say Java
- 24:08August like this. Uh and I'll say new
- 24:10just for example. Next it is asking what
- 24:13JRE do we want? All those things are
- 24:15none of our business for today. Let's
- 24:17ignore it. So directly I'll click on
- 24:19finish. But wait module info on Java.
- 24:23You're able to see right? Never ticket.
- 24:25So keep it like that itself. Okay. So
- 24:27I'll just click on finish. So brand new
- 24:30Java project got created. Now once Java
- 24:33project is created, you should type you
- 24:35should start typing. So you need to type
- 24:36it in a class. So I'll just create a new
- 24:40class like this. And the name of the
- 24:41class today is your day one of Java
- 24:43class. So I'll say day one. And as I
- 24:45want main method, I'll say finish.
- 24:48This is how you can set up your Eclipse.
- 24:51Clear? Great. Now the moment I actually
- 24:55open this code, you can see one thing
- 24:57already. It is available. What is class?
- 25:00I hope all of you know it. Class is
- 25:02something which is imaginary. And let me
- 25:04tell you, every line of code in Java
- 25:08should compulsory be inside class. Are
- 25:11you understanding? One line outside
- 25:13class you can't write. I hope you're
- 25:16getting the point. Now 100 questions you
- 25:18might have. Sir, can we create more than
- 25:20one class? Can we create 100 classes?
- 25:22All those answers you will get it. Don't
- 25:24worry. Are you understanding? So what is
- 25:26the first rule? Every line of code
- 25:28should be inside a class itself. Outside
- 25:30you cannot write. This is the first rule
- 25:32of Java. Next, if you want your Java
- 25:36program to execute compulsory, there
- 25:38should be one method. What is that
- 25:40method? Main method. What is main
- 25:42method? Very simple. See if you notice
- 25:46public static void main string arcs.
- 25:50What is this public static void main
- 25:52string arcs? I just want to give a
- 25:54glimpse then we can start actually
- 25:55continuing. So let me close this
- 26:00observe.
- 26:02See I think probably this was the code
- 26:05when you have seen I think uh on the day
- 26:07of object orientation you remember. So
- 26:10there is something as class car. We have
- 26:13name, cost, mileage, start, accelerate,
- 26:17stop. Some methods are also there. Now,
- 26:20unfortunately, this code if I execute it
- 26:23will not work. Why? If you ask me in my
- 26:25computer, yes, there is my J JVM and all
- 26:29all those things also might happen, but
- 26:31especially JVM will tell you I cannot
- 26:33execute it because main method is not
- 26:37found. Now, why exactly is that problem?
- 26:39If you ask me, observe very carefully.
- 26:41See I have Windows operating system I
- 26:44also have something known as uh what do
- 26:46you call Mac OS at the same time I also
- 26:48have Linux operating system was it
- 26:50already taught for you earlier yes so
- 26:53I'll just give a glimpse again I don't
- 26:55want to go deeper because already you
- 26:56know every operating system if you
- 26:58notice definitely who is the boss of
- 27:01your computer operating system your RAM
- 27:04your hard disk your GPU your CPU
- 27:07whatever you name OS only will control
- 27:10it similar Clearly think about it. I
- 27:12will write one Java code. Where is it
- 27:15stored? Where is it stored? Inside RAM
- 27:18itself. Sir, I don't know what you are
- 27:20speaking about. I'll show you. Observe.
- 27:22See if I just search for something
- 27:24called as task manager.
- 27:28I hope everyone might have seen at least
- 27:30this once in a lifetime. This is only
- 27:32the virtual representation of your RAM.
- 27:35If you notice one thing, out of 32GB is
- 27:38the RAM. out of that 47% of the RAM is
- 27:42used by whom? By any desk, by eclipse,
- 27:45by chrome, by mirroring 360. So all the
- 27:48softwares are using my RAM currently.
- 27:51And somewhere I'll type my Java program.
- 27:53It is in Eclipse only, right? Where is
- 27:54Eclipse inside RAM? So, so what I'm
- 27:57trying to say is the Java program which
- 27:59I typed currently it is in my RAM. So
- 28:02who should give permission for the RAM?
- 28:03Operating system. Now operating system
- 28:06will not give anywhere it want. it'll
- 28:08give to main method. Are you
- 28:10understanding? So whatever you call your
- 28:12main method is the entry point of your
- 28:15Java program. Clear? So let me close
- 28:18this. Yes. So what I'm trying to say is
- 28:22for all the programming languages of
- 28:23this world main method is compulsory. Of
- 28:26course something like Python and
- 28:28JavaScript is exclusive for the main
- 28:31method is not required. Internally it
- 28:32will be already there. So the permission
- 28:34whichever is required is provided by
- 28:37something called as main method or main
- 28:40function. Are you understanding? Let's
- 28:42understand. Imagine in C programming if
- 28:45I want to print hello world already you
- 28:47know include std io. Something you'll
- 28:49say right and some void main you'll
- 28:51write and you'll say quickly print f
- 28:53hello world. And your teacher used to
- 28:56say void main compulsory. You never
- 28:58cross question why compulsory no answer.
- 29:01Why is it compulsory? Because my
- 29:04operating system should give permission
- 29:06for my program and that control of
- 29:09execution will always be given only for
- 29:12one function that is main function. Are
- 29:15you understanding? No problem. Even if
- 29:17you know all of this just think today is
- 29:19a revision class from tomorrow we'll go
- 29:21much deeper. Don't worry about it. So
- 29:24now this main function is exists right?
- 29:26That is the reason permission is given
- 29:28printing will happen on the screen. But
- 29:30same thing if I should write it in
- 29:32Python simply you'll say print that's it
- 29:35but same thing if I should write in Java
- 29:37observe carefully
- 29:40include and all I should not I'll just
- 29:41ignore it in Java first and foremost
- 29:45void main is compulsory but before void
- 29:48main something you should write already
- 29:49you know it so it is none other than
- 29:51public and static but why public and
- 29:54static might be the question let us
- 29:56understand in the easiest way possible
- 29:58now before understanding Learning public
- 30:00static to print something in Java you
- 30:03should understand something there are
- 30:05two things you should understand one is
- 30:07input one is output printing is an
- 30:10output thing right it is output so you
- 30:13should actually attach one pipe I think
- 30:15you might have learned that pipe
- 30:17technically is called as output stream
- 30:20what is that output stream and the name
- 30:22of that stream is system out so
- 30:26system.out out is an output string and
- 30:29ultimately what you want to do I want to
- 30:31print something so I should call
- 30:33system.out out output string and I'll
- 30:35say dot print or print ln or print f
- 30:39also you can say so print print ln print
- 30:42f there are three print statements what
- 30:45is the difference you'll understand next
- 30:47I want to print hello world I'll
- 30:48directly say clear next now observe
- 30:52control will be given but unfortunately
- 30:55I told you the most important rule in
- 30:56Java what is that without a class can
- 31:00you write this no so what is expectation
- 31:02if you ask me Java will not allow it
- 31:05expect something where is class so I'll
- 31:08write class demo opening closing
- 31:12understand one thing what do you mean by
- 31:14opening bracket and closing bracket this
- 31:16is the starting of the class this is the
- 31:18ending of the class technically this we
- 31:21call it as a block
- 31:23unfortunately in Python that block does
- 31:25not exist you'll use colon okay anyways
- 31:27ignore so void main opening closing
- 31:31understood so this is So we write now
- 31:34observe yes class is there main method
- 31:36is there it will work right? No it will
- 31:37not work because class is there but main
- 31:40method is not visible for your operating
- 31:43system. Are you understanding? So main
- 31:46method should definitely be public. You
- 31:49just think about it. Public means what?
- 31:51Forget about Java for the time. Public
- 31:53means what?
- 31:55>> Public transport. Public toilet.
- 31:57Basically everyone can access it.
- 32:01Public transportation is accessible by
- 32:03everyone right but unfortunately right
- 32:05now in Bangalore and Hyderabad it is not
- 32:07accessible by everyone only accessible
- 32:09by such people who can use it for free I
- 32:12hope you're understanding so today a
- 32:15person even I'll pay 50 rupees please
- 32:17give me seat no you'll not get it that
- 32:20is how the situation has happened but
- 32:21anyways what I'm trying to say is public
- 32:24is accessible by everyone and whatever
- 32:27public you're seeing over here also
- 32:29serves the same purpose public is for
- 32:32accessibility only. It's called as an
- 32:35access modifier
- 32:37which will help your Java to access this
- 32:40main anywhere in the Java project. Are
- 32:44you understanding? Anywhere in your
- 32:46entire Java project, you can access main
- 32:48method because it is public. It is
- 32:49available for everyone. Clear? But
- 32:53unfortunately, think about it very
- 32:55carefully. I want you to go back and
- 32:57understand that object orientation
- 32:59class.
- 33:00If you want to call a method, imagine I
- 33:03want to start the car. Tell me how did
- 33:05you start the car? I don't I'll put key
- 33:07and I'll start. No, that is not what I'm
- 33:09asking. I'm asking in Java, how do you
- 33:11start a car?
- 33:14>> First thing I'll create an object of the
- 33:16car. Then I'll say C1 is the reference.
- 33:20C1 dot start. You told you remember. But
- 33:24if you notice one thing, main is also
- 33:26method only. Start also was method only.
- 33:29Now the question is if main method
- 33:31should be called first create an object
- 33:33of demo which means if you really wanted
- 33:36to call main method what you should do
- 33:38I'll just go over here. I'll say let me
- 33:41create a brand new object of car.
- 33:45This is how you used to do earlier but
- 33:47this time it is not car over here. It is
- 33:49demo because demo class. So I'll just go
- 33:52and say new demo. Next for every object
- 33:56naming is compulsory. If you did not
- 33:58understand you people have names right.
- 34:01Why?
- 34:03Simply
- 34:05because I can access your data. I want
- 34:08to know your CGP. Your name your height.
- 34:10I'll access through your name. Object is
- 34:12there but no name. How will you access
- 34:14it? Name is compulsory. That name we
- 34:16call it as a reference. I will name it
- 34:19as D. and D is of type demo
- 34:24clear sir why are we saying this type
- 34:27and all you'll understand don't worry
- 34:28about it now object is ready can I call
- 34:31this method yes so I should just go and
- 34:34say d dot main
- 34:39now just think about it who should do
- 34:41all these things will os do all these
- 34:44things why operating system should do
- 34:47all those things is operating system a
- 34:48Java developer know then who should do
- 34:52you should only do it as a developer I
- 34:54should only do all these things but I
- 34:56don't want to do it so I want to
- 34:59completely skip this
- 35:02just to print one statement object
- 35:05already you people are frustrated this
- 35:06is so so complicated again object should
- 35:09be created main method should be called
- 35:12so how to skip all these things they
- 35:13told don't worry
- 35:16how to access this method without object
- 35:18creation I'll give you one keyword that
- 35:21keyword is none other than static. So of
- 35:24course without static it will not work.
- 35:26So compulsory static is should be used.
- 35:29So which means let me rewrite it. Main
- 35:31method should compulsory be public. It
- 35:34should be static and void main as it is.
- 35:38And now think about it. Simply open
- 35:40bracket close bracket you should not
- 35:42say. You should say something called as
- 35:44string arts. Now what is the string
- 35:46arts? I'll tell you don't worry. Clear?
- 35:49Why is it public?
- 35:52>> So that it can be accessible by
- 35:54everyone. Why is it static? So that I
- 35:56can call this method without object
- 35:59creation. That is the most important
- 36:00point. And void in English is nothing.
- 36:06Do you see this method returning
- 36:08anything for you? No. Do you see any
- 36:10return statement? I don't see anything.
- 36:12So it is not returning. Nothing means
- 36:14void. Name of the method is main. That
- 36:17is my main string arcs in RS. I'll teach
- 36:20you. Are you understanding? So this is
- 36:22how the main method got evolved. Simply
- 36:25by hearting public static void main is
- 36:27one set of people. Understanding the
- 36:30true meaning is another set of people.
- 36:32And such people who understand every
- 36:34word use case will become better
- 36:36engineers. As simple as that. People who
- 36:39just buyarted and become an engineer
- 36:41will still be there only floating. They
- 36:43will never a they will be never able to
- 36:45solve the real problems always someone
- 36:48should give them the task they should do
- 36:49it but I want you people to be in such a
- 36:52position where you should be able to
- 36:53give the tasks for others that is only
- 36:56possible if you know in and out of a
- 36:57software every word you should know it
- 37:00and I'll ensure you'll understand clear
- 37:03so anyways now public static void main
- 37:05everything is great now print statement
- 37:06will definitely be executed
- 37:09clear so this is the story of your main
- 37:12method
- 37:13So which means over here if I just go
- 37:16back
- 37:19if I want to execute anything definitely
- 37:21it should be public static void main
- 37:23next sometimes if main method is not
- 37:25there in your program you can use a
- 37:28shortcut what is that if you ask me just
- 37:30go and say main control space you'll get
- 37:33one shortcut you can say enter so I'll
- 37:36also explain you all the shortcuts that
- 37:38is used by Java developers clear so what
- 37:40is a shortcut if you ask me Always just
- 37:43go and say main name of the method you
- 37:44should know. Control space enter. Is
- 37:48this clear? That's it. Now you want to
- 37:51print something. Tell me how do you
- 37:52print something? Uh system dot very
- 37:55boring statement, right? So do one
- 37:57thing. Just go and say sis out. Sis out
- 38:00is the shortcut. Again control space
- 38:03enter.
- 38:04Clear. So let me show you uh show it for
- 38:07you people. So observe. So if I want any
- 38:11shortcut just go and say sy
- 38:14control space if you you'll get
- 38:15suggestions enter
- 38:18clear but then in your pycharm and all
- 38:20you'll get suggestions there itself
- 38:22inline suggestions all such options in
- 38:24eclipse you don't have understood so if
- 38:26you want to print anything you can just
- 38:28go and say hello to day one but oh sorry
- 38:33traditional way we need to do it so
- 38:35hello world only is the first program I
- 38:37want to print so I'll say hello world
- 38:39click clear after that I can start with
- 38:41the second thing so I'll say hello to
- 38:43day one
- 38:46any confusions of course very basic but
- 38:49very important why do you think people
- 38:51always teach hello world only at
- 38:53starting
- 38:55why
- 38:57it's the tradition okay I'll ask you a
- 38:59very simple question if anyone calls you
- 39:01what is the first word you speak
- 39:03>> why tradition
- 39:06>> I'll tell you the fact hello is the name
- 39:08of a I mean
- 39:11you know or you don't I don't know like
- 39:14you only I also saw in a so basically
- 39:17the person who actually invented the
- 39:18mobile I mean telephone back then he
- 39:21don't know what to speak with his wife
- 39:23he told hello from then it started to
- 39:25become a tradition today also hello so
- 39:28every time we speak with a person we are
- 39:31remembering her name hello anyways
- 39:33similarly like that for every program
- 39:35any language hello world is the first
- 39:37program tradition okay anyways
- 39:40So I hope this much clarity got it
- 39:42great. I think in the previous classes
- 39:45you might have done something like this
- 39:46int a equal to 100
- 39:49and then you'll just go and say
- 39:51system.out.print ln you'll say a. What
- 39:53is the answer 100? Obviously now the
- 39:55question is what is this int? It's a
- 39:58data type. But the question is is int
- 40:01the only option? No. You have something
- 40:03called as bite. Byte also will give the
- 40:06same output. But observe very carefully.
- 40:09I'll just go over here and say 128. The
- 40:12moment I say 128, it is not working.
- 40:15Some problem. It seems type mismatch.
- 40:17But same thing if I make it as int.
- 40:20Absolutely there is no problem. Why
- 40:24we'll understand. Don't worry.
- 40:26Similarly, for example, I'll just go
- 40:29over here and say 45.5
- 40:32and I'll just store it in a variable
- 40:34known as a. and a is of a type double.
- 40:37I'll say double. I will save it. I'll
- 40:40click on run button. No problem. But
- 40:4245.5 can be float also. I'll save it.
- 40:45I'll click on the run button. There is a
- 40:47problem. What is the problem?
- 40:50>> So some people are able to answer
- 40:52because they might have known Java. But
- 40:54many people have a question mark. So
- 40:56you're pretending you know data types
- 40:58but the reality is we don't know data
- 41:00types. We should go deeper and
- 41:03understand every inch of data type. Yes,
- 41:05it's a very simple silly concept but lot
- 41:07of MCQs will be asked. Predict the
- 41:10output. One more question I would like
- 41:12to ask you. Let me see whether you can
- 41:14answer it or not. I'll just go and say
- 41:16bite a 128 was a problem. Right? So I'll
- 41:19say 127 semicolon. Is it allowed? Yes,
- 41:22it is allowed. I'll click on run button.
- 41:25Now that is not the question. I'll just
- 41:27go and say a++
- 41:30again. I'll just go and say a++. Now
- 41:32tell me what is the answer.
- 41:35US.
- 41:35>> Huh?
- 41:36>> So some people are very clever already.
- 41:38They're answering correctly. Minus 127
- 41:40it says. Now why is it happening? Simply
- 41:43if you buy and put the right mark in the
- 41:45MCQs it doesn't help you what is
- 41:47happening internally. Let's go deeper.
- 41:50So the first concept for today is your
- 41:52data types and the interview questions
- 41:55they can ask you. Okay let's understand.
- 41:57So let me close Eclipse for the time
- 41:59being.
- 42:01Okay. First and foremost already you
- 42:04might have known that integer type data
- 42:06exist in this world. Your h is an
- 42:10integer value or real number.
- 42:13>> Integer only not real number. What is
- 42:16the difference between integer and real
- 42:17number?
- 42:20>> Why I'm asking this question? You know
- 42:22some people who comes from engineering
- 42:24background don't know number systems
- 42:26also. That is the reality in which we
- 42:28are living.
- 42:30Even many of you who are sitting over
- 42:32here still don't know very simple
- 42:35integer whole numbers means basically a
- 42:38number without decimal point is known as
- 42:40an integer value a decimal value are you
- 42:43understanding decimal means today what
- 42:45you and me are using right it's a
- 42:47decimal number system any number that we
- 42:49use will be between 0 and 9 only decimal
- 42:52number system are you understanding and
- 42:54integer decimal numbers numbers means a
- 42:57number without point that is inte
- 43:00integer category. So in Java we have
- 43:02four data types bite, short, int and
- 43:05long. Four data types. So these are four
- 43:08options. We'll understand. Similarly,
- 43:10real numbers means what? Which has a
- 43:12decimal point. Your height, your weight,
- 43:15your CGPA, there are two options. One is
- 43:18float, one is double. To store
- 43:20characters,
- 43:22we use a car data type. So we have car
- 43:25data type. Similarly, yes or no. In
- 43:28programming we call it as true or false
- 43:30we use boolean for others we don't have
- 43:33data types we have something called as
- 43:34built-in libraries basically so that
- 43:36you'll understand advanced Java classes
- 43:39how to use audio file in Java all those
- 43:41things clear this these are the eight
- 43:44data types in Java don't by heart
- 43:48whenever someone asks you no one will
- 43:49ask you by the way but how do you answer
- 43:52in Java there are eight data types to
- 43:55store integers we have four data types
- 43:57bite which occupies one bite short which
- 44:01occupies two bytes similarly int which
- 44:04occupies four bytes long which occupies
- 44:08eight bytes of memory now what exactly I
- 44:11meant by this memory I'll tell you this
- 44:13is how you should answer coming to real
- 44:14numbers in Java we have two options one
- 44:17is float one is double to store
- 44:19characters we have car data type to
- 44:21store boolean we have boolean data type
- 44:23this is how you should answer now let's
- 44:25start with the first cate category that
- 44:27is your integer category and first data
- 44:30type which is bite. Now what exactly do
- 44:33you mean by bite? I'll go to my Java
- 44:36program. I'll say bite A. When I say
- 44:38bite A, what happens? Back side. What
- 44:41happens? Simple. Now byte a means this
- 44:45is my RAM. Example 2 GB RAM. How many
- 44:48bytes are there in 2GB? 200 CR bytes.
- 44:54Giga means 10 ^ of 9. 10 ^ of 9 means
- 44:58100 cr. So 200 cr bytes are there. Now
- 45:02in this 200 core bytes I don't want
- 45:04anyone. I just want one bite. So when
- 45:08you say bite a in java one bite is given
- 45:11for you and tell me what do you mean by
- 45:13one bite? It's a combination of eight
- 45:16bits.
- 45:18Please keep your mobiles in silent in my
- 45:21classes. Okay. Anyways,
- 45:25so one bite is equivalent to 8 bits. So
- 45:27I'm just dividing it to eight bits. Now
- 45:30my question is in your entire RAM there
- 45:33are crows and cres of bits right but
- 45:36correctly how will you identify this is
- 45:38only your bite because you told a right
- 45:40that a will act like an identifier in
- 45:44your language variable. Are you
- 45:46understanding that a is the identifier?
- 45:48So when I say byte a in my entire
- 45:50program this bite only will be tell me
- 45:54imagine there are two rahuls in this
- 45:56class. I'll tell Rahul which Rahul
- 45:58should respond. Both will respond.
- 46:00Confusion. That's why I cannot create
- 46:03one more a in my Java program. Duplicate
- 46:05variable error you will get because
- 46:08confusion will happen. Right? I hope
- 46:09you're getting the point. But that is
- 46:11not the point. In the number system,
- 46:14negative infinity is the least negative
- 46:16number and positive in infinity is the
- 46:19highest positive number. Correct? Now,
- 46:21in one bite, there should be a
- 46:24threshold. There should be a capacity
- 46:26this much only I can store. How much is
- 46:28that?
- 46:30That is the question. In one liter water
- 46:32bottle only one liter only I can store.
- 46:351.1 liter also I can't store. What is
- 46:38the least possible thing in one liter?
- 46:41>> Negative one liter zero lit right?
- 46:44Basically similarly in one bite I can
- 46:47store one highest positive value. I can
- 46:50store one least negative value. What is
- 46:52that number? There is a simple formula
- 46:55which you should definitely not by
- 46:56heart. Okay. So n bits are there. The
- 46:59least negative number is minus 2 ^ of n
- 47:02minus one. The highest positive number
- 47:04is 2 ^ of n -1 minus one. Now tell me
- 47:08what is n over here? One by means 8
- 47:11bits. If I substitute that 8 bits 2 ^ of
- 47:167 - 2 ^ of 7 + 2 ^ of 7 - 1 which is
- 47:21nothing but 128 to 127 that is the
- 47:27reason my Java compiler did not allow me
- 47:30to store one value extra one value
- 47:33lesser.
- 47:35Are you understanding? So in the number
- 47:36line also if I show you what is the
- 47:38highest positive number I can store in
- 47:40bite 127. What is the least negative
- 47:43value minus 128. So let's see this in
- 47:46practical. So I'll just go over here.
- 47:50So I'll just go and say byte a is equal
- 47:53to 127. No problem. If I just go and say
- 47:56system.out.print ln absolutely I can see
- 47:59the output. But if I just make it as 128
- 48:04already you can see there is a red
- 48:05underline in Eclipse. If you see red
- 48:08underline this means there is a mistake
- 48:11already which has identified by the
- 48:13compiler. Forget about JVM. Compiler
- 48:16only told I cannot proceed because you
- 48:18have done a mistake. So if I save it if
- 48:20I click on the run button you can see
- 48:22sir what is this error? Can you read it?
- 48:25Definitely unresolved compilation
- 48:28problem. What is the problem? Type
- 48:30mismatch. Data type mismatch it seems.
- 48:33What do you mean by mismatch? LHS and
- 48:35RHS are not equal to each other. Why?
- 48:38Because cannot convert int to bite its.
- 48:41Now this is a statement which might be
- 48:43confusing. In the next few minutes
- 48:46you'll understand what is that clear?
- 48:48Okay sir. But if I make it as a negative
- 48:51value this is no problem. If I save it
- 48:54click on run button. Tell me what is one
- 48:57value lesser than minus 128
- 49:00minus 127
- 49:02- 129. Okay, good. So if I click on run
- 49:06button, not possible. Clear? So this is
- 49:08very very clear that bite has only one
- 49:11bite of memory. I can only store that
- 49:14much value. Clear? But what if I want to
- 49:17store more than 127 and less than minus
- 49:20128? There is another option for that
- 49:22also. So we have the second data type
- 49:25that is your short. Same thing. Now when
- 49:28it says short a this time it is not one
- 49:31bite double the bytes. How many bytes?
- 49:34Two bytes which means in my 200 crores
- 49:37of bytes correctly only two bytes is
- 49:39given for me. Two bytes means you know
- 49:4116 bits 2 into 8. These two bytes
- 49:45combined together is called as a. Now
- 49:48same formula if I apply I'll get a
- 49:50positive and negative value. Let's
- 49:52quickly see that also. Again, let's not
- 49:54go by the formulas and all. It's very
- 49:56simple. - 2 ^ 15 to the positive 2 ^ 15
- 50:00minus 1, which is nothing but some
- 50:0232,536.
- 50:05So, basically, it's negative sorry
- 50:0832,768
- 50:10to all the way till 32,767.
- 50:12See, no one is going to bother about
- 50:14what are these numbers, but you should
- 50:16be knowing. Clear? So, this is what is
- 50:19the value. Let's quickly execute this
- 50:21also and check it. So I'll just go over
- 50:23here
- 50:25and I'll say I want short and instead of
- 50:28minus 129 I'll say 32,000 767 is
- 50:32allowed. If I save it you can clearly
- 50:35notice one value extra is not allowed.
- 50:39You can see already same error you will
- 50:41get. But if I make it as a negative
- 50:44value no problem if I save it. If I
- 50:47click on the run button, you can see
- 50:49clear. Great. So sir, what if I want a
- 50:53better option that is a very frequently
- 50:56used option also that is none other than
- 50:59int. int is a commonly used integer data
- 51:03type anywhere. You'll understand why
- 51:06simple when I say int a what is the
- 51:08meaning of it? Double the bytes of last
- 51:10time four bytes will be given. Which
- 51:12means in my corres of bytes correctly
- 51:16four bytes are given for 4 into 8 32
- 51:20bits. So 32 bits put together is called
- 51:23as a and again if I put the same formula
- 51:26you'll get the certain value some 214
- 51:30crange you'll get. So you can clearly
- 51:33notice - 2 ^ of 31 to the positive 2 ^
- 51:38of 31 minus 1 which is nothing but 214
- 51:41cr change
- 51:43which means the highest positive value
- 51:45and the least negative numbers you got
- 51:46it I think I need now to type it and
- 51:49show you I hope you understood one value
- 51:52extra I cannot one value lesser I cannot
- 51:55I don't think so in any programs that
- 51:56you solve the values will be that
- 51:58extremely huge that is why we prefer int
- 52:02But what if I want to store 500 cr 1,000
- 52:06cr what should I do? There is a last
- 52:09option that is none other than long. So
- 52:12when I say long a 8 bytes is given for
- 52:15you which means if you notice in the
- 52:17corres and of bytes correctly 8 bytes is
- 52:19given and 8 into 8 is 64 bits. If I put
- 52:23that formula no need to calculate
- 52:24directly I'm showing you it's an
- 52:26extremely huge value.
- 52:29So 64 bits means uh almost uh count tens
- 52:33or tw uh sorry tens hundreds thousands
- 52:3610,000 like this you keep counting but
- 52:38not required extremely huge value are
- 52:41you understanding now you want me to
- 52:44type this I will type it so let's see
- 52:47how exactly this actually works in Java
- 52:50so I'll just go over here I'm I'm also
- 52:53human being itself I don't remember that
- 52:55number I'll just Google it okay so I'll
- 52:57just go and a long uh range in Java.
- 53:04So that number I'm just typing it over
- 53:06here.
- 53:11Okay. So I'll just go over here and say
- 53:14uh I'll say long a is equal to this is
- 53:17the highest positive value possible and
- 53:20I'll say system.out.print ln I'll say a.
- 53:24Now the question is sir why there is an
- 53:26error? Have you given correctly only? I
- 53:29have given correctly only. So if I save
- 53:32it up so carefully. If I click on run
- 53:34button, same error you'll get. This time
- 53:37I want you to read the error very
- 53:39carefully. Of course it's a compilation
- 53:42problem. I do understand. But what the
- 53:44literal
- 53:46remember what is this literal sir? In
- 53:49your language it is called as value.
- 53:52In computer science it is called as
- 53:53literal. The literal whatever number you
- 53:57gave is of type int is out of range. It
- 54:02seems one thing is very clear somewhat
- 54:05clue you are getting sir this is
- 54:06definitely more than 214 cr that is why
- 54:09it is saying int is out of range but why
- 54:12did that error come for my long is the
- 54:14question. The most important rule you
- 54:17should remember is any number that you
- 54:19type in Eclipse or Java. Basically any
- 54:21number automatically by default it is
- 54:25int only. I repeat it any number any
- 54:31integer number you type in Java by
- 54:34default it is int. By default it is int.
- 54:37Not bite not short not long it is int.
- 54:40Now don't you think the number which I
- 54:42gave is definitely outside the range of
- 54:44int only. Now I should tell to my
- 54:46compiler listen this is not int value
- 54:48I'm intended to do it is a long value at
- 54:52last I should go and say l are you
- 54:55understanding just a second
- 54:59uh what is the problem okay I think I
- 55:02have given a wrong number just a second
- 55:04yeah it's not one okay now you can see
- 55:07same problem only you will see so now I
- 55:09need to just go and say l are you
- 55:11understanding l means long now is it
- 55:13allowed This if I click on the run
- 55:15button you can see. So this is called as
- 55:20a prefix. Sorry it is called as a
- 55:22suffix. Are you understanding? Something
- 55:24which you give before is known as
- 55:25prefix. Something which you give after
- 55:27is called a suffix. Prefix. Prepaid
- 55:31means what? First pay and then use. Post
- 55:33paid means first use and then pay.
- 55:35Similarly prefix suffix. You can use
- 55:38small L also. No problem. It will also
- 55:40work
- 55:42but not preferred. Why? Look at that and
- 55:45tell me does it look like L? It looks
- 55:47like one. So that is the reason they
- 55:49told better use capital L. Any
- 55:52confusion? So the first point new thing
- 55:54that you have learned today is any
- 55:57integer number if you give in Java by
- 55:59default it is int. If you want long you
- 56:02should say L. Are you understanding? But
- 56:04sir for short and bite you did not say
- 56:06no. It is within the range of int only.
- 56:08Right? So no problem. Are you
- 56:10understanding? So this was your
- 56:12integers. So we have seen four types of
- 56:16data types especially for inteious bite
- 56:18short int long and their memory as well.
- 56:20What next up
- 56:25anyways this was already clear for us.
- 56:27Now I'm just showing some people in
- 56:29front of you and why am I showing this
- 56:32if you ask me? I want to write a program
- 56:34to store their ages.
- 56:37Now which data type is preferred?
- 56:40Integer category only. But in integer
- 56:42you have four types right? Which one?
- 56:45Int. But think about it very carefully.
- 56:48Now from today you should start thinking
- 56:50like a programmer like a developer from
- 56:53the company perspective from the cost
- 56:55perspective also.
- 56:58Remember very important statements I'll
- 57:00be making here and there. As a developer
- 57:03every bit matters. Forget about bytes.
- 57:06Every bit also matters. How effectively
- 57:10can you utilize the bits. The bytes is a
- 57:13very important thing for a developer.
- 57:15Which means you people are saying saying
- 57:17sir use int. I can use long also. I can
- 57:20use short also. But I would like to
- 57:22prefer bite. Why? Tell me what is the
- 57:26maximum age you want to live on this
- 57:28planet?
- 57:30>> 100 century. Wow. God bless you.
- 57:35So on an average statistically speaking
- 57:3885 is more 75 is average actually in
- 57:42India 75 to 80 you can think but extreme
- 57:46case you are in a city where every day
- 57:49you're getting fresh air you're eating
- 57:51organic fruits every day whatever lunch
- 57:54you have has a lot of protein so you're
- 57:57eating a very healthy food right every
- 57:59day 1 hour you do workout also so
- 58:01guaranteed 100 years correct
- 58:04So as a matter of fact definitely 100 if
- 58:08you take also
- 58:10world record is some 120 to 123. So 127
- 58:14is more than sufficient. So when you
- 58:16told int why did you say int I'll tell
- 58:18you because you told sir these many int
- 58:21we have used but if you think in a
- 58:23different perspective bite occupies one
- 58:25bite int o occupies four bytes don't you
- 58:29think three bytes extra you're wasting
- 58:31you are wasting and the three bytes may
- 58:34seem very simple sir see three bytes
- 58:37only no sir 200 cr bytes are there one
- 58:41user three bytes thousand users one lakh
- 58:43users one cr us users 100 crore users
- 58:47think scalability also you should think
- 58:49that is how you become a true engineer
- 58:51are you understanding three bits also
- 58:53matters so don't you think I can easily
- 58:56use for ages I can use a bite are you
- 58:59understanding next one more example for
- 59:03storing the salaries fresher average
- 59:05salary I'm saying I'll ask what is your
- 59:08salary and
- 59:11no one will throw money like this very
- 59:13important so basically what is an
- 59:14Average salary of a fresher if you ask
- 59:16me somewhere between 30,000 it can be
- 59:18more it can be less but average I'm
- 59:20speaking in India short is more than
- 59:23sufficient 30 to,000 it can store so I
- 59:25can use short so you can see based on
- 59:27use case I'm differentiating
- 59:30some people are not happy with our
- 59:32planet are create creating plans are
- 59:35creating different different
- 59:36technologies to go to some other planet
- 59:41people are not happy over here people
- 59:43are thinking in Next thousand years
- 59:45earth will become inhabitable.
- 59:48Mars is already inhabitable but they'll
- 59:50make it habitable. It seems by creating
- 59:52atmosphere by creating oceans. They are
- 59:54doing some experiments. So people wants
- 59:56to travel from earth to Mars. Some
- 59:59distance should be calculated. Now the
- 1:00:01distance probably will be in lacks of
- 1:00:03kilometers if not of kilometers. So int
- 1:00:07will be more than sufficient.
- 1:00:10Clear? If you want you can also go.
- 1:00:12Okay. But if I zoom out these planets,
- 1:00:14they belong to Milky Way galaxy. There
- 1:00:17there are millions of galaxies in our
- 1:00:19particular universe. The distance
- 1:00:21between galaxies will be in thousands
- 1:00:23lacks of crows kilometers. Probably I
- 1:00:27can use long.
- 1:00:29This is just an example. But what did
- 1:00:31you understand from this four four data
- 1:00:34type simply they did not give for
- 1:00:36utilization of memory efficiently. They
- 1:00:39have given four types. So depending upon
- 1:00:42situation various magnitude of data you
- 1:00:45might have seen right one is a very
- 1:00:47simple small number one is an extremely
- 1:00:49large number that we call it as various
- 1:00:52magnitude of the data for that you have
- 1:00:54four data types simply they did not give
- 1:00:56are you understanding so which situation
- 1:00:59suits you better use that data type
- 1:01:02clear always think from the memory
- 1:01:03perspective never waste memory
- 1:01:06understood anyways so I think this much
- 1:01:09clarity you got it
- 1:01:11But I have a very important question to
- 1:01:12ask you. Imagine I'll say bite a equal
- 1:01:16to 24.
- 1:01:1824 is your age. Maybe next year or the
- 1:01:21next year you'll get it. Now 24 if I
- 1:01:23type in my Eclipse in my RAM directly 24
- 1:01:26will be stored.
- 1:01:28>> No. Right. This is high level. High
- 1:01:31level is converted into byte code. Byte
- 1:01:33code is converted into zeros and ones.
- 1:01:35That zeros and ones is stored in the
- 1:01:37RAM. My question is how is the 24
- 1:01:40converted into zeros and ones is the
- 1:01:42question.
- 1:01:44>> Very simple. So whatever 24 you are able
- 1:01:47to see in how many bytes are you
- 1:01:49storing?
- 1:01:51>> Eight bits or one bite. Now in this one
- 1:01:53by eight bits are there. What is each
- 1:01:56bit? Either zero or one. Now how do you
- 1:01:59calculate? It's very simple. See
- 1:02:02internally all these things will happen.
- 1:02:03One bite I'm showing you as eight bits.
- 1:02:06So first I'll take the 24.
- 1:02:09There is something called as base two
- 1:02:11format. What is this base two format if
- 1:02:13you ask me? Take the number and divide
- 1:02:15with the two. As long as you get the
- 1:02:17remainder as one. If you did not
- 1:02:19understand I'll take 24. I'll divide
- 1:02:22this 24 with two. How many times? 12. So
- 1:02:25next again I'll divide it. What is the
- 1:02:26remainder by the way? 0. Again I'll
- 1:02:28divide. What is the remainder? 0. Again
- 1:02:31I'll divide. What is the remainder? 0
- 1:02:33only. Again I'll divide. This time 2 1
- 1:02:36are is two and remainder is going to be
- 1:02:38one. When the original number becomes
- 1:02:40one, you should stop the division. Now
- 1:02:43if you notice from bottom to top if you
- 1:02:46take that is nothing but 1 1 0 0. I will
- 1:02:49put it over here for you people that 1 1
- 1:02:520 0 is the binary of 24.
- 1:02:57Uh okay, one more zero. Oh, that's it.
- 1:02:59So 1 1 0 0. But think about it. How many
- 1:03:02bits I got? Five
- 1:03:04>> five bits. How many bits in one bite you
- 1:03:07have?
- 1:03:08>> Eight bits. So all these things I'll put
- 1:03:10it over here. But that extra three bits
- 1:03:12are nothing but your zeros.
- 1:03:15Are you understanding? So this is how
- 1:03:17for you it is 24. But how RAM looks at
- 1:03:20it? 0 0 0 1 1 0 0 0.
- 1:03:23So computers will only store this not
- 1:03:26this. But sir, when I'm printing I'll
- 1:03:30get 24 only. Then what happens? Again
- 1:03:32the same zeros and ones will get
- 1:03:33converted into 20 internally it will
- 1:03:36happen. See why I'm speaking all these
- 1:03:39things you know no one will teach you
- 1:03:40all these things but these are the
- 1:03:43fundamentals you should learn because
- 1:03:45again and again will you learn all these
- 1:03:47things no only once you will learn so
- 1:03:49you should focus on larger things right
- 1:03:51now but since the background that you
- 1:03:54come from the colleges amazing colleges
- 1:03:58right so unfortunately we should again
- 1:04:00start the foundation otherwise by now we
- 1:04:03could have started greater technologies
- 1:04:04but anyways no problem we can quickly
- 1:04:06complete all these things any confusion
- 1:04:09great you might ask me a question sir
- 1:04:12ask RAM to give only five bits no it
- 1:04:15will not give because the minimum memory
- 1:04:19that that can be given for you is one
- 1:04:21bite half bite and all it will not give
- 1:04:23you okay full ticket only half ticket
- 1:04:25and all that option is not there so one
- 1:04:28bite is the minimum memory so I will
- 1:04:30obviously get eight bits that extra
- 1:04:32spaces will be zeros
- 1:04:34but if you carefully observe sir this I
- 1:04:36understood
- 1:04:38There is something called as most
- 1:04:40significant bit. Observe carefully most
- 1:04:42significant bit. What is this zero? If
- 1:04:45it is zero, you should understand it's a
- 1:04:48positive value. It's a positive value.
- 1:04:51But if it is one, it's a negative value.
- 1:04:55Now on this note, what is minus4?
- 1:05:02Huh? 1 0 0 0 1 1 1 0 0 0 Wow it doesn't
- 1:05:08work like that just I'll substitute that
- 1:05:100 with one it is minus4 then you and me
- 1:05:13no need to be here itself it's not like
- 1:05:16that there is a separate calculation for
- 1:05:18that also already existing base to
- 1:05:20format you have right we need to
- 1:05:22actually add a two's complement of it so
- 1:05:25what is this all things observe what is
- 1:05:28positive 24 binary 0 0 1 1 0 0 0 don't I
- 1:05:32heart. Okay. So basically 0 0 0 0 1 1 0
- 1:05:360 0. What is two's complement? If you
- 1:05:39ask me first you should understand what
- 1:05:41is one's complement. Basically if you
- 1:05:43want to know the second part first part
- 1:05:45is important. Bahubali one after that
- 1:05:48only bahubali 2 pushp one after that
- 1:05:50only pushpa two. Like the different
- 1:05:52different things you have for first let
- 1:05:54us understand what is one's complement.
- 1:05:56Okay what is one compliment? Very
- 1:05:58simple. You have all these bits. Flip
- 1:06:02it. Flip it in the sense 0 will become
- 1:06:05one. One will become zero. So which
- 1:06:07means 1 1 1 0 0 1 1. That is 1's
- 1:06:12complement. What is 2's complement? Plus
- 1:06:14one. I should add
- 1:06:17just add + one. Huh. Now tell me what is
- 1:06:191 + 1?
- 1:06:21>> Two is a wrong answer.
- 1:06:23This is not normal mathematics. It's
- 1:06:26binary maths.
- 1:06:28Now again should I teach binary maths?
- 1:06:31It's very simple. Remember one simple
- 1:06:33rule. Whenever it comes to binary
- 1:06:36addition, only four things you should
- 1:06:38remember. Okay? What if I add one? I
- 1:06:42mean, let's start from absolute scratch.
- 1:06:450 + 0. That is one uh formation. Next 0
- 1:06:52+ 1. Next 1 + 0. Next 1 + 1. These are
- 1:06:56the only combinations in two digits. 0 +
- 1:07:000 is 0. 0 + 1 is 1. 1 + 0 is not 1. It
- 1:07:06is 1. Oh, sorry. My bad. My bad. My bad.
- 1:07:10Sorry. So, basically over here 0 + 1 is
- 1:07:131. And 1 + 0 is also 1. But 1 + 1 is not
- 1:07:17two. It is actually
- 1:07:23see listen.
- 1:07:261 + 1 is 1 and 0 over here. Basically
- 1:07:30two you will not get. I hope you're
- 1:07:32understanding. So basically 1 + 1 is 1
- 1:07:360. Don't read it as 10. It is not 10. It
- 1:07:40is 1 0 only. Are you understanding? So
- 1:07:43this table if you remember it is very
- 1:07:44very easy for you. 0 0 means always 0. 0
- 1:07:47with 1 is always 1 and 1 + 1 is always 1
- 1:07:510. This you remember. Okay. Keeping this
- 1:07:53in the thing. Let us add it right now.
- 1:07:56What is 1 + 1? 1 1 0. Like how you do
- 1:07:59normal mathematics. Take 1 and over here
- 1:08:01it is 0. Carry is 1. Again what is 1 +
- 1:08:031? Uh 1 0. Again what is 1 + 1? 1 0. Now
- 1:08:08what is 1 + 0? 1. So I'll keep it as it
- 1:08:10is. Next. If you notice 0 1 1. So if I
- 1:08:14put it over here, this is your
- 1:08:184. If you notice one thing, what is the
- 1:08:20most significant bit? one which is a
- 1:08:23negative number. Now why did I teach you
- 1:08:26this if you ask me? No one will ask you
- 1:08:28in the interview but you as an engineer,
- 1:08:30as a software engineer, you should know
- 1:08:32a positive number how it is stored. A
- 1:08:34negative number how it is stored. Are
- 1:08:37you understanding? This is your version.
- 1:08:40This is RAM version, computer version.
- 1:08:43Clear? So this is what I just wanted to
- 1:08:46explain. So that's it. Any confusions?
- 1:08:49Great.
- 1:08:51Next, real number category. So in this
- 1:08:55world you have already seen whole
- 1:08:58basically integer numbers. But now you
- 1:09:00can also understand in this world
- 1:09:03integers only does not exist. Real
- 1:09:05numbers also exist. Now all these real
- 1:09:08numbers which you are able to see in
- 1:09:09front of you.
- 1:09:11Okay. Anyways no issues. They can be
- 1:09:14stored in two data types. One is float,
- 1:09:16one is double. Let's start by
- 1:09:18understanding what is this float.
- 1:09:21Float means floating on the ocean not
- 1:09:25like that floating point shortcut is
- 1:09:28float understood float means don't think
- 1:09:30that float so floating point is the full
- 1:09:33form shortcut is float whichever has a
- 1:09:35decimal point now the question is I'll
- 1:09:38say float a what is the meaning of it
- 1:09:40simple in my RAM four bytes will be
- 1:09:43given for understood so this is my RAM
- 1:09:46and corres of bytes are there already
- 1:09:48you know it so four bytes put together
- 1:09:50is called as a now sir what is the range
- 1:09:54like how you have for integers should we
- 1:09:57calculate that not required so I'll
- 1:09:59directly show you the range this is the
- 1:10:01range minus 3.4 10 ^ of 38 to the
- 1:10:06positive 3.4 4 into 10 ^ of 30 extremely
- 1:10:09large one but in some mathematics
- 1:10:13you might have seen E also what is E
- 1:10:15exponent sir how did we get this tell me
- 1:10:18the formula not required because
- 1:10:21remember one thing how do you store
- 1:10:24integers inside your RAM which format
- 1:10:28base 2 format
- 1:10:31this is for integers
- 1:10:36now what about This float and double if
- 1:10:38you ask me they use something called as
- 1:10:41Ile E format
- 1:10:45are you understanding IL E format
- 1:10:48now when I say it E your college will
- 1:10:50come into your brain sir we had some ILE
- 1:10:53E conference IL E projects so definitely
- 1:10:57my guide told E guidance only I should
- 1:11:00follow even if margin little bit also
- 1:11:03let's go and get one more copy senseless
- 1:11:06Yes to be honest has it given any value
- 1:11:09for you? I'm just asking seriously okay
- 1:11:11I don't no comments so what I'm trying
- 1:11:15to say is whatever inteious you have
- 1:11:17seen which format they use base to
- 1:11:19format what about this float and double
- 1:11:21if you ask me i format now observe one
- 1:11:23thing formula is not required range also
- 1:11:26no need to remember this is about all
- 1:11:28about your float let me speak about
- 1:11:30double right now sorry
- 1:11:33online students
- 1:11:43Anyways
- 1:11:44speaking about double double the memory
- 1:11:47eight bytes you'll get and directly I'm
- 1:11:49showing you in 200 course of bite
- 1:11:51correctly 8 bits if I take so extremely
- 1:11:54huge range if you notice minus 1.7 into
- 1:11:5810 ^ of 308
- 1:12:00don't go by 1.7 go by the power
- 1:12:03extremely extremely huge range. This
- 1:12:05also uses it. Now the question is float
- 1:12:09also can store extremely large value.
- 1:12:11Double also can store extremely large
- 1:12:13value. Now when to use what is the
- 1:12:17question for inteious? You clearly
- 1:12:19understood when to use what. But what
- 1:12:20about float and double is the question.
- 1:12:22For that one simple analogy. What is
- 1:12:25your percentage?
- 1:12:28No in percentage have you calculated
- 1:12:32>> 80
- 1:12:33>> 70 something 70.2
- 1:12:37>> Okay. What is your percentage?
- 1:12:41>> 80 back seat white shirt
- 1:12:45>> 70.1
- 1:12:46yellow shirt back seat huh you
- 1:12:52>> in percentage 95
- 1:12:56no idea. Oh, you people only know CGPS.
- 1:12:59Okay. Okay. But in my days we are having
- 1:13:02percentages basically. So the decision
- 1:13:06between float and double when to use
- 1:13:08what? I'll tell you. It is all for one
- 1:13:11word. Precision. What is that?
- 1:13:13Precision. What is this precision? Sir,
- 1:13:15if you ask me. Imagine I'll ask
- 1:13:17percentage. Unfortunately, we're taking
- 1:13:19CGPS
- 1:13:22online students. What is the problem?
- 1:13:26Okay. Anyways, so
- 1:13:29one student will say 65 is my
- 1:13:31percentage. One more student will say my
- 1:13:33percentage is 65.2. One more person will
- 1:13:36say my percentage is 65.2836
- 1:13:40so and so forth. Now if I ask you who is
- 1:13:43more precise
- 1:13:46last student is more precise. How can
- 1:13:49you say is more precise? Because low
- 1:13:52many decimal points if you see more
- 1:13:54precise more accurate.
- 1:13:56Still if you did not understand what is
- 1:13:58this precision today if you open rapido
- 1:14:01or Uber or any application which
- 1:14:03requires maps two options it will give
- 1:14:06you do you want to give precise location
- 1:14:08or approximate location. What is the
- 1:14:11difference?
- 1:14:13>> Approximate means 100 m radius it will
- 1:14:16provide not exact location. Precise
- 1:14:19means with latitude and longitude
- 1:14:21correct little pin and it will give you
- 1:14:23precise means more detailed. So over
- 1:14:26here the last student is more detailed
- 1:14:29more memory is required. So use double
- 1:14:32less precision use float. Are you
- 1:14:36understanding? So the choice between
- 1:14:38float and double is up to four decimal
- 1:14:41points. If you want use float more than
- 1:14:44four decimal points if you want use
- 1:14:46double. So there is a difference are you
- 1:14:49understanding? But in most of the
- 1:14:51situations we'll be using float and we
- 1:14:53call it a single precision that is
- 1:14:55double the precision. Okay. So let's try
- 1:14:58to type this as well as a program. Just
- 1:15:02a second.
- 1:15:44Anyways, some internet issue. No issues.
- 1:15:47Let's continue.
- 1:15:49So, I'll just go and open my editor
- 1:15:53and I'll just go and say for example
- 1:15:5545.5
- 1:15:57I want to store. Let us assume I want to
- 1:16:00store in a variable a and what is the
- 1:16:02type of A? If you ask me double and I'll
- 1:16:04just go to the next line. I'll say
- 1:16:05system.out.tprint ln. I'll print a. I
- 1:16:08will save it. I'll click on the run
- 1:16:10button. You can see it is absolutely
- 1:16:13printing as per our expectation. But
- 1:16:15don't you think this small value can be
- 1:16:17stored in float also. So I'll just go
- 1:16:19and say float. But the moment I do this,
- 1:16:21there is an error. What is an error? If
- 1:16:24you notice, if you look at the error,
- 1:16:26you can answer it. Again, same type of
- 1:16:29error you have seen just before. Type
- 1:16:32mismatch cannot convert from double to
- 1:16:35float. Which means what is the meaning
- 1:16:38of it? Any real number in Java by
- 1:16:41default it is double. Any integer number
- 1:16:45in Java by default it is int. But sir I
- 1:16:48want it to be treated as float. Do one
- 1:16:51thing go and say you are float. F you
- 1:16:54should say compulsory. So there is a
- 1:16:56reason for it. So if I click on the run
- 1:16:58button you can see. So at any given
- 1:17:01point in Java if you want to write float
- 1:17:03value compulsory you should do this
- 1:17:06clear any confusions great so that's it
- 1:17:10this is all about your double and float
- 1:17:11so you should just know when to use what
- 1:17:14clear okay next you also have something
- 1:17:17called as true or false it's very simple
- 1:17:20I'll just go and say true means yes it
- 1:17:23is true I'll just go and say I want to
- 1:17:25store it in a variable it is of type
- 1:17:27boolean boolean means true or false. So
- 1:17:30I'll just go and say system.out.print ln
- 1:17:32I'll say a. Now obviously what is
- 1:17:35output? True. If I want it can be false
- 1:17:38also. If I save it I can click on the
- 1:17:41run button. It is false. Any confusion?
- 1:17:44Now the question is what is the size of
- 1:17:47boolean?
- 1:17:51>> Size of bite is one bite. Short is two
- 1:17:53bytes. Int is four bytes. Long is four
- 1:17:56by eight bytes. Next float is four
- 1:17:58bytes, double is eight bytes. What about
- 1:18:01boolean?
- 1:18:02>> Depends on the
- 1:18:03>> Now you can say one bite because only
- 1:18:05true and false. No, it's not like that.
- 1:18:07The size of boolean is undetermined in
- 1:18:10Java. It depends upon the operating
- 1:18:12system or it depends upon the JVM which
- 1:18:15you are using. Basically platform
- 1:18:17dependent.
- 1:18:19So boolean size is not determined.
- 1:18:21Clear? So it changes from OS to OS.
- 1:18:24Maybe in Windows it is one bite. Maybe
- 1:18:26in Mac OS it can be two bytes. Size is
- 1:18:28not determined. It keeps on varying.
- 1:18:30Clear? Great. Last but not least, the
- 1:18:34final data type is your character data
- 1:18:37type. One of the most important data
- 1:18:39type you should know. If you are someone
- 1:18:42strings started for any batch
- 1:18:45programming on strings not yet started
- 1:18:47for some people it has started. If you
- 1:18:50want to solve any program on strings,
- 1:18:53the next 10 minutes what I'm going to
- 1:18:54speak is very very very important
- 1:18:56because it is not just concept it is
- 1:18:59thinking also. Why does we actually use
- 1:19:02all these things today? So please make
- 1:19:04sure you are understanding extremely
- 1:19:07important. Observe
- 1:19:10your perspective only will change.
- 1:19:13Now of course that 45.5 already that you
- 1:19:17have understood. Let us ignore that for
- 1:19:18the time being.
- 1:19:23Okay. Observe. What do you mean by
- 1:19:25character? According to you,
- 1:19:28these are all characters only. Whatever
- 1:19:31you can see on your keyboard,
- 1:19:34there are three types. Alphabetical
- 1:19:37characters, numerical characters,
- 1:19:39special characters. These are only three
- 1:19:41categories. So any character that you
- 1:19:43can see why do they exist on my keyboard
- 1:19:47today? Why not some other characters?
- 1:19:49You might be having a question. Why
- 1:19:50don't I have Telugu, Canada, Hindi,
- 1:19:52Mallayalam? Why only English? So many
- 1:19:55questions are there. The next 10 minutes
- 1:19:57is the answer for that. Absa. See, let
- 1:19:59us imagine a hypothetical situation.
- 1:20:02Just a second.
- 1:20:08Okay, a hypothetical situation where you
- 1:20:12and me should speak with each other. No
- 1:20:15Canada, no Telugu, no Hindi, no Malanam.
- 1:20:17Only one language exists in this world
- 1:20:19that is English. But unfortunately 26
- 1:20:23alphabets are not there. How many
- 1:20:25alphabets are there? Alphabets I'm
- 1:20:27saying it as symbols. Only four symbols
- 1:20:30are there. A B C D. anything I should
- 1:20:33speak with you in ABCD only I should
- 1:20:35speak A B C D F E G something like that.
- 1:20:38So E is not there by the way only in
- 1:20:40four letters I should speak. Now the
- 1:20:42question is this four symbols I and you
- 1:20:46can speak but I want to store it in the
- 1:20:48computer. How will you store? Can my RAM
- 1:20:51understand A? No. B C D no don't you
- 1:20:55think a binary version should be there
- 1:20:57for that? Now if you notice for A I will
- 1:21:00only think what value can I give? I will
- 1:21:02only decide I will say for a if anyone
- 1:21:05types a on the keyboard it should be
- 1:21:07stored in the RAM. So what I will do is
- 1:21:09in my RAM I know ABCD can't be stored.
- 1:21:13So I will take a decision if anyone
- 1:21:15types ABCD I will ensure the zero and
- 1:21:18one version of it is stored. What is
- 1:21:20that if you ask me? Let me assign some
- 1:21:23binary code for it. For A the code is 0
- 1:21:270. For B it is 0 1. I will only decide
- 1:21:31it. Next for C it is 1 0. For D it is 1
- 1:21:34one. Do you agree with me? Which means I
- 1:21:37will type D but for my RAM it is 1 one.
- 1:21:40I will type A but for my RAM it is 0 0.
- 1:21:44Understand? [music]
- 1:21:45Understanding? Okay. But let us assume
- 1:21:48ears evolved. Four letters not
- 1:21:51sufficient. We need to communicate
- 1:21:53better. Let us assume the number of
- 1:21:55symbols doubled.
- 1:21:57E F G H also came. But my question is
- 1:22:02can I use any binary number of twodigit
- 1:22:05combination? Yes or no? I cannot because
- 1:22:08already I have lost the combinations
- 1:22:10completed. Right? So what should I do?
- 1:22:13Can I increase the length of this code?
- 1:22:15Yes. So what I will do is I'll make
- 1:22:18everything as a three-digit code over
- 1:22:19here. I'll make I'll just add a zero.
- 1:22:22Just a situation. Okay. Now can you tell
- 1:22:25me what is the first I mean what is the
- 1:22:27next piece of code? Huh? Very simple. 1
- 1:22:290 0. Next 1 0 1. Next 1 1 1 0. Last but
- 1:22:35not least 1 1.
- 1:22:37Like this it started to evolve but again
- 1:22:40eight symbols not sufficient. Number of
- 1:22:42symbols doubled. This time 16 symbols
- 1:22:45are there. Can you tell me what should
- 1:22:48be the symbol one?
- 1:22:50>> Very simple. Three-digit combination not
- 1:22:53sufficient. I'll just increase the
- 1:22:55length of the code. This time the new
- 1:22:57set of permutation and combination is 1
- 1:23:000 0 all the way till 1 one. Again if it
- 1:23:04doubles I hope you got the story clear.
- 1:23:08So this is how it got evolved like this.
- 1:23:11Whatever alphabets or symbols you are
- 1:23:14able to see how many such symbols are
- 1:23:16there is the question. So let us
- 1:23:19understand one most important thing. How
- 1:23:22did I decide two? Next, the length
- 1:23:24should be four. The length should be
- 1:23:26three. How did I decide? Very simple.
- 1:23:28There is a simple formula. Imagine four
- 1:23:30symbols are there. What was the length
- 1:23:33of the code? Two. How did you decide?
- 1:23:36There is a formula. Very simple. So the
- 1:23:39number of symbols four. How to write it?
- 1:23:422 to the power 2 to the^ of two. So I
- 1:23:46can write it as 2 to the^ of two. So
- 1:23:48which means that four is nothing but 2 ^
- 1:23:51of two. That power is two, right? That
- 1:23:53is why length was two. Clear? That is
- 1:23:56very important to understand. Okay?
- 1:23:58Next, number of symbols doubled. Now
- 1:24:00tell me what is the length? Eight.
- 1:24:03Sorry, the number of symbols are eight.
- 1:24:05What is the length? Three. How did you
- 1:24:07decide? Simple. Eight can be written as
- 1:24:102 ^ of 3.
- 1:24:13Next, we had something called as 16
- 1:24:15symbols. What was the length? Four. How?
- 1:24:18Simple. 16 can be written as 2 ^ of 4
- 1:24:22which means can you tell me if I give
- 1:24:25you number of symbols can you predict
- 1:24:27and tell me what could be the length
- 1:24:29that number how can I write it in the 2
- 1:24:31to the power of this much clarity got it
- 1:24:34let's continue the story now of course
- 1:24:36that you understood there is one flag
- 1:24:39which I'm trying to show you in front of
- 1:24:41you which is that flag America one of
- 1:24:44the greatest and most futuristic country
- 1:24:48in the world is what people treat today
- 1:24:51I don't know the story but today also
- 1:24:52same story only but already some
- 1:24:54negative impact has been started on this
- 1:24:56country which entire world is suffering
- 1:25:00today if you don't know today if you
- 1:25:04just open the gold price it have been
- 1:25:06skyrocketed like anything and you will
- 1:25:08think that a gold means it will increase
- 1:25:11there is a reason for it also and if you
- 1:25:13don't know America is the reason are you
- 1:25:16understanding So how America is the
- 1:25:18reason not directly but indirectly.
- 1:25:21If a war situation happens remember one
- 1:25:24thing whenever war situation happens
- 1:25:27entire world will go through
- 1:25:29uncertaintity. What do I mean by
- 1:25:31uncertaintity? Stability will not be
- 1:25:33there in the economy. What do you mean
- 1:25:35by this if you ask me? Simple as simple
- 1:25:38as stopping straight of harness. What is
- 1:25:41the straight of harness? Usually
- 1:25:4480 to 90% of the crude oil supply for
- 1:25:48this entire world happens through that
- 1:25:50straight off harmas. Now what is this
- 1:25:53crude oil today? Petrol, LPG, gas,
- 1:25:56diesel, all these things if you are
- 1:25:58using that is a byproduct of a fossil
- 1:26:01fuel refine refinement. Now if that
- 1:26:03crude oil supply is not there for this
- 1:26:05world that is why LPG gas in Bangalore
- 1:26:08which was 845 was paying last 3 months
- 1:26:10back today it is 970
- 1:26:13are you understanding but in your hope
- 1:26:16now it'll be even more costlier actually
- 1:26:18in urban cities actually the cost will
- 1:26:20be less petrol in Bangalore just 3 to 7
- 1:26:25I mean 3 to 5 months back it was 102
- 1:26:28rupees today 111 rupees are you
- 1:26:32understanding
- 1:26:33in your cities three entire three cities
- 1:26:35already will be 120 or 122 just go and
- 1:26:38check. So that is how the prices will
- 1:26:40get impacted.
- 1:26:42Are you understanding? Why sir prices
- 1:26:44will increase? Just think about it. If
- 1:26:47petrol prices increases, diesel prices
- 1:26:50increases, logistic cost also will
- 1:26:52increase. The truck which will actually
- 1:26:54deliver from one point to another, their
- 1:26:56cost will increase automatically. Goods
- 1:26:58cost also will increase. Who will pay it
- 1:27:01ultimately? Consumer only should pay it.
- 1:27:03No loss for the companies. At the end,
- 1:27:07consumer only will suffer. The whoever
- 1:27:10is going to use that product, purchase
- 1:27:12at last only will suffer. Which means
- 1:27:15today if some two countries are fighting
- 1:27:17with each other, leaders have no problem
- 1:27:20at all. They will live their lavish
- 1:27:22life. But who will suffer? The people of
- 1:27:24that country will suffer. And this they
- 1:27:28don't understand
- 1:27:29because money is everything right. So
- 1:27:32that is how the people live. But anyways
- 1:27:35long back like how today it is trying to
- 1:27:38dominate. It is pretending it is
- 1:27:40dominating this world but not. Okay. So
- 1:27:42there are many dominating countries for
- 1:27:44example China, Russia so many dominating
- 1:27:47countries are equal. Of course India
- 1:27:49also but comparatively the nuclear
- 1:27:52powers the nuclear weapons missiles
- 1:27:55these are the comparisons they do
- 1:27:57usually one of the strongest country
- 1:27:59America Russia and China and India now
- 1:28:03they this American president you know
- 1:28:06so-called Donald Trump he wants to
- 1:28:07dominate this world by showing that Iran
- 1:28:10has is in my control but nothing over
- 1:28:13there so because of two countries
- 1:28:16egoistic mindset
- 1:28:18entire world is suffering today. Are you
- 1:28:20understanding? Now long back in the year
- 1:28:251990s, 1940s, 1950s, same dominance they
- 1:28:29wanted to show.
- 1:28:31What there was one country called as
- 1:28:33Japan, I hope you know it. America went
- 1:28:36and told whatever I said you should
- 1:28:37listen, they said get lost. Okay, no
- 1:28:40problem. They just throw uh two atom
- 1:28:43bombs on Hiroshima and Nagasaki. Then
- 1:28:46the entire world witnessed the true
- 1:28:50disaster that can happen with an atom
- 1:28:51bomb. Countries got collapsed. They
- 1:28:54should again start from scratch. Civiliz
- 1:28:57civilization got vanished. Are you
- 1:28:59understanding? Then they treated oh
- 1:29:02America means we should be a bit careful
- 1:29:05otherwise same situation will happen.
- 1:29:07Then America started to dominate this
- 1:29:09world. This world should only follow one
- 1:29:11currency, one language, dollar, English.
- 1:29:16And today even today
- 1:29:1890% of the transactions that India does
- 1:29:21with other countries in trade is in
- 1:29:23dollars only. We buy crude in dollars.
- 1:29:25We buy gold in dollars. Rupee keeps
- 1:29:28falling today. Why rupees in alltime
- 1:29:30high? It is not a good thing. 96 rupees
- 1:29:3397 rupees. Sooner it will hit 100 rupees
- 1:29:36also. Worst thing. But 30 40 years back
- 1:29:40rupee was 30 rupees. 40 rupees. Uh again
- 1:29:43is the dollar. But today but other
- 1:29:46countries they are actually becoming
- 1:29:48better like yan Chinese currencies
- 1:29:51Russian currencies and all. So always
- 1:29:53remember a country can only grow if we
- 1:29:55are net exporter not importer. Are you
- 1:29:59understanding? So what I'm trying to say
- 1:30:00is this country so-called America wanted
- 1:30:03to dominate this world. They told
- 1:30:05English is the language for this world.
- 1:30:07That's why I'm speaking in English.
- 1:30:09You're listening in English. Your
- 1:30:11interview also will happen in English
- 1:30:12only.
- 1:30:14If that could have been not happened
- 1:30:15maybe I could have taught you in Telugu,
- 1:30:17Canada or any other regional Indian
- 1:30:19language or maybe Hindi but
- 1:30:22unfortunately companies don't accept it
- 1:30:24right so since you are in India you
- 1:30:27should take interview in Hindi they'll
- 1:30:28say get lost are you understanding so
- 1:30:30all those patriotism we can't show for
- 1:30:33our language because the clients the
- 1:30:35projects will be other countries people
- 1:30:37so unfortunately interview will happen
- 1:30:39in English only whether you like it or
- 1:30:41you don't like
- 1:30:43So you should only adjust for that. So
- 1:30:45that is what they have also decided that
- 1:30:47is why today your default language of
- 1:30:50your mobile phone is English keyboard
- 1:30:52has English keyboard. So everything is
- 1:30:54English only right including the brand
- 1:30:56name that you see blue star everything
- 1:30:58is dominated but back then if you if we
- 1:31:01have dominated the world maybe
- 1:31:03everywhere Hindi you might have seen
- 1:31:04maybe Canada or Telugu or whatever but
- 1:31:07that was not the situation. So what I'm
- 1:31:09trying to say is America told on a
- 1:31:12keyboard whatever is required to
- 1:31:14communicate with a computer in total you
- 1:31:17require some numerical characters some
- 1:31:20alphabetical characters and some special
- 1:31:23characters. How many total symbols if
- 1:31:26you ask me 128 symbols are sufficient.
- 1:31:29That is what they gave the conclusion
- 1:31:31and they told this 128 symbols include 0
- 1:31:36to 9 some 10 digits. Next small A to
- 1:31:40small Z 26. Next capital A to capital Z
- 1:31:44one more 26 some special characters like
- 1:31:47that if you add everything 128 symbols
- 1:31:50you will find are you understanding and
- 1:31:53this 128 symbols what you are able to
- 1:31:55see can you just predict what will be
- 1:31:59the length of the code binary code I'm
- 1:32:02asking you huh what is the length of the
- 1:32:06first symbol
- 1:32:08uh seventh symbol 128th symbol Just now
- 1:32:12I told you right 128 if you have can you
- 1:32:15calculate the length how how can I write
- 1:32:18128 in the power of two simple so what
- 1:32:21I'll be doing is number of symbols are
- 1:32:24128 how can I write 128 2 to the^ of 7
- 1:32:29so will be the length of the code or not
- 1:32:32on that note can you predict what will
- 1:32:34be the first code
- 1:32:36>> seven zeros what will be the last code
- 1:32:39seven ones in between the combinations.
- 1:32:42So what I'm trying to say is symbol one
- 1:32:45is 7 zeros which I'm trying to show you
- 1:32:47right now
- 1:32:49like that symbol two is 6 zeros 1 next
- 1:32:53five zeros 1 zero like that somewhere a
- 1:32:5865
- 1:33:00version of zeros and ones you'll get b
- 1:33:0366 like that small a 97 like that you'll
- 1:33:08get all the characters are you
- 1:33:10understanding sir can you Show all this
- 1:33:12particular thing. Of course, last one is
- 1:33:14one one 7 ones. These all 128 symbols
- 1:33:18are these guys only. If you notice few
- 1:33:22things you ignore. If you start directly
- 1:33:24from here space, exclamatory, quote,
- 1:33:28hash, dollar, percentage, all these
- 1:33:31symbols you know. Next 0 to 9 colon
- 1:33:34semicolon less than equal to greater
- 1:33:36than question mark. Next add the rate
- 1:33:39capital A2 capital Z again bracket slash
- 1:33:43cap all these things you know small A2
- 1:33:46small Z again braces
- 1:33:49almost 90% of the symbols you know right
- 1:33:51and whatever you're able to witness in
- 1:33:54front of you you can see symbol number
- 1:33:56zero symbol number 127 0 to 127 128
- 1:34:01symbols who gave this America gave it
- 1:34:05and told this world should Follow this
- 1:34:07only standard
- 1:34:09and this is nothing but the code. For
- 1:34:12example, I will say capital A but for my
- 1:34:16computer 65 0 and1 version will be
- 1:34:19there. I will say small Z somewhere over
- 1:34:23here for me it is Z but for my computer
- 1:34:26122 if I ask you to convert to binary
- 1:34:29can you convert it? That is what RAM
- 1:34:31will store. So information is getting
- 1:34:33interchanged and this table what you are
- 1:34:36able to see in hi-fi terms we call it as
- 1:34:39ASKI table and what is the full form of
- 1:34:42ASI American standard code for
- 1:34:45information interchange
- 1:34:48why is this called as AS as simple
- 1:34:51America gave it to standardize this
- 1:34:54world everyone should use this only this
- 1:34:56is the code for information interchange
- 1:34:58only between binary and human
- 1:35:00understandable so if I take All the
- 1:35:02starting letters it's your ASKI. This is
- 1:35:05your ASKI table.
- 1:35:08This ASKI what you're not hearing for
- 1:35:10the first time in colleges you have
- 1:35:12heard right. Huh? What did you
- 1:35:15understand in college? Asky. Ask
- 1:35:18important asky. CS aski. That's it. That
- 1:35:20is all we know.
- 1:35:23So this is nothing but your ask. But the
- 1:35:26real question is I'm just asking what
- 1:35:29you know already. Does C programming
- 1:35:31language follow ASKI?
- 1:35:33>> Yes, it follows ASK only. So C
- 1:35:35programming language is English biased.
- 1:35:39Any software you build using C can only
- 1:35:43support English. But the good news is
- 1:35:46Java will not follow ASKI. So then this
- 1:35:50much buildup you gave no listen to that
- 1:35:53Java does not follow ASKI because today
- 1:35:56whatever Android you're using you have
- 1:35:58multiple language support. WhatsApp is
- 1:36:00supported in multiple languages. Your
- 1:36:01Google keyboard can support all the
- 1:36:03languages. So Java will support multi-
- 1:36:06languages. Multilingual programming
- 1:36:09language is your Java. So if ASKI is not
- 1:36:13followed then what is followed sir? If
- 1:36:15you ask me let's understand that as
- 1:36:17well.
- 1:36:19See before understanding that when I say
- 1:36:21a just same question in my computer can
- 1:36:24I directly store a in my RAM?
- 1:36:26Impossible. So what is going to happen
- 1:36:28if you ask me? A will get converted into
- 1:36:31zeros and ones. How? Observe. If I just
- 1:36:34go back to that ASKI table once again
- 1:36:36have a look at it. Where is A? If you
- 1:36:38ask me somewhere over there for you, I
- 1:36:40bought one binocular lens also a
- 1:36:42magnifying lens 65. My question is if I
- 1:36:46ask you to convert 65 to zeros and ones
- 1:36:48you can do it, right? Same thing
- 1:36:50internally also will happen. So for you
- 1:36:53it is a but for my RAM 65 is divided
- 1:36:57with two 2 32 times again I'll divide it
- 1:37:01remainder is 1. Next 2 16 are what is
- 1:37:04the remainder? Zero. 2 8 are what is the
- 1:37:06remainder? Zero. Again 2 4 are remainder
- 1:37:09is zero. Last but not least two 2's are
- 1:37:12zero and two 1's are. And if you notice
- 1:37:16one thing for you it is a for my RAM it
- 1:37:20is 1 0 0 0 1. Are you understanding?
- 1:37:25Everything that you type including your
- 1:37:28Android mobile phone also the message
- 1:37:30that you send. Hi, how are you? Missing
- 1:37:32you and all. Also, every character will
- 1:37:35be converted into zeros and ones. Are
- 1:37:38you understanding? So that is what I'm
- 1:37:40trying to say.
- 1:37:41Any doubts? Of course, that is your
- 1:37:43binary. But my question is this is the
- 1:37:45most important question. How many bits
- 1:37:47did I get?
- 1:37:49>> Seven bits. What is the minimum memory I
- 1:37:52can get from my RAM?
- 1:37:54>> One bite. Eight bits. Which means in
- 1:37:57this one bite I will try to fit all the
- 1:38:00eight bits but one space is empty what
- 1:38:02will be there? Zero. This comes to the
- 1:38:05most controversial question in the
- 1:38:06interview. Is ASKI seven bit or 8 bit?
- 1:38:11Think and answer
- 1:38:14smartly.
- 1:38:16This question I think you might have got
- 1:38:17somewhere. No, they'll ask. I'm saying
- 1:38:21no. Tell me is ASKI code a seven bit
- 1:38:26code or 8 bit code?
- 1:38:29>> If you are smart how you will answer is
- 1:38:31ASI is a seven bit code but in the RAM
- 1:38:34it is stored as 8 bits because the
- 1:38:36minimum memory my RAM can give is 8
- 1:38:38bits. Are you understanding? ASI itself
- 1:38:41is 7 bit only but in the memory it is 8
- 1:38:44bits. Why? I hope you understood. So
- 1:38:46this is how you can answer clear but
- 1:38:49anyways
- 1:38:51my A whatever you are able to see
- 1:38:54this is how you write even in C also
- 1:38:56character CH equal to A correct now the
- 1:39:00question is look at the memory and tell
- 1:39:02me how many bytes will it occupy
- 1:39:06look at that and tell me one bite so in
- 1:39:09C programming language how many bytes
- 1:39:12does my character data type occupy if
- 1:39:14you ask me one bite No doubt about it.
- 1:39:17So one bite. But what about Java?
- 1:39:20One bite or some other answer.
- 1:39:24So in Java same code only you'll write
- 1:39:27character CH equal to A. In Java it is
- 1:39:30not one bite. Sir how many bytes sir?
- 1:39:33Two bytes. Sir why sir? Two bytes. A a
- 1:39:3765 right? In Java also 65 only. Then why
- 1:39:40sir? What is the problem? To understand
- 1:39:42this you attend my tomorrow's class. I
- 1:39:44hope you understood. So in tomorrow's
- 1:39:46class, we'll understand why Java
- 1:39:48supports all the languages and why it is
- 1:39:50not one bite, it is two bytes. So we'll
- 1:39:53continue with interview questions on
- 1:39:55data types in tomorrow's class. Okay? So
- 1:39:57thank you very much. If you have any
- 1:39:59questions, please come and meet me. Same
- 1:40:01place, same time. Tomorrow we'll meet.
- 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.