• 1 week ago
Transcript
00:00Next, we are going to talk about Java's Java Collections Framework.
00:04In Java, there are many classes and interfaces in which we have many in-built data structures.
00:12Like I made the link list from scratch, I didn't need to make it from scratch,
00:17because there is already a link list in which all methods exist in Java.
00:24Before I studied a topic in the area list,
00:26I studied a topic in the area list.
00:28In the area list, all methods we didn't create from scratch.
00:33Why?
00:34Because the area list exists in Java, I had to write a line.
00:38I had to write Java.Util.ArrayList.
00:43I had to import something.
00:47It means import a package, class, or interface.
00:51It means that it is already built in Java.
00:54Who is built in my util package?
00:56I have to take it directly.
00:59This area list was part of my collection framework,
01:02which is a group in which there are many data structures.
01:05Like the area list, there are link lists, and there are many data structures.
01:10So, in Java collection framework,
01:12you have to remember these words,
01:13whenever you listen to your life,
01:16that there is nothing else.
01:17It is just a collection of Java.
01:19Who is the collection?
01:20It is our data structures collection.
01:22In which we get in-built,
01:23so that we don't need to make scratch from scratch.
01:27If I give a very brief overview,
01:29first of all,
01:30we have a collection interface.
01:32From this interface,
01:33we have a list interface.
01:35From this interface,
01:36I have an array list class,
01:38which I used in the last chapter.
01:41And from this list,
01:42I have a link list class,
01:43which we will see in the next lecture,
01:45next video.
01:47With this,
01:48I get a stack name,
01:50and we will also write a chapter.
01:52I get a hash set name,
01:54and we will also write a chapter.
01:56Along with that,
01:57I get a queue name,
02:00we will also write a chapter.
02:02I get my maps,
02:03hash maps,
02:04and we will also write a chapter.
02:06So,
02:07many data structures
02:08are already in my Java collection framework.
02:12We will mainly use the data structures.
02:15In the Java collection framework,
02:17we will use the structures we will use.
02:19First of all,
02:20our array list will come.
02:21After that,
02:22we will also use the link list.
02:23We will also use the next chapters.
02:24In the next chapters,
02:26we will also use the stack.
02:27The queue we will also use.
02:29We will also use the sets.
02:31We will also use the maps.
02:35So,
02:35all the important data structures are these.
02:37Besides,
02:38if you will research yourself,
02:40once we will cover all these,
02:42if we will remain,
02:43we will not use the enum map,
02:46or you will need to be practically,
02:48but if you want,
02:49we will also explore it.
02:51So,
02:51in this way,
02:52there is a whole collection of
02:54Java,
02:55of classes,
02:57of interfaces,
02:58that are used to implement
02:59in-built data structures in Java.
03:02Now,
03:02the best question in your mind is,
03:04that,
03:04when all the things exist already exist,
03:07why do I create a scratch data structure?
03:09That,
03:10add first,
03:12add last,
03:13write such functions,
03:15write such methods,
03:15write their logic.
03:17Why do I explain it?
03:18So,
03:18after that,
03:19the reason,
03:20the reason is that,
03:20sometimes,
03:21you will say,
03:22you will make a new data structure.
03:24You will make a new data structure,
03:25you will make a list,
03:27or a link list,
03:28and you will make a small implementation.
03:31So,
03:31we will actually need to create a scratch data structure.
03:35Besides,
03:36you can say,
03:37how to create a link list in Java,
03:39you will make a function.
03:41So,
03:41I have to create a scratch.
03:43So,
03:44the interviewer,
03:44when you directly say,
03:46that you have to create a link list from scratch,
03:48or,
03:48you have to ask,
03:49that you have to implement a data structure from scratch.
03:52Then,
03:52we will study queues,
03:53stack,
03:54and you will say,
03:55you will create a stack from scratch,
03:57and create all functions from scratch.
03:58Then,
03:59we need to create all these things,
04:00because that is important in logic building,
04:03in understanding data structures and details.
04:06But,
04:06if there is a coding test,
04:08or a competitive coding test,
04:10in which,
04:11someone did not say,
04:11to create a scratch,
04:12or they have already created,
04:14or use them,
04:15or use them,
04:15or use them,
04:15or use them.
04:17In fact,
04:18if you did not say,
04:19to create a scratch,
04:20then,
04:20what do I want to think?
04:21I want to think,
04:22that I am going to use the JCP approach.
04:24I want to use the java collection framework.
04:26I am not going to create a scratch,
04:28because it takes time to create a scratch.
04:30So,
04:31until,
04:32until you don't say,
04:33to create a scratch,
04:34then,
04:34what do I want to do?
04:35We want to use the java collection framework.
04:37If I have said,
04:38then,
04:38to create a scratch.
04:39So,
04:39I should also ask the scratch approach,
04:42and I should also ask about the java collection framework,
04:45because we are using the maximum time.
04:48we will use that.
04:48when we have to use the java collection framework,
04:48and I will use them.
04:48we will use it.
04:48Go ahead,
04:48as soon as soon as possible,