Functional Testing Automation Full Course 2026 | Functional Testing Automation In Java | Simplilearn

Simplilearn| 05:17:33|Jun 15, 2026
Chapters11
An overview of the Java collections framework and why choosing the right collection type matters for handling data efficiently.

A practical, in-depth tour of Java collections (ArrayList, HashSet, HashMap, TreeSet, LinkedHashMap) plus core Java basics and polymorphism, with live code examples.

Summary

Simplilearn’s session on Java collections starts by showing how the right collection type can simplify data handling in Java, from arrays to advanced structures. The presenter contrasts ArrayList, HashSet, HashMap, TreeSet, and LinkedHashMap, explaining when to use each based on ordering, uniqueness, and key-value storage. Alongside, the lesson revisits Java fundamentals like identifiers, reserved keywords, data types, and the JVM/JDK/JRE stack, grounding viewers in how Java executes code and manages memory. The course weaves in polymorphism concepts (method overloading and overriding) and demonstrates access modifiers (public, private, protected, default) to illustrate data hiding and encapsulation. Through hands-on examples, you’ll see how Scanner handles user input, how to build simple classes, and how to design test data structures for automation frameworks. The instructor also touches on practical topics such as configuring JDK, using Eclipse, and integrating Selenium WebDriver in future modules. By the end, you’ll understand how to choose the right data structures for real-world problems, plus foundational OOP concepts that underpin scalable Java code.

Key Takeaways

  • ArrayList, HashSet, HashMap, TreeSet, and LinkedHashMap each serve distinct data-storage needs, determined by order, uniqueness, and key-value pairs.
  • HashSet ensures no duplicates, while TreeSet automatically sorts elements, making it ideal for ordered, unique collections.
  • LinkedHashMap preserves insertion order in a map, which is useful when bill or data logs must reflect the sequence of entry.
  • Java memory and execution flow rely on JDK/JRE/JVM: JDK includes development tools and JRE; JRE includes the JVM and libraries; JVM executes bytecode line by line.
  • Scanner is used to take keyboard input, demonstrated through a simple employee data capture example (name, age, salary).
  • Method overloading (same method name, different parameters) shows compile-time polymorphism; method overriding (same signature in parent/child) demonstrates runtime polymorphism.
  • Encapsulation and data hiding are achieved by making fields private and exposing them via public getters/setters to control access and validation.

Who Is This For?

Java beginners and early-mid developers who want to solidify their understanding of collections and core OO concepts, plus practical guidance for building data-driven automation tests.

Notable Quotes

"Java collections are one of the most important topics for every programmer because they help you handle multiple objects in clean, structured and efficient way."
Opening emphasis on why collections matter.
"A single class can have different methods. But we never keep two methods name as same within the same class unless it's method overloading."
Intro to identifiers and methods behavior.
"JDK provides environment to develop and run Java applications. If you just want to run, JRE is enough."
JDK/JRE/JVM fundamentals explained.
"Scanner is a tool that takes input from the keyboard, which lets you build simple interactive programs like employee data capture."
Demonstrating user input handling.
"TreeSet stores unique elements in sorted order automatically, which is perfect for maintaining ordered, non-duplicate collections like price lists or rankings."
TreeSet use case described.

Questions This Video Answers

  • How do I choose between ArrayList and LinkedList in Java for performance?
  • What are the practical differences between HashMap and LinkedHashMap in Java?
  • How does Java's Bytecode enable write-once-run-anywhere (WORA) across platforms?
  • What is the difference between static and non-static methods in Java, and when should I use each?
  • How can I implement data hiding and encapsulation in Java through getters and setters?
Java collectionsArrayListHashSetHashMapTreeSetLinkedHashMapPolymorphismMethod overloadingMethod overridingAccess modifiers (public, private, protected, default)
Full Transcript
What if you could manage data more efficiently in Java by using the right collection type for each use cases? That's exactly what today's session is about. Hello everyone and welcome back to Simple Learn. In this video, we will explore the Java collections framework and understand how to store, organize, and process data using most commonly used collection types. Java collections are one of the most important topics for every programmer because they help you handle multiple objects in clean, structured and efficient way. In today's session, we will cover the difference between arraylist, hashlist, hashmap, tree set and linked hashmap. We will look at when to use each cases based on an order, uniqueness and key value storage requirements. Along with that, we will revisit method overloading and also method overriding and understand how they fit into polymorphism. This topic is especially important because collection concepts are used everywhere including the automation frameworks, back-end development, test data handling and also real world application design. If you understand these fundamentals well, you will much more be confident when writing Java code. By the end of this video, you will know how Java collections work, how polymorphism is applied in practice, and how to choose the right data structures for the right problem. Also, just a quick information. If you're interested in building a successful career in fullstack development, don't forget to check out our AI powered full stack developer program. This course is designed for aspiring developers and professionals who want to master the mer stack while also leveraging the latest generative AI tools such as chat, GBT, GitHub copilot, Amazon code whisper and hugging face to enhance coding, testing, deployment workflows. You will gain hands-on experience through 60 plus practical projects and exercises including industry relevant capstone projects while learning to build scalable, secure and modern web applications from scratch. The program also includes 100 plus hours of live online training led by industry experts covering front-end development, backend development, database management, APIs, cloud development, and also AI powered software testing. In addition, you will receive Microsoft learn access along with official Microsoft course completion certificate and transcripts. With AI power resume building, LinkedIn profile optimization, mock interviews, and simply learns job assist program. You will have the support needed to confidently pursue full stack developer opportunities in today's competitive job market. Hurry up and enroll now. The link is given in the description box below and in the pin comments. Now, before we begin, here's a quick question for you to answer. Which Java collection stores unique elements in sorted order automatically? Is it array list, hash set, tree set or is it hashmap? Comment your answers below. So okay team uh let's move ahead. So very very you know we'll start from the very basic thing. Okay. So team so actually angular is bit complicated. So first I taught you JavaScript and uh then I will be teaching you Java and then you know I will be directly then you know after getting through Selenium I will be landing you to Angular and Cypress board. So don't worry okay it will bit easier because you know you will enhance a bit before going through you know angular concepts anyways. Okay no worries. Okay team so let's move ahead team. Okay. So very first thing you know I will be going to discuss about today team. So there is something you know you might have heard or you might be very new to Java but team there are some very basic terms okay like in Java those are basically like we might have heard about you know JDK okay. Okay no worries. Okay let's move team. So basically JDK. Okay. So JDK team is basically Java development kit. Okay. So now the question comes in your mind. Okay. Now we know it's a Java development kit. Okay. So what it is basically what I mean what's the use of this like why why it's used here. So t let's suppose I'm just giving you one simple example in our class for example what we do let's suppose we are developing some program okay so in our class let us suppose we are developing some program and then I'm trying to compile and then run it and then show the output. Okay. So if I'm developing a program and then I'm trying to compile, run and then show the output. So basically two activities I'm following here. Okay, which two activities I'm developing and running. So to develop and run Java application. So team to develop and run Java application. Okay. The required environment is JDK. Understood? Simple. Okay. So JDK basically you can say JDK provides environment to develop and run Java applications. uh Nikita you can connect directly to LSM I mean one to one you can connect to LSM. Okay. Okay. So JDK basically provides the environment to develop and run Java applications. Okay. So now let's suppose team I configured some code in client's machine. Okay team understand what I'm saying. Okay. So one scenario is this is basically called JDK. Now I am saying let's suppose I configured that code in my client's machine. Now client is responsible to run. He's not responsible to develop. What I'm saying client is responsible to run that code. He's not responsible to develop. Now just to run an application, the required environment is JRE E. Okay. So this is called Java development kit for two activities developing and running the code. But for just a single activity if you need to just run an application. Okay. So you can say JRE. Okay. So basically what's GRE? Just to run an application. The required environment is J. So team now we understood JDK basically provides us the environment to develop and run Java applications. But if we want to only run not develop but if we want to only run not develop Java application the required environment is JRE that is Java runtime environment. Okay. Now there is a third term team that is called JVM. what I'm saying JVM okay this is basically team Java virtual machine okay so JVM is basically responsible Okay to run our code line by line. Okay. And you know that's why that's why JVM is interpreter. Okay. Why? What's interpreter? Basically because it runs Java program line by line. So team if we just summarize this. So in a very simple terms we can say JDK is basically JRE development tools. It's a combination of JRE and development tools. Okay. And we can say JRE is basically the combination of JVM and library classes. Fine. Now see, so you just need to only configure JDK in your machine and it contains everything because JDK contains JRE and development tools and JRE contains JVM. So if you just configure JDK, it already contains JRE and JRE contains JVM. So everything will be configured in your machine. Okay fine. Now going at team there are some features of Java. Okay, it's a simple platform independent and object-oriented language. Okay, and the best feature of Java is platform independent. What I'm saying is the best feature of Java. So team you should all know what do we mean by platform independent. Okay. What this term denotes? If I say Java is a platform independent language. So first you should know what is a platform independent actually. So team platform independent means writing code in one operating system. Okay. Writing code in one operating system. Now what is operating system? Like I'm using Windows. Somebody might be using Linux. Somebody might be using Pedora. Somebody might be using 7 window XP. Okay. So I'm saying platform independent means writing code in any one of the operating system. It might be any operating system and executing that code on another platform on any other operating system. You just need to configure JDK. Okay. So writing codes in one operating system you all know what is operating system right? like I'm saying window XP and executing that code on another platform. So this phenomena is called W. Okay. What I'm saying w means basically W means write once run anywhere. So this is called platform independence. Do you know like how Java became platform independent? Okay, just understand now you know our CPU our machine you know basically this computer or laptop you know if you write any code it doesn't understand English or any French or Russian whatever you know you are writing any language so it doesn't understand any language actually your this processing unit actually you know just understands the byte code and what is a byte code byte code is always in the form of 0 and one. Okay. So this platform independent okay this platform independence what whatever it is it is achieved due to the key phenomenon of byte code okay byte code is nothing you know that is in the form of zero and one format which you could not see actually you know but your actually whatever processing your CPU does whatever input you give it just processes whatever it's going on it always goes in the bite code. Okay. Then it gives you an output and that is converted into a language that you see in the console. Okay. Just understand this team. Okay. Okay. This thing now this is something you know that goes internally. So byte code byte code basically is the machine language of the Java virtual machine. by using by code execution. So let me show you team um let me show you team you know how internally it works. Okay again I'm not so good in paint team. Okay. So, just pardon me for that, but I will try to Okay, it's working right. Okay. So this let's suppose this is a source code and and and and let's suppose t this is your Java compiler font size the this is a source code okay just understand this this font size is okay Java compiler it's I'm not able to increase it anyhow okay this is visible Java compiler this font size is okay this is a source code Okay. So now this is a Java virtual machine. Okay. And uh team let's take sure. Thank you. Okay. So, okay. Now this source code gone to my uh line by line interpreter. Now just have a look onto this figure. And now you know I will check this whole execution flow. Okay. So first you know we let's suppose we have written our source code. Okay. In a plain text file okay like let's suppose I have written some okay I'm just telling you don't worry I will teach you how to write code and all for now. just understand the this figure to make you understand how internally it works. You should get some understanding. So that's why I'm showing you here. Okay. This will make your fundamentals strong actually. Okay. Let's suppose you have written many any code. Okay. And you are just printing hello world into it. Any any Java class inside that you just gave something public static void main and you know just hello world. You're just printing hello world. Okay. It's a source code. Now you have saved that file with dot Java extension. Okay, this much fine. Now what will happen? Let's suppose if whenever I will write any of my source code, any of my source code. So first what I will do? I will compile it. So I will compile compile it using Java compiler. Okay. So using this Java compiler the source code your this source code whatever was your source code was is compiled into dotclass files. This source code you might have written in English language. Okay like public static void main. So now when you compile it so this Java compiler takes this source code which you have written in the English language. Okay, it takes that code, it compiles that code and after compiling that compiling that code, it is compiled into dotclass extension files. So source code was in dot Java extension. Now this got compiled into class files. So team here comes the picture. A dotclass file basically contains a source code in the form of byte code. So when it was your Java extension, it was written something in English. This Java compiler basically compiled that code into dotclass file and all that English format is converted into byte code that is 0 and one format. So that byte code team is a machine language of the Java virtual machine. JVM does not understand anything. It only understands the byte code. So byte code is a machine language of the Java virtual machine. Okay. Now team inside this Java virtual machine I told you there is one interpreter. So, Java interpreter is present inside the JVM and it's the responsibility of Java interpreter that is available inside the Java virtual machine to read this byte code line by line. And this JVM basically converts the byte code dot class into executable code that is OBJ with the help of interpreter. And this OBJ file is used to generate the output which you see whatever you have printed you see hello world is just you know written here. Understood. Yes. Yes. Yes. I will. Monica. Yes. Monica. I will explain. No. No. Okay. in a plain text file. Okay. And save it with dot Java extension. Now using Java compiler the source code is compiled into dotclass files. A dot class file basically contains a in the form of byte code. Okay. So basically bite is a machine language of the Java virtual machine or JVM. Now Java interpreter is present inside the JVM. So JVM reads the byte code file line by line converts the byte code. Byte code is dotclass file. into executable code. Okay. Converted into OBJ file. And this is actually the this OBJ is used to generate the output which you see in your console. Okay. Now fine. I have written everything now. Just go through it. Let me know if you have any question now. Monica, is it fine now? No. No. Pala Raha Kumari, is it fine now? pointing this much understood. Now, now we discuss about in output file we receive as OBJ actually uh one it's internally you know I'm just telling you the internal processing see output I will be executing in an Eclipse editor. Okay. So definitely if I create any class there so it will by default be dot class file only. Okay. So but you get the output in console but internally you know the output is always in the OBG extension only. Okay. I just explained this whole you know internal processing how it works. So actually we will be using uh Eclipse editor but team you know when there was no editor. So in fact I have also written many Java codes using notepad and we used to use you know Java C command for compiling it. Okay using command prompt and you always used to save you know notepad with the class file uh name. Okay. Anyways, now we are moving ahead with you know AI world. So we should not talk all those old things. Okay. No worries. Let's move ahead team. Now team let's come on to the now we understood you know some basics. What is JDK? What is JRE? What is JVM? How internally it works? Why Java is called platform independent language. Okay. Now team basically we will talk about language fundamentals. Okay. So team Java identifiers and reserved keywords. Okay. So first topic you know we'll discuss about what are various identifiers. Second topic you know we'll discuss what are basically reserved words in Java. Okay, now you all know what is reserved words team, right? I'm not talking about reserved words of Java, but reserved word, you understood, right? So like if I say a cat, so basically everybody knows this cat is a reserved word for any animal. If I say lion, so that is a reserved word for any animal. Okay, everybody knows this. Or you know if I say uh for example you know any like Honda Civic, Honda City so everybody knows you know that's a car name. It's a reserved word for any car. Okay. So fine. So these are basically reserved words. So in the same way team in Java also we have some you know predefined reserved words. Okay. I will let you know about it. First let's discuss about identifiers. Okay. What what do we mean by identifiers? So assume assume a team like you know in our class for example 100 students are there. Okay. So how can I identify each person you know obviously by using their names by you know like saying like you know for example if I identify here some names. Okay. So right now we can see 43 participants. Okay. Like I can say hi Ashika, Bishek, Aishwara, Asha, Ahmed, Amul, Anita, Arafat, Mohammed, Dennis. So everybody has one identity. Okay. So basically everybody can be identified by unique name, right? So now one more thing. Okay. So yeah with role numbers actually role number is more unique. Abishek you are right because name can be you know identical also like you know in my class when I was used to be in my school days there were four pe four persons with the same name Ankit and the surname were al was also same. Okay. So my class teacher you know kept like this Ankit 1, Ankit 2, Ankit three and Ankit four. Okay. Three Aishakes. Yeah. So this happens team. So okay role number is you can take assume a role number because role number is always unique. Okay. Okay. So now if we talk about the names in Java program. So name in Java program is considered as identifier which can be used for identification purpose. Okay. So you can say team a name in Java program. Okay. A name in Java program is by default is by default called as identifier. Okay. So identifier is basically you know it can be a class name or it can be method name or variable name or any label name. Okay fine. So a name in Java program is called identifier which can be used for identification purpose. It can be a method name or a variable name or a class name or any label name. Okay. So I'm just taking you know very simple example team here. For example, if I say class test so now see I'm just you know just giving you an example just to tell you what is identifier here. Okay. So in this program if you say how many identifiers are there. Okay. So first identifier is this class name. So this is a name of a class. This is an So every code, every class will always have a different name. So obviously you know team in a single framework you will never be keeping two classes name as same okay because you need to identify identify different classes by their different names now second identifier here is this main this is basically team this is a method name this is a name of a meth method. Okay. So a single class can have different methods. Okay. But okay, I'm not taking a case of method overloading right now team. Okay. I will teach you method overloading then I will tell you. Okay. For now just understand we will never keep two methods name as same within the same class. H okay within the same class team we never keep two methods name. So this method name can also be considered as identifier but two methods name can be same in case of method overloading but that I'm going to teach you after some time okay that's a bit advanced part okay so that all parameters and all I'm going to teach you but right now just understand this this method name is also called an identifier okayifier here is team. This is string. Why this is string is a identifier team? Because this is a predefined class name. This is a predefined class name. This is a predefined reserved actually you know you can say it's a also you know predefined reserved word in Java. So in Java it's already you know defined in its internal library is that this is a string is a sort of class. Okay. So we can say string is a predefined Java class name. So it's name that is name of a class only. So this is also an Uh this is also this is a variable name. Okay. This is a data type. We don't talk about this right now. This variable name this is also called an identifier. understood this much. In this any questions team, can you please explain one more time regarding the method name? Uh okay. So uh this is a method name and uh always okay uh team everyone always does just remember one thing very compulsory thing Java program execution always starts from a main function and this is a main function okay and this is the method name okay Amit and the whole team all participants team all 43 participants okay somebody's is asking who is asking this wika. So wika actually this is you know an array of objects actually you know this string uh I I just you know wanted to tell you when I will be teaching you an array this thing okay Abhishek was also you know asking something about it. So actually you know team this is something this means you know an array of string objects. So uh you can say it's a list of some text values team. Okay this much understood. So and this args this this is basically team arguments. This is basically arguments. Okay. So uh you can say this args is basically a variable name. See now again I need to tell you some internal processing. Now see because you know you run a Java program from the command line. Okay. So you can pass multiple values in it. Okay. So you can run Java program from a command line though now we use editors but you know if we run um internally you know it's a process only. So if we uh run a Java program on the command line so you can pass you know multiple values in it. So like if I pass something like you know uh if I say like this you know um Java test so like three values take for example I pass hello one value second value like Java second value okay let's suppose so you know how internally it goes it internally goes in this way because of this because of this you know how internally it passes so it passes is in this way internally like this in my college days I also used to use command prompt asks basically refers to arguments okay this is a variable name that is of inter data type a team don't you know go too much inside this code I will explain don't worry let me first you know I just want you to teach you here identifier. So I will tell you team, functions, method, variables, data types. Okay team, you understood identifiers, right? So reserved words team, you know, in Java language, some words, you know, are reserved to represent some meaning or functionality. Okay. So like in a normal English language team like what happens? I use cat. Cat reserved to represent one type of animal. If I say dog, dog is reserved to represent one type of animal. If I say apple, so apple is reserved to represent one type of fruit. Okay. If I say eat, eat, eat is reserved keyword to represent one type of action that normal human beings, I mean living beings do. Okay. All living beings you know eat different things in their own way. So that is sort of action. So that is a reserved keyword for you know like this. So in the same way team you know Java language is a small programming language and in that I think 53. Okay. Yeah. 53 types of reserved words are there. Okay. So in Java you know some words are reserved to represent some meaning or functionality. Okay. So we can say in Java uh some words are reserved. So you know in Java like there are I told you you know 53 reserved words. Okay. Uh in this team uh here you know uh 50 keywords are there and three are reserved literal. Wait, I will try to tell you all. I hope I may not miss any. 50 keywords. Okay. And three. Yeah, you can call it keywords. Abishek. 1 minute. Three uh reserved literal. Uh reserved literal are team you know one is true, one is false. These are two boolean values and one is null. Null is a uh default value of a string. Okay, just understand this. I'm telling you. Wait, I will write for everyone. Don't worry. Okay, so just understand for now. One is true, one is false and one is null. These are three uh reserve literal. Okay. Now 50 keyword stream I'm going to tell you in sequence. Okay. So first I will talk about the data types. Now keywords for modifiers. Okay team. So keywords for modifiers is like private. Okay. Public uh protected. I will tell you each don't worry. I mean not each but all those basically you will be going to use protected static public uh private public protected static. Final keyword. Yeah, these are access modifiers. I told right keywords for access modifiers. No, my dear. Uh all are not access modifiers. Access modifiers are only these three private, public, protected and one is default. Okay, these are man keywords that are actually modifiers but not access modifiers because it doesn't give you some sort of accessibility. so transient and one is strict FP but I don't think it's used right now. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 21 24 27 29 Okay, 29 we are done with. So one is try, one is catch, one is uh finally you know team I'm just telling you one you know secret in this secret is if you are aware of all these keywords I'm telling you team and if you know how to use these keywords in your program so it will be very easy for you you know to write any sort of code in Java. Okay, these are basically basics. One question is this document will be shared after class. Yes, Arafat 100% this will be shared. This is for you all only these all notes team I prepar preparing for you in the phase one also I did the same. No worries I will update this and share you in the end of the class. Yeah, I will write whole book. Don't worry here. Okay. So try catch finally throw one is throws keyword. So if you know all these keywords team it will be very easy for you to understand or write your Java program plus logics. You need to know how to build logics that you will learn. I will try hard to make you explain you know each and everything team. Uh but sort okay okay keep keep keep keep going now team these are keywords for exception handling then there are some class related keywords now what are class related keywords um input okay these are class related keywords in this team uh extends is used for uh inheritance. This is used for you know interface if any class implements. I will tell you wait I will tell you which and everything. Uh let first let us complete this that there are uh object related keywords. So these are like new keyword. Okay. Instance of Yes. Uh super keyword and this keyword. This keyword I taught you right team you remember this and super keyword in JavaScript. Yes. You know team there is no delete keyword in Java. Okay. Because the destruction of the useless objects is the responsibility of garbage collector. Again I'm repeating team. Now how how much I have written? Could anybody count this one? Wait. 4 8 10 15 16 20 24 27 31 32 33 34 35 36 37 40 41 42 43 44 44 four I've told you 50 50 may uh I might missing four or five okay but I will tell you don't worry okay enam keyword enum is also a keyword yes yes sir yes yes enum I will tell you yeah when I will teach you how to build a selenium framework we will be using enum 100% %. there is one more keyword team void. If don't return anything then there is one more keyword void. Okay fine. So what I said team there is no delete keyword in Java because destruction of the useless objects is the responsibility of garbage collector. Okay. Do remember this that's why I'm not written delete keyword there is as such no delete keyword in Java now void return type keyword I said if a method won't return anything that method we should declare with void return type okay do remember team one thing in Java return type is actually mandatory okay return type is mandatory so if a method won't return anything. So we should declare void return type. Okay, just understand for now. Some of you might be thinking what do you mean by return type? What is a method? Wait, I will tell you. I will tell you in a code for now just understand void means you are returning nothing. Just understand this line. Okay, I will show you. Okay. So, reserved literal. Okay. True, false and null. Okay. Enum keyword is there. I think we almost covered 44 45. Okay. Fine. Now, so now team these are reserved words that is already available in Java. You won't be able to make it userdefined. You know these words are a predefined keywords. Okay, these are not user you know user defined. Understood team. Any questions in identifiers and reserved words? Then I will be going to now elaborate about data types here quickly. Any questions team? Understood. Thanks Amul. Thank you Vun Raj. Thank you. Okay. So let's move ahead team. Now data types. Now what are data types? Okay. So team every uh Thanks Pronita. So every variable in Java, every variable in Java should have some data type. Okay team uh just understand this thing okay whatever I'm writing please focus on each and every word I'm saying variable so actually data type is for variables only okay so variable in Java should have some data type okay like if I say int x okay So no this x is a variable and it is of which data type int data type. If I say int y. Okay. So this y is a variable and this variable is of int data type. So every expression and every variable in Java has some type. Without type there is no chance of existing single variable or even a single expression D. So each and every error type is you know clearly defined. Understood? If you don't use this 100% you will get compile time exception. You won't even able to compile. So in Java every variable has some type has some data type. Here I have used in data type. Okay. And each and every data type is a reserved word that is already clearly defined in the internal libraries of Java. Now what are internal libraries of Java? We already uh you know we have already gone through this in the beginning. Everything will be contained inside the JDK. when you configure JDK, it has all those internal libraries that all libraries already have such definitions inside contained in it that all knows man if you're using int data type or you're using by data type or any sort of data type they all know what this data type means because the those are reserved words in Java. Okay, I hope now you are able to correlate each and everything. Okay, from the beginning whatever I told right saying because of these reasons we can conclude that Java language is a strongly typed programming language. Secondly, we can also say team that Java is a pure objectoriented language. Is it or not? C team this is a question I will tell you all oops concepts but I would like to tell you Java when compared with old languages which old languages that come before Java but I think we all are born with Jim okay but before Java okay before Java there are languages but compared to that old languages Java is more object-oriented language. Okay. Now we we will not be going to do any sort of relative comparisons between different languages here. Okay. So but I'm going to tell you like few small things here team multiple inheritance is not possible in case of Java. multiple inheritance operator overloading is not possible method overloading is possible operator overloading is not possible okay so we can say you know there are still some things that lacks here okay that I'm going to show you in okay so in which I can prove you know that yes though it's a pure object-oriented programming language but still it lags is behind in some few concepts. Let's quickly you know show you uh data types. Okay, all data types. So first data type team I've shown you by now you should know this by data type how much size it has. If you use this zera type with any variable so how much size basically it will take into the memory. by data type is of one bite. Okay. And team one bite means eight bits. One bite means eight bits. By just knowing about the eight bits, we can easily calculate its range. Some of times you know it may happen it's very possible that anybody you know can forget like what's the you know range okay if you wanted to know its range so there is one trick team okay I'm just going to tell you and those tricks you can apply on other data types also okay like the I said eight bits okay see so eight bits okay this one is most significant bit MSB this is a team bit microprocessor part but I'm I will I will try to explain bit consider one more box with one okay here okay now you can count this see 1 2 3 4 5 6 7 8 bits okay fine if you count this T by using eight bits what is the max value we can represent. So see now some of you might be wondering why I've written something X like this. What do you mean by most significant bit? So basically team this is actually this bite is a signed data type. Sign data type. Sign data type means if it is zero if it is zero then that means it's a positive number. If it's one if a significant bit is one that means it's a negative number. See I cannot compel anyone like int if I say by x is equal to 10. I can also take by x is equal to minus 10. So that minus or plus you know that is actually a more significant bits. That's why I'm saying this is a sign data type. You cannot restrict anyone. You can't use you know negative number. Within a range you can use either positive or either negative number. Understood team what I'm saying? Anybody has any questions? Okay. So this bit is actually reserved as a sign bit. The remaining seven bits basically represents the value. So if I say what's the max value man? So simple team Cly what happens internally go goes like this. So like this one if you start from here 1 2 3 4 5 6 Okay bits I'm making team 7 8 so this is MSB team okay positive or negative now see how we can calculate the range two. This one is 2 to the power 0. Okay. Then in the same way this is this one is 2 ^ 1. Okay. This is 2 ^ 1. This is 2 ^ 2. This is 2 ^ 3. 2 ^ 4. 2 ^ 5. 2 ^ 6. Okay. Now if we calculate this d Okay. So what I'm saying this one was 2 ^ 6 2 ^ 5 2 ^ 4 2 ^ 3 2 ^ 2 2 2 ^ 1 2 ^ 0. If you add all this see what result you get. 2 to the^ 6. Could anybody tell me + 2 ^ 5 + 2 ^ 4 2 the power 2 2 the power 1 2 the power 0 Okay. So if you calculate this, how we calculate 2 ^ 6? 2 ^ 6 in 2 ^ 6 means multiply 2 six times. So 2 into 2 4 2 8 16 32 64. Okay. Then 2 ^ 5 means how much? Speak of team 32. 2 to the power uh 4 means 32 then 16 then 8 then 4 then 2 then 1. that is basically equal to 127. So max range is 127. See how I calculated t you should only know the size with the help of the size you can get its maximum range. Maximum range means till where you can take the value of this. Okay. And if you take out the two's complement of this. Okay. So this will give you actually minus 128. So its range basically its range is - 128 to 127. Got it? Understood? Now don't ask me team what is two's complement. I need to teach mathematics in that case that you can learn. It's a simple thing. Okay. This is how team you know internally actually range is calculated. Got it? So now let's move team. So this is about bite. Okay. Then in the same way team there is short data type. Okay. short data type is of two uh one by two by yes two bytes and two by means 16 bits then there is int data type okay in data type means Four by 8 into 4 32 bits by short int long. In the same way long d of 8 by obviously you can take you know many uh 64 bits. Okay. You can take a huge number in this. You can calculate range team accordingly. Okay. If you don't want to calculate, you can you know remember you know team internally everybody always use in data type. I also use you know mostly in data type but you know um if your value is small if you take the bite it will take less space and overall you know it increases the speed of your code efficiency. Okay, it increases the speed of your code. this much understood team load is something you know if we want five to six decimal places accuracy. if we want some this is same for uh int by short int long that is used for you know nondesimal values. If you want to use decimal values, basically we use float or double data type. If we want some five to six decimal places of accuracy, some five to six decimal places of accuracy. We should go for float. And if we want 14 to 15 decimal places of accuracy then we should go for double. So, LSM informed you, right? Okay team. So, let's move ahead now. Okay. So, oh JDK so team I will just you know um uh let you know like how we can configure uh JDK. Okay. So very first thing do one thing. Okay. So do one thing team first very first thing just go to the official website of Oracle I think from there the free version uh so you configured JDK 25 Is it you configured? Okay. Uh I hope it is not asking for any sort of subscription. Free version is there. So team you can just land it over here and then you can just go to this Windows X4 install. Just click on this team. Uh you doing please connect on onetoone chat. Many of them you know are two freshers here. They will get confused. Please always you know all these sort of things. Abhishek it's a request to you my dear friend please connect to me one to one okay for all these things yeah that is fine amul uh team one or two of you whoever is downloading please let me know I'm continuously looking onto the chat you know to see the reply so team what you need to do if you have so you just do one thing go to command prompt and just check java space hyphen version like this that's So, who was asking exe file? So, Sonia, you need to check in this way. Downloaded X4 installer. Okay. Now, do one thing. After you downloaded it, uh you do one thing. Just double click that whatever downloaded exe file is there. Could you whatever you might have downloaded. So there might be uh just doubleclick the downloaded.exe file. Then just you can click on next and you know it will show you some default installation path. So the version is showing as 25 chari that is basically downloaded where it got downloaded it might be in some program files Rita and Nema don't worry I will show you for Mac I don't have Mac machine. So at end of the class any one of you can share your screen and I will let you know how to you know download it. For now let us complete. If it is showing you version so that is fine surely. team fine. So you just double click the downloaded .exe file. It will show you the some installation path. Just click on install and click on finish. That's Yes, Monica. Eclipse ID for Java developers. Exactly. C team I'm just if you want you know I just it got open so I wanted to show you C team. This is my one workspace. So now you could imagine how much actually I practice myself. See this these are only you know packages I'm showing you it has you know n number of classes you know in each see yes you can is there any online Java online editor uh I'm not sure hackers time. I mean you can try it. I I'm not sure if there is any Eclipse online editor. You can I mean I'm not sure for this but in online editor how you will create package and project and all. So I'm just creating one new okay simple new. Okay. Just clicked on file gone to new clicked on project here I will click on Java project okay click on next okay here is a project name project name I'm just going to give like examples simply click on next. this one simple. Okay, inside src I could see some module info on Java. I will just right click this and delete this for now. No need for this. I just deleted this. Now in the src I just clicked on new. I clicked on class. Okay. And I will one class that is my first Java program. Okay. And I will check this main function. So now just remember team one thing. Java project shi. So now public static void main and just click on finish here. Hey team. Okay. So now team just understand I already told you this is a predefined keyword this is a predefined keyword I told you that those 50 keywords. So now just understand this keyword this is an excess modifier. What this is this is an access modifier. Okay. Now let me tell you the picture of excess modifiers. Package one, package two, no package two can have several classes. Package one has several classes. But a single package can have many classes. T understood? So within package, within class, within package, outside class, outside package outside class. outside package with outside class with inheritance. Okay. So if your access modifier is public means if your method is public so it can be easily accessible within package and within class. It can be easily accessible within package and It can be easily accessible outside the package as well as outside the class. And it is easily accessible outside the package with outside class with inheritance. Inheritance team I already told you it's a parent child relationship between two classes. Okay. In JavaScript I told you all okay whoever don't know team just want to understand this inheritance something that establish a parent and child relationship between two classes. Okay. Then there is protected access modifier. This is within package and within class. within package and outside class. Outside package and outside class. No, outside and outside class protected access modifier is not accessible. But it is accessible when case of inheritance means if inside package one there is a class inside package two there is a class. So a relationship between these two if it is a inheritance relationship between these two classes then it is accessible otherwise it's not accessible. Okay. Default is accessible only in package. It is not accessible outside the Neither in the case of without inheritance nor in the case of with inheritance. So it should be no. Sorry. Private is only accessible within packaging within class and outside it it is not accessible anywhere okay understood more clarification I'm adding here without any edit Charlie what you understood by access modifier till now I mean I told you this so what you understood then I will tell this definition what you understood what is access modifier what do you mean by axis if I use this term axis so I told you I just drawn a figure so what you understood in this don't tell about access modifier only a okay anyone else team I told team one line right if any method is there okay I was just starting with one code here I saw one access modifier this is a simple method team so I need to know in what all classes its accessibility can be okay like like I'm accessible to this 44 participants right So this 7:30 to 11:30 IST I'm only accessible to these 44 participants. I'm not accessible to anyone else. So right now I'm private mentor for you all. Understood. This is accessibility team. I am only accessible to you all right now. In the same way this method accessibility. Okay. This method accessibility I was telling you with this figure. How many of you not understood team? One thing I'm humble request if I ask you team please reply me I really put lot of energy man speaking writing drawing at least put some effort in writing yes or no and if you have any queries please ask me yeah that's why I was asking shi access this is accessibility access means accessibility yes they And basically it gives you the control. So you have given the control to your method where it will be accessible, where it will won't be accessible. This is only the task of access modifier. Okay. Any question team from anyone? And for this only I just created one you know the max access modifiers. Okay. And I told about each and every access modifier. Okay. That where all can it be accessible. And to make you all more clear I drawn this figure team. Where is my paint here? Okay. that there can be many classes inside a package. So if this is a package one, this is a package two. So each package can have different classes. So there is also one possibility of relationship between these two classes. So now these two classes that are in different packages. Okay, with that only I have written outside the package without inheritance and outside the package with outside class with inheritance. Okay once go through this you will understand. if I say now now this is my public access modifier. Now this is accessible anywhere. Okay. Now static if if we keep static variable with any method. If we keep static variable with any method then that means that method is exist that method can be access at a class level. No need to create an object to access this method. Understood? Like let's suppose team now access modifier. I understood now public. Now static says you can use this main method anywhere at a class level. No need to create an object. If let's suppose if static would not have been here. Okay. In that case by default it would be considered as non-static. So for that if we need to use this method I need to create an object for that but here is static that means it is accessible though it's public but it is accessible at class level no need to create an object understood harsha please hold on I will tell you about variables please understand this what I'm telling okay this much understood Not. Okay. Fine team. Now we came till here. Hi. Thank you. Now team if we don't use static keyword. Let's suppose okay if we would have not used static keyword if we would have not used static keyword then that means it's non-static t we need not mention anything as n o n s a tic non-static no we have if we haven't used static keyword word with a method then that means it's a non-static. any method is non-static it cannot be accessed at class level. Simple this difference you understood right? If static it can be accessed at a access at class level. If it's not static, it cannot be existed at a class level. Fine. Simple difference. Okay. This much. Now the question comes if non-static cannot be accessed at a class level then how it can be accessed? So team for non-static method we will be creating an object and do remember team object is created using new keyword that I will tell you further there will there will be lot of scenarios that we'll come across but just understand it right Now to access non-static we need to create an object. Now understood. Now this is void team. if void is followed by any method name. So team this is a method name and void means you are not returning anything. This method is giving you nothing in return. What I'm saying it's not returning anything. Void means it's not returning We understood these four things. Now team let's also understood understand what is a class okay so my all previous batch members I told you what is a class what is a class mean what do what is class what do what do we mean by class yes Nandanda Sai Harsha Fatima Dip I told team what is a class? Class is a blueprint who is saying class instance of object. No no no no GI you are wrong. blueprint. Okay, it's a template used to create an class is a container which includes variables and methods. Okay. Okay. Thank you. Varun Raj it's a collection of methods okay okay so team actually to create any class okay first we need to create a class to write any Java program and always remember uh so this is a class that is a public class okay and this is a predefined keyword again and followed by a class name this is user defined. You can write anything here whatever you want. This is a userdefined. So I just gave my first Okay. And this is always saved by this same class name. Always remember. See I told you Java extension in the beginning. If you remember in the notes I told source code will be in the Java file extension. Okay. And inside that I just created one this method. Now just understand thing one thing this method is public static void main. Always remember one thing Java program execution always starts from the main function from the main function. Public static void main. Okay. So Java program always starts from the main function. This is the most important part. So main function is the main door. So whenever Java runs a program, it looks for main It starts its entry from there only. And program always starts from here only. Okay. So now public means Java can see it. Static means no need to create object to run it. Void means this method does not return anything. mean me main means the starting point and what's this string is doing means it's saying I can accept input from outside I can accept the input so this is actually team parameter so with this brackets you mean to say this is a method okay and this is a method name and inside this brackets if you are mentioning anything that is basically the parameter here and I'm saying string asks it means it can in a form of string array list of items okay if you're not getting I will clarify it more during array session but just understand this this parameter means here that it can accept something as an input from outside. Now inside this I just give team surely why main is a parameterized constructor. Main is a method name. Why it is a parameterized constructor? It's a method name simple. No, no, no, no. When you will create an object at time constructor is called shi. It is nothing related to constructor here. Constructor is always invoked at the time of object creation. I haven't used new keyword till now. Don't get confused anyone. Okay. Yeah, how could we know or when we are going to use static and how to know when could you use non-startic method? So actually Monica it depends actually on the requirement and your logic building. Okay. So everything can be can't be exist at a class level. Okay. And every method we can't create non-static because we need to create an object. Okay, just remember one thing team. Whenever we create an object, it creates its space in a heap memory. Okay, it creates its space in a heap memory. That is something internal I'm telling you. And it's actually a bad practice to create an n number of objects for no use. And all you know variables or methods you cannot provide at a class level so that anybody can access it. They need to create an object team. Okay. It depends on the requirement. Okay. And we have gone through you know JDK configurations yesterday and I'm assuming you might have configured Eclipse also. If whoever is facing a issue, you can just let me know before 10 minutes. You can ping me in a onetoone chat before 10 minutes uh ending of class. Okay. So I will let you know team. Okay. Let's move ahead team. So today team we will we will be going to study about you know very first thing input. Okay. So any Java program team definitely we should first know about an input. So for that team basically we use one class that is named as scanner. Okay. So now the thing comes basically what is okay scanner in Java. Okay. So, team scanner is a tool that makes input from the keyboard. Okay. We can say scanner is a tool. That takes input from the keyboard. Obviously, keyboard in your laptop, in your computer, in your personal machines. Okay. So take input from the keyboard. So your program team you know your program cannot guess what user wants. So it must ask the user. Okay. It must ask the user. So scanner basically helps the program listen to the user. Okay. So team for this you know very first thing you should know we need to import okay we need to import scanner okay so this I'm I'm going to show you in a uh let's create team uh I'm taking team one example okay for example I'm just taking one example uh employee registration okay let's see so new class Okay. And just I'm creating here one name that employee um employee form. Okay. Okay. And I just check the check box. So public static void main. As we all know I already told Java program execution always starts from the main function. Okay. Now very first thing I'm going to give here scanner is equal to new scanner SC is equal to new scanner. system.in. Now if you just mouse over over it so it will give you one suggestion. Just import this scanner. Okay. that is basically the inbuilt class that is available in the Java library. Okay. So now what this says basically just try to understand in a one go. Okay. So this means Java I want to use the scanner tool. Okay. So I just imported the scanner class because I want to use it in my program and that is already inbuilt in my Java internal libraries. Okay. Now this is a class name. This is public static void main. Okay. We already discussed about this yesterday. This is a main function from where our program execution starts. Okay. And now the very first line is scanner SC is equal to new scanner system.in. Now you all know as we discussed also. So again I will tell you we use keyword to create an object. Okay. We use new keyword to create an object. So and this is actually scanner class object. This new scanner system.in. So this new keyword is basically used to create an object and this is actually the parameter here system.in. I will tell you what this system.in is doing here but for now just understand this scanner sc is equal to new scanner means I'm just creating an object of a scanner class and this object is assigned to the reference of scanner class. Fine team okay now this system.in in is basically I am taking because this allows you to do the input from the keyboard. System.in basically allows you to do the input from the keyboard. Okay, understood team. So system.in basically allows you to take the input from the keyboard. Okay. Now I need to let's suppose I need to take some integer value. Okay. I need to take some input. So I just give here int h is equal to sc dot next int. For string we'll just give string name is equal to sorry um c dot next line. or let's do one thing team one minute hold on I will elaborate it more let me first finish the code team 1 minute let's do one thing give it in this way now you all know for what we use system outprint okay team everybody know right for what we use this I told team simple to print in console. Okay, anything. So I just wanted to print for example enter employee name. Okay, I explained till here team. Okay, and I will explain the rest of the lines. Okay, no worries. Let me complete first. So now do one thing uh employee salary so do one thing give it in this way why I'm using this team this is this means new line okay that now whatever whatever text will be followed after this so it will be in a new line that's Okay. No rocket science in this. That's why I use this one. Employee details. It's a team good practice. If you open any object, you need you should close this. So that's why close this. Okay. Uh one minute team. Uh runs job application. For example, employee name is ABC sing employee for example 24 employee salary for example 40,000 okay so it got printed all employee details okay this is this is a team very simple practical program and why I took this example team because in real lifetime you will come across such type of scenarios. Okay. So no bookish nothing. Okay. Simple here. Now I'm going to explain you what I did here team. Okay. See I just wanted to take some input from the keyboard. For that I used scanner class. This much understood team. Okay. Now this object I created for creating an object we use new keyword. So I need to create an object of a scanner class that's why I took this new scanner. Now this systemin means I need to take the input from the keyboard. Okay. So that will basically be passed as a parameter in the accept new except except you wanted to say wika no mika for uh creating an object there is one way instance of but I will tell you for that you know in a advanced part for this for now we will be using new keyword only yeah okay there is a bit difference between new and instance of or creating an object using new keyword only. Okay. So now I just wanted my output uh in my output console. Where is my output console? One minute team. I wanted to show this in my output. So I just printed system.print len enter employee name colon space. So that's why see enter employee name colon it gave this okay now second line after this it says string name is equal to sc dot next line okay now team you might be wondering what this sc next line means this sc is a reference of a scanner object this one okay and dot next line I wanted to say if you are taking dot next line. So that means it will be reading the whole line. Okay, it will be reading the whole line whatever you are giving. For example, I gave ABC sing or if I gave you know anything like Akash Kana. So it will take that whole as a line and assign it to this name. Understood team. So for that there is an inbuilt function that is basically uh next line okay that basically takes string string line string means set of characters understood this much understood say yes quickly team please be quick okay then thank you okay see where am Yeah. Okay. I gave an employee name for example Akash Kana. Now this Akash Karna see it gone into the next line. Now it will take this input and assign it here. Okay. Assign it here. This Akash karna now gone into gone into this name. I entered it got stored in this name and name is of string type. Now string is actually a non-primitive data type. Okay, I will teach you about strings. Don't worry. But string is an inbuilt non-primitive data type. Okay, or you can say it's an inbuilt class in Java for which we use set of characters. Set of character means like these are set of characters only, right? A is a character, K is a character, A again is a character, S is a character, H is a character, space also it takes. Then again K is a character, H. Okay. So this is set of characters which basically a string class takes. Okay. Now see when I clicked on enter after that see now it printed enter employee age. Okay. So for example I'm giving age here for example 34. Okay. So now it's taking this employee age year team. Okay. So now this next int what this next int basically do you know what is s sc okay sc is basically the reference variable of a uh object. Okay. In which object is assigned for a scanner class. Now this team sc.ext Next int. This next int is saying okay sir please give me the integer input in the next line not we discussed yesterday this is an integer value. Okay this is a simple integer value. Okay so next in basically reads a number. Okay so it now what happened now this age basically stored the age typed by the user. Okay. Typed by the user. Fine. Now I again clicked on enter. See I got this. Enter employee salary. It printed the same thing team. Now this next double I basically why I took this double because see salary can be in decimals also. Okay. It can be decimals you know after tax deductions or whatever it is t. Okay. It can be. So that's why I took this double. So as I told you float and double basically used for accepting the integer values. Okay. So this reads a decimal number. Not dot next double. Basically it takes the input in the next line as a double value. Okay. You can take any double value. Though I have not given the double value but if you want you can take. So like I gave 25.00. 007 5 something somewhat like this. Okay. But take the some real real thing here. Okay. For example 25 rupees 25 pisa whatever it is team or you can take take in dollars whatever you want to assume you can assume this. Okay. And now when I clicked on enter so it immediately shown me employee details. Now this this slash and basically shows basically I wanted to print in the print into into the new line. Okay, this basically is a new line sign which I gave that's why it caught again into the new line and see whatever it stored in the name it stored Akash kana ages 34 and salary something 25.74 rupees. So basically it what it stored it has shown me. Okay. Now there comes a question why this positive this plus sign is used. So team this is called concatenation. Okay. So when you write inside the print statement anything anything inside the system. route print and if I write anything inside the double quotes it will print as it is in the output and just concatenate it with the stored name C this N A M E lower case okay and as I told you Java is a case sensitive language if you want you can mane You can give int for salary also. I just took so that I can take salary in a decimal value because if you give int so decimal value will show you an error. Okay, that's the reason you can use int. That's okay. But then don't use don't give input for decimal value. Can we give everything in one line? No. No. Uh don't try this. See your code should be readable. You should be able to debug it. And if you see all the statements in this Java code is ended with this semicolon. Okay. So it will uh in new lines and all whatever it is team basically why we do because we should get the formatted code. Okay. Fine team. It's easy to read. It's easy to debug. Okay. Because when you will be working at a framework level, there will be n number of classes. Okay. So, it will be very difficult. Okay. Goati, we use this plus for See in a output console this much which is in double quotes. Okay. It will print this as it is. Okay. Then concatenate it with this name. this that is already stored there. It concatenated this name with this stored value. So this is something called concatenation. See name it printed as it is. If you see okay then concatenate with it with stored value of name. See lower case N. That's the reason understood sc. Next line is used for string. Why we are not using the data type in this line? Uh one minute. S next line is used for the string. Why we are not uh one minute ji s is used for string? Why we are not using the data type in this line? Data type we used my dear friend. See str iing. I told other lines are using it like c.ext. This we are using data line because uh it will accept the string. This I told this is a non- primitive data type we are using. Okay you good name sir the dho turan okay understood. Should we always use next line next index double reading string? Uh actually we use to take the input you know properly in a next line. So joti it will be a very good practice for accepting the input in a next line we should use this okay okay if the input is in multiple lines but how you will give multiple lines here you just click on enter you will immediately move to the next line and I don't uh I haven't checked you know the maximum care limitation for this like for this input I think you And if you really want to take you know like a big chunk of you know string so this next line will be more than enough. Yeah. Why we are using next line? Yeah exactly because it is taking us to the next line and this next line integer value. This next line double value. So this next line basically immediately go make you land to the next line to take your input. So that's why if you type anything I'm sharing the code team just try this once. Okay. Uh who was this? Wika judi. Okay one second. How the output is coming as name accash 30 has declared it anywhere? No arhat we gave an input right? We gave an input actually if you see there first we printed enter employee name line by line I shown right enter employee name this got printed then I took the input here see I entered this input then I print and enter employee name this I then I gave this input and why this input is going because this is the property of this method to take the input in the next line and I'm storing in this variable and then finally I printed all these details here if you seen these four lines. If not understood Arat, you can ask me uh Arut for you. Uh have you configured JDK and Eclipse? If you configured, so I just shared this code share link. You can run this once. Is it configured in your machine? Okay Joti you can try else we'll connect before 10 minutes at 11:20 Iist. Okay sure Arford we can connect at 11:20 approx. Okay I mean please you know remind me now one to one chat team. Okay. Okay team you can use VS code but why not Eclipse? I mean use an Eclipse you use intelligj. I will be using this Eclipse only. You can in fact team you can use notepad also but in most of the industry level you know people use either Eclipse or IntelliJ you will become used to this editor. It's a very good tool you know because going further when you will be studying selenium so if you will be going with testng and all team so you know in testng uh it gives you know additional extensions this eclipse editor it's helpful so if you want okay Shantu please please ping me in a onetoone chat okay I will just keep track all my onetoone chats okay and we'll connect. Okay. So now let's move ahead. I will config later. What configuration you had? Okay. Eclipse. Yeah, you can. Fine team. So we understood about uh the scanner that is basically the user input. Okay. okay great thanks AA. Okay now what is decision making? So basically team decision making shi is it working fine for you? No you tried this code already shared not working what issue you're facing. You you tried the same code which I shared. Okay. We'll check. Okay. Please drop me one to one message. Okay. Rest all team. Okay. Moving ahead. Uh Wika. Okay. Vun Raj. Is it fine for you? Sonal snail at Shreddha Shantanu Shall. Okay. We'll connect. Richard, Rajita, Prrenita, Pamra, Omalula, Nala, Nema, JS, Nikita, Partil, Nandanda, Mani, Mahal, Sharif, Madavja, Kusha. Okay. Joti fine. Jacob, Jacob, Abraham, is it fine for you? Gumati, Gowi, Fatima, Dip, how are you? Is it fine for you? Dhana Lakshmi Damotaran is it working fine for you? Da Raj Dennis. Okay. Arafat will configure Eclipse. Okay. Amul Amit Aisharia Abhishek how are you? Ashika. Okay thank you. Okay so decision making. Okay. So, decision making means the program checks a condition. Okay. Then decides. Okay. Great. Sh. You tried. See, you tried it worked for you. that is you know more than anything to achieve confidence. Yep. Thank you. So then decides what to do. So team the program basically checks a condition and then decides what to do. Okay. So uh I'm giving you very layman example team. Okay. For example, if it is raining outside. Okay. We have a rainy season. It's raining now. It's up to me. Either I will take umbrella or I will I won't take. Either I will take umbrella or I will not be taking it. Okay. But what will be the condition? If see if what I'm saying if I told team yeah it is reserved word in Java. Fine. If it is raining, if condition is my if condition is, if it is raining, so sir kindly take umbrella otherwise you will be sick and sorry else condition again. Okay. Else do not take umbrell. Okay. So team in the same way in programming program checks is condition true. If yes then please run some code. If no kindly run other code. Okay. Now there are types of decision makings in Java. Okay. See nested is if is also there. I will cover that. Don't worry. Okay. Nested if is also there. Okay. Now let's understand this team one by one. Okay. So in an example I will show you don't worry. So now if we talk about if statement. So team this if statement is used when you want to run code only if condition is true. Only if condition is true. For example, team uh so team C this time I gave the input here in the code itself I already gave age is 20 okay and here I gave a condition if age is greater than equal to 18 then only enter inside its loop else don't enter simply Simple. Okay, let's see. So, does it has voting rights? So, it's showing me you are eligible to vote. Now, do one thing. Make it 10 years. Now, see, it won't show you anything. See empty because if this condition won't pass it won't enter into this if scope and if scope is from this bracket till this bracket okay understood t Now CT I gave here password. Okay. So this dot equals method works in case of string match. String match means a string will match. For example, if actual is this and expected is this. But in case if actual is this upper case a then dm and it's lower case it won't match. Again I say java is a case sensitive language. This is a property of dot equals method. So if this admin 1 2 3 that is stored in this password if this equals to this value which I'm providing inside this string a string is always in string value is always in a double quotes it is a set of characters if this condition passes it will enter into this else it will enter into now this password is storing ADMI in 1 2 3 and this I'm trying to match with this ADMI 1 2 3 4 5 if I try to run this D sorry see it has gone to this else condition it has gone to the else is understood okay now see what happened here I gave int equal to 25 and experience as three Okay, now it has just gone into this. It has checked if this condition is true. So yes, 25 is actually greater than equal to 2 because in age it stored 25. So 25 is greater than equal to 21. It has entered inside this. So it now came here. Now it's saying if experience is greater than equal to 2. Experience was three. So three is obviously greater than equal to two. That means this condition passed. it will print this. Okay. If I would have given some other experience like one year, so it would have gone to the else condition. This much understood. Thank you Joti. Thanks Ky Richard. Now if age this condition become false so it won't execute any of these statement inside the if scope it will directly go to the else statement. Understood. So two conditions nested if loop. Perfect. Understood. Thank you. uh wika you just you know just try once using scanner class okay if it don't work then let me know I mean see int is equal 25 I took it from here okay you just take once you understood right scanner sc new scanner system in keyboard input okay then just print one thing please enter h age okay and after that just give int equals sc next int just try with this only age experience let it be okay could you please try it once on your own and please send me the code in a onetoone chat okay if it don't work don't worry I will help you okay it will work in that same way as I provided okay please try once let me know okay switch statement basically used when chuck checking one variable. Okay. Now sitting what happened here? I gave here okay this main function. Okay. So I just took the one example of a food menu. Okay. So you all know right class and public static void main. Okay. Now int choice equal to two. Here uh basically our program execution starts. I just already assigned you know int choice equal to two. So basically we are creating a variable named as choice. So int means okay that I will be taking some int value. Okay. Now we are storing you know two inside this. Now choice already has two value. Now I'm saying switch choice. Okay. So we are using a switch statement. Switch basically checks the value of choice. Switch will check the value of choice that already has two and now decides what to do. Okay. So now inside its scope it will check the cases. So choice first it will go to the case one. Now this is a case one and choice is two. So it won't enter into this. Now this is basically it comes to case two. Now choice is two. So this choice equal to two will match with this case two and it will execute you selected burger and then AI gave this break statement. What this break statement will do it will immediately throw you out of this switch case scope. Now team could you tell me the next step? Anyone? Yes, come on. It's an int value. Uh Pranita, I already in this example again I need to revamp the whole example. I already gave you know with all possible data types. If you see here, see I gave with a string, I gave with an int, I gave with a double. You want it right now? I can share this actually. I need to change this whole code. It will take uh yes team uh only age. Yes. Anyone could you help me? Come on team. What I need to give? Okay. Int no not choice my dear. int age equals C dot next int. let's see. See one shika if you see here it's asking me an age I gave 24 eligible for job it I gave 24 okay it took where is my experience yeah experience gone three so 24 is greater than equal to 21 okay so it will enter this if you want to go to else condition if you want to fail this condition give 10 I mean it should be uh less uh I mean it should not pass this condition see it gave is not eligible. Okay, perfect. Fine. Understand this. I gave here int A is equal to 10 and in B. Okay. Now B equals. So I gave something here A is equal to 1 in this question mark 20 30. Okay. Now see I gave here something that this condition okay if true so then give this value otherwise give this value that is after colum so now I gave here a is equal to 1 okay so what it should now see uh what I'm saying here if a equ= 1 if a equ= 1 this double equal to sign means equals and single equal to sign means you are assigning the right side value to the left side. Okay. So if a equ= 1 to please put 20 please put 20 in b else 30 in B. So but but a is 10 but a is already 10. Okay. So the condition will become false. So v will be 30. This line understood. No. Okay. okay. Print. Sure. So, okay. Okay. Okay. Team. Yeah. So, double equal sign means equal. Equal. Single equal to sign means right side value is assigned to the left side. This much understood right now I'm saying a is equal to 1. So team if this condition becomes true this a is equal to 1. If this condition becomes true then after question mark the first value will be assigned to b. And if this condition a = 1 becomes false then after question mark don't take the first value just take the value that is after this colon sign. So that is basically 30 this much understood. Okay. So a is equal to 1 I give. Now the problem is a was 10. I assigned a as 10. So 10 is equal to 1. No, this condition will become false. So it won't assign 20. It will go to 30. So this 30 will be assigned to B. Yes, B will be 30. Nikita understood. in the same way team in the second case I said a is equal to 10. Now a was already 10. So this 10 will be equal to 10. So the very first condition that is 20 will be executed. So now b will be allotted as 20. Let's see. See first case B is 30 second case B is 20. Understood. Okay. So in the structure team see I gave here This is a start. This will be a condition and this will be a update. In fact, you know, increment. This will be the syntax of for loop. So now this is the start where I gave int i is equal to 1. Okay. Then I is less than equal to 3. This is a condition. And this one is increment. So increment means I ++ means increase this I after each execution by 1. I ++ means internally I ++ means I + 1. So see how it started it gone. I is equal to 1. Okay. Then it will check is 1 is less than equal to 3. It will say yes. It will go inside the loop. It will execute this and after the exe execution it will come here and it will increase the counter by one. So now this is two. Previous was one. Now this is two. Now again it will check here is 2 is less than equal to three. It will say yes. Again it will enter inside this. Again it will print hello. Then it come outside again it will increase this 2 + 1 3. Then it will check this condition is 3 is less than equal to 3. It will say yes it's equal. It will go and execute this again. It will come outside. It will see 3 + 1 4. Now this time it will check the condition four is less than equal to 3. It will say no. So this condition became false. It will just come out of this for loop and the execution stops. So for example I gave here string names. So actually you know what I'm doing string type of array. A string type of array. So what's an array? Array is basically something you know that contains more than one elements but that should be of same data array is something to store n number of values but those values should be of the same data type. It all so this all will be of string data type whatever you know values I will be taking and that all will be assigned to this names. So for example, I gave here uh Rahul or like uh James and like anything team XY Z. Now how for each loop will work? So now see teams this names contains Rahul then James then XY Z. Okay. So it contains each and everything. So in each iteration one by one from its list it will give to this name. So in first time it will give Rahul then it will print Rahul. It will go inside this again. It will come here. It will see now what it has. Now it has James. It will give James here then it will print James here. Again it will see in its list what is there. It is XY Z. It will give XY Z here. It will print XY Z. Again it will go. Now it will say names do you have anything? It say no sir I don't have anything. I'm empty now. It will just move outside this loop and that's it. Thanks Gi Nikita team you are getting everything right. Whatever is being taught. Why I'm asking this? Because Java is something very important for you all team. Thank you everyone. Can you go over the four line? Uh this one. So now see this names has this list which has three values Rahul, James and XY Z. Okay. Now first iteration it will say this string name. It will say names do you have anything? It will say yes take Rahul from me. It will take Rahul. It will enter inside this. It will print Rahul. In the next iteration again this name will ask this names. Uh do you have anything? It will say Rahul you took no I have James and XY Z. It will give James to it. It will print James. In the next iteration again it will ask do you have anything? It will say sir I already gave you Rahul and James. Now I have XY Z with me. So it will take XY Z. It will print this. And the next iteration now names is empty. So that's it. It will not get anything. Now this will come out of this loop and it will print. Okay. That's it. Okay. D. Thank you team. One thing wanted to let you know all I think to all participants if they are listening. So team uh whoever is worrying about angular and Cyprus. kindly try to understand. I spoke this many times. Team I already I connected you all from the fifth class. I took two extensions and if I said I will teach you Angular and Cyprus. So I'm going to teach you it won't be me. it won't be missed. Okay? So please don't panic anyone team. Okay? I'm saying this again and again and I already told this in recorded calls. I'm saying it again. Okay? So if I would have taught you all Angular you know before all these coding skills what I'm teaching you now I I can guarantee you it would have gone above your head. you won't be able to understand team so please team again I'm saying angular and cyprus will be taught you it won't be missed so please don't be after angular and cyprus it it's for your good team believe me it's for your good okay thank you yeah so for the project when I will be teaching you about angular and about Cyprus. I will tell you for the phase one one project I will tell you second project you need to do on your own okay but I'm telling you one very important thing team when I will be executing the project when I will be showing you showing you the first project I will be going to ask a lot of questions to everyone okay now that will be my my day for now you all are open to ask me the questions when I will be telling you the project. So that day I will ask to everyone. So now don't worry for that and don't you know panic in that case also. Okay please. Thank you. Okay. So…

Transcript truncated. Watch the full video for the complete content.

Get daily recaps from
Simplilearn

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.