title
Java Full Course 2022 | Java Tutorial For Beginners | Core Java Full Course | Simplilearn

description
🔥 IITM Pravartak Professional Certificate Program In Full Stack Development - MERN (India Only): https://www.simplilearn.com/full-stack-developer-course-and-certification-iitm-pravartak?utm_campaign=SCE-FullstackIITM&utm_medium=DescriptionFF&utm_source=youtube 🔥Post Graduate Program In Full Stack Web Development: https://www.simplilearn.com/pgp-full-stack-web-development-certification-training-course?utm_campaign=Java-CFD9EFcNZTQ&utm_medium=DescriptionFirstFold&utm_source=youtube 🔥Caltech Coding Bootcamp(US Only): https://www.simplilearn.com/coding-bootcamp?utm_campaign=Java-CFD9EFcNZTQ&utm_medium=DescriptionFirstFold&utm_source=youtube This video is based on Core Java Tutorial for Beginners. The Core Java Full Course in 10 Hours video will make sure all the major fundamentals are covered. This Java Programming tutorial is dedicated to helping beginners with a better learning experience. Below topics will be explained in this Java tutorial for beginners: 0:00 Introduction to Java Tutorial For Beginners - Java Full Course 1:11 Introduction to Java Tutorial For Beginners - Core Java 10:30 Installing Java - Core Java 17:50 Installing Eclipse in Java Tutorial For Beginners - Core Java - Java Full Course 28:31 Primitive Data types in Java Tutorial For Beginners - Core Java 37:09 Non-Primitive Data types in Java - Java Full Course 48:20 Java Tokens - Java Full Course 56:48 Data type conversions (Implicit/Explicit) - Core Java 1:06:20 Hello World Program in Java - Java Full Course 1:21:01 Arrays in Java - Core Java One Dimensional - Java Full Course Two Dimensional - Core Java Three Dimensional - Java Full Course Multi-Dimensional - Core Java 1:29:40 Operators in Java (Arithmetic) - Java Full Course 1:39:04 Operators in Java (Unary) - Core Java 1:48:33 Operators in Java (Comparison Operators) 2:01:15 Operators in Java (BItwise Operators) - Core Java 2:10:37 Control Flow Statements (If Else Statement) - Java Full Course 2:28:03 Control Flow Statements (Switch/Break Statement) - Core Java 2:36:48 2D Array in Java - Java Full Course 2:47:20 3D Array in Java - Core Java 2:54:16 Do while loop in Java - Java Full Course 3:01:40 While Loop in Java - Core Java 3:09:59 For Loop in Java - Java Full Course 3:18:36 Enhanced For Loop in Java - Core Java 3:24:20 Nested For Loop in Java - Java Full Course 3:34:09 COLLECTIONS in Java Part-1 (Interface, Abstract Class) - Core Java 3:43:49 COLLECTIONS in Java Part-2 (Concrete Classes) 3:53:19 ArrayList in Java - Core Java 4:04:36 LinkedList in Java - Java Full Course 4:14:45 HashSet in Java - Core Java 4:23:22 TreeSet in Java 4:29:56 Map in Java - Core Java 4:38:01 HashMap in Java 4:48:01 TreeMap in Java - Core Java 4:55:04 Stacks in Java 5:07:27 Queue in Java - Core Java 5:19:00 Classes in Java 5:34:51 Constructors in Java - Core Java 5:49:31 Streams Map in Java 6:01:34 Streams Filter in Java (Streams API) - Core Java 6:09:53 ForEach in Java (Stream API - Sort Collection, Iterate over Collection) 6:17:33 Streams Reduce in Java Tutorial For Beginners - Core Java 6:25:16 Access Modifiers in Java Tutorial For Beginners 6:38:15 Inheritance in Java 6:52:07 Encapsulation in Java Tutorial For Beginners 7:01:50 Abstraction in Java - Core Java 7:14:43 Interfaces in Java Tutorial For Beginners 7:25:15 Multiple Inheritance in Java 7:34:58 Method Overloading in Java Tutorial For Beginners 7:42:39 Method Overriding in Java 7:54:17 Static Keyword in Java Tutorial For Beginners 8:08:18 Static Nested Classes in Java 8:31:50 Packages in Java 8:41:00 Recursion in Java 8:52:07 Method Calling 9:06:10 Exceptions in Java 9:18:51 Exception Handling in Java 9:32:48 Equals and Hashcode in Java 9:48:13 Comparable in Java Tutorial 9:55:50 Comparator in Java - Core Java 10:05:46 Project 1-ATM Machine Interface in Java 10:24:27 Project 2-Calculator Application in Java - Core Java #CoreJava #CoreJavaTutorial #CoreJavaFullCourse #JavaTutorial #JavaProgramming #JavaTutorialForBeginnners #Java #simplilearn ➡️ About Post Graduate Program In Full Stack Web Development This program will give you the foundation for building full-stack web apps using the Java programming language. You'll begin with the basics of JavaScript, and then venture into some of the more advanced concepts like Angular, Spring Boot, Hibernate, JSPs, and MVC. 👉 Learn More At: https://www.simplilearn.com/pgp-full-stack-web-development-certification-training-course?utm_campaign=Java-CFD9EFcNZTQ&utm_medium=Description&utm_source=youtube 🔥🔥 Interested in Attending Live Classes? Call Us: IN - 18002127688 / US - +18445327688

detail
{'title': 'Java Full Course 2022 | Java Tutorial For Beginners | Core Java Full Course | Simplilearn', 'heatmap': [{'end': 2304.683, 'start': 1531.745, 'weight': 0.798}, {'end': 4614.265, 'start': 4213.001, 'weight': 0.767}, {'end': 19967.708, 'start': 19580.91, 'weight': 0.758}, {'end': 24577.987, 'start': 24190.816, 'weight': 0.935}, {'end': 25730.341, 'start': 25342.434, 'weight': 0.843}, {'end': 26884.489, 'start': 26104.142, 'weight': 1}, {'end': 35713.13, 'start': 35325.034, 'weight': 0.713}], 'summary': 'This java full course covers java programming fundamentals, data types, control flow, collections, classes, inheritance, exception handling, and practical applications such as atm and calculator. it includes details on installation, tokens, arrays, loops, streams, access modifiers, interfaces, exception handling, object equality, and sorting, providing insights into core java concepts and real-world implementations.', 'chapters': [{'end': 55.014, 'segs': [{'end': 55.014, 'src': 'embed', 'start': 18.956, 'weight': 0, 'content': [{'end': 19.677, 'text': 'Hello everyone.', 'start': 18.956, 'duration': 0.721}, {'end': 22.198, 'text': "Welcome to Simply Learn's YouTube channel.", 'start': 20.317, 'duration': 1.881}, {'end': 25.621, 'text': 'Today, we will be learning Complete Core Java.', 'start': 22.759, 'duration': 2.862}, {'end': 30.905, 'text': 'Before we begin, I would like to tell you guys that we have daily updates on multiple technologies.', 'start': 26.221, 'duration': 4.684}, {'end': 34.948, 'text': 'If you are a tech geek in continuous hunt for latest technological trends,', 'start': 31.425, 'duration': 3.523}, {'end': 41.793, 'text': "then consider getting subscribed to our YouTube channel and don't forget to hit that bell icon so that you can never miss an update from Simply Learn.", 'start': 34.948, 'duration': 6.845}, {'end': 50.211, 'text': 'So in this tutorial, Mr. Vikesh Pandey, our training expert with more than 12 successful years of real time experience in software development.', 'start': 42.748, 'duration': 7.463}, {'end': 55.014, 'text': 'And along with that, he has an expertise in artificial intelligence and machine learning industry.', 'start': 50.612, 'duration': 4.402}], 'summary': 'Simply learn offers daily tech updates and core java tutorial by mr. vikesh pandey with over 12 years of experience.', 'duration': 36.058, 'max_score': 18.956, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ18956.jpg'}], 'start': 18.956, 'title': 'Core java tutorial', 'summary': "Introduces simply learn's youtube channel, providing daily updates on multiple technologies, and insights from an expert with over 12 years of real-time experience in software development, artificial intelligence, and machine learning.", 'chapters': [{'end': 55.014, 'start': 18.956, 'title': 'Complete core java tutorial', 'summary': "Introduces simply learn's youtube channel, with daily updates on multiple technologies, and an expert with more than 12 years of real-time experience in software development, artificial intelligence, and machine learning.", 'duration': 36.058, 'highlights': ['Mr. Vikesh Pandey, the training expert, has more than 12 successful years of real-time experience in software development, artificial intelligence, and machine learning industry.', "Simply Learn's YouTube channel provides daily updates on multiple technologies for tech enthusiasts."]}], 'duration': 36.058, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ18956.jpg', 'highlights': ["Simply Learn's YouTube channel provides daily updates on multiple technologies for tech enthusiasts.", 'Mr. Vikesh Pandey, the training expert, has more than 12 successful years of real-time experience in software development, artificial intelligence, and machine learning industry.']}, {'end': 1667.937, 'segs': [{'end': 102.543, 'src': 'embed', 'start': 76.827, 'weight': 9, 'content': [{'end': 81.731, 'text': 'So when we talk about Java, it is one of the most popular programming language out there.', 'start': 76.827, 'duration': 4.904}, {'end': 88.255, 'text': 'And it was created way back in 1991, but it was publicly released only in 1995.', 'start': 82.311, 'duration': 5.944}, {'end': 94.72, 'text': 'It was developed by one of the famous developers of our generation, who is James Gosling.', 'start': 88.255, 'duration': 6.465}, {'end': 102.543, 'text': 'Sun Microsystems, and then later Java was acquired by Oracle and today Oracle owns Java.', 'start': 95.52, 'duration': 7.023}], 'summary': 'Java, a popular programming language, was created in 1991, publicly released in 1995, and is now owned by oracle.', 'duration': 25.716, 'max_score': 76.827, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ76827.jpg'}, {'end': 158.259, 'src': 'embed', 'start': 126.838, 'weight': 1, 'content': [{'end': 128.3, 'text': 'even command line applications.', 'start': 126.838, 'duration': 1.462}, {'end': 134.527, 'text': 'And, at the same time, you can also use it to build complex applications like gaming applications,', 'start': 128.96, 'duration': 5.567}, {'end': 138.351, 'text': 'building microservices or building distributed computing, etc.', 'start': 134.527, 'duration': 3.824}, {'end': 140.494, 'text': "Let's talk about the features of Java.", 'start': 138.892, 'duration': 1.602}, {'end': 147.036, 'text': "So one of the most prominent features of Java is that it's an object-oriented programming language,", 'start': 141.094, 'duration': 5.942}, {'end': 151.317, 'text': 'which means that everything which happens in Java happens around objects.', 'start': 147.036, 'duration': 4.281}, {'end': 158.259, 'text': 'Objects enable the execution of the program, objects talk to each other to exchange data and messages.', 'start': 152.037, 'duration': 6.222}], 'summary': 'Java is an object-oriented programming language used for developing command line and complex applications, such as gaming, microservices, and distributed computing.', 'duration': 31.421, 'max_score': 126.838, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ126838.jpg'}, {'end': 199.223, 'src': 'embed', 'start': 171.504, 'weight': 0, 'content': [{'end': 176.046, 'text': 'it basically enables the program to be run on any platform once compiled.', 'start': 171.504, 'duration': 4.542}, {'end': 183.569, 'text': 'So once you have prepared your program and you have compiled your program, then your compiled program can be run on any platform.', 'start': 176.566, 'duration': 7.003}, {'end': 185.81, 'text': 'It is a strong type checking language.', 'start': 184.089, 'duration': 1.721}, {'end': 194.32, 'text': 'which means that it will force you to respect the contracts of the variables to the data types.', 'start': 186.297, 'duration': 8.023}, {'end': 199.223, 'text': 'For example, if you have created a collection which should accept strings,', 'start': 194.841, 'duration': 4.382}], 'summary': 'Enables cross-platform program execution, strong type checking ensures adherence to variable data types.', 'duration': 27.719, 'max_score': 171.504, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ171504.jpg'}, {'end': 279.054, 'src': 'embed', 'start': 253.061, 'weight': 2, 'content': [{'end': 260.103, 'text': 'it also provides multi-threading support, which means that you can build multi-threading applications like a gaming application,', 'start': 253.061, 'duration': 7.042}, {'end': 262.966, 'text': 'if you take the example of a racing game, for example.', 'start': 260.103, 'duration': 2.863}, {'end': 267.588, 'text': 'so this they can be one thread which is monitoring your leaderboard score.', 'start': 262.966, 'duration': 4.622}, {'end': 271.03, 'text': 'there can be another thread which is displaying the speed of the car.', 'start': 267.588, 'duration': 3.442}, {'end': 273.711, 'text': 'there can be another thread which is displaying the graphic.', 'start': 271.03, 'duration': 2.681}, {'end': 275.872, 'text': 'there can be another thread which is displaying the sound.', 'start': 273.711, 'duration': 2.161}, {'end': 279.054, 'text': "So you'll see, all of these threads are working parallelly,", 'start': 276.372, 'duration': 2.682}], 'summary': 'The platform supports multi-threading for parallel processing in applications, such as gaming. for instance, a racing game can have separate threads for monitoring leaderboard scores, displaying car speed, graphics, and sound.', 'duration': 25.993, 'max_score': 253.061, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ253061.jpg'}, {'end': 333.561, 'src': 'embed', 'start': 296.764, 'weight': 4, 'content': [{'end': 301.426, 'text': 'Again, if you take the example of programming languages like C or C++,', 'start': 296.764, 'duration': 4.662}, {'end': 313.091, 'text': 'you had the concept of pointers and we witnessed a lot of scenarios and a lot of incidents where there was a memory leakage happening in the production application,', 'start': 301.426, 'duration': 11.665}, {'end': 316.412, 'text': 'which was really a bad experience for the organizations.', 'start': 313.091, 'duration': 3.321}, {'end': 321.094, 'text': 'so java removed the concept of pointers totally from its programming language.', 'start': 316.952, 'duration': 4.142}, {'end': 333.561, 'text': "it's also a very robust language because it provides a really great exception handling framework out of the box which developers can use and implement to build really resilient applications.", 'start': 321.094, 'duration': 12.467}], 'summary': 'Java removed pointers, has robust exception handling for resilient applications.', 'duration': 36.797, 'max_score': 296.764, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ296764.jpg'}, {'end': 471.221, 'src': 'embed', 'start': 443.575, 'weight': 3, 'content': [{'end': 446.177, 'text': 'JDK stands for Java Development Kit.', 'start': 443.575, 'duration': 2.602}, {'end': 449.941, 'text': 'So the Java Development Kit is the installation of the Java.', 'start': 446.698, 'duration': 3.243}, {'end': 452.704, 'text': "This is what you're going to install on your machine.", 'start': 450.362, 'duration': 2.342}, {'end': 460.312, 'text': 'Once the JDK or Java Development Kit has been installed, the JDK will provide a lot of other components as well.', 'start': 453.385, 'duration': 6.927}, {'end': 471.221, 'text': 'like Java Runtime Environment or JRE, Java Virtual Machine or JVM, some class libraries, and some other supporting libraries.', 'start': 460.792, 'duration': 10.429}], 'summary': 'Jdk is the installation of java; includes jre, jvm, and libraries.', 'duration': 27.646, 'max_score': 443.575, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ443575.jpg'}, {'end': 743.737, 'src': 'embed', 'start': 681.152, 'weight': 5, 'content': [{'end': 686.535, 'text': 'Another thing which you will notice that it says LTS here, which means long-term support.', 'start': 681.152, 'duration': 5.383}, {'end': 694.24, 'text': 'Basically, long-term support are the releases for which Oracle is going to provide long-term security patches and updates.', 'start': 687.016, 'duration': 7.224}, {'end': 702.044, 'text': 'For the non-LTS releases, Java will not provide long-term support and long-term patch fixes and long-term security fixes.', 'start': 694.72, 'duration': 7.324}, {'end': 708.224, 'text': "So it's a good idea to analyze and evaluate on which version you want to develop your applications on.", 'start': 702.54, 'duration': 5.684}, {'end': 710.626, 'text': 'For this demo, I think it is fine.', 'start': 708.744, 'duration': 1.882}, {'end': 717.11, 'text': 'We can go with the non LTS version and even for your uh, for your customer facing applications,', 'start': 710.666, 'duration': 6.444}, {'end': 722.634, 'text': 'you can start with a non LTS version and then upgrade to the latest LTS version whenever that is available.', 'start': 717.11, 'duration': 5.524}, {'end': 728.759, 'text': 'So for this demo, we can download Java SE 15, and you can also do the same on your machine.', 'start': 723.115, 'duration': 5.644}, {'end': 732.021, 'text': 'It will work exactly the same way as an LTS works.', 'start': 729.179, 'duration': 2.842}, {'end': 735.292, 'text': 'So you can click on the JDK download option here.', 'start': 732.731, 'duration': 2.561}, {'end': 736.713, 'text': "Let's click on that.", 'start': 735.913, 'duration': 0.8}, {'end': 743.737, 'text': 'It is going to bring up the downloads detail page, and you can see, uh, there are multiple options given here.', 'start': 737.293, 'duration': 6.444}], 'summary': 'Oracle provides long-term support (lts) for certain java releases, while non-lts releases lack long-term support and security patches. it is advisable to carefully consider which version to use for application development.', 'duration': 62.585, 'max_score': 681.152, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ681152.jpg'}, {'end': 899.812, 'src': 'embed', 'start': 872.56, 'weight': 8, 'content': [{'end': 879.463, 'text': 'By default, it is going to install in C program files slash Java slash JDK 15.', 'start': 872.56, 'duration': 6.903}, {'end': 887.166, 'text': 'But if you want to change the location and you want to install Java to a particular custom location of your choice, that is also possible.', 'start': 879.463, 'duration': 7.703}, {'end': 899.812, 'text': 'You just hit change here and then you can choose whatever directory or folder or place you want to install this Java on and you can basically select the appropriate location.', 'start': 887.607, 'duration': 12.205}], 'summary': 'Java jdk 15 can be installed in a custom location of choice.', 'duration': 27.252, 'max_score': 872.56, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ872560.jpg'}], 'start': 55.534, 'title': 'Java programming fundamentals and installation', 'summary': 'Covers java programming fundamentals, including its popularity, creation history, features, and applications, emphasizing its simplicity, platform independence, and strong type checking. additionally, it discusses the installation process for java se 15 on a windows machine and provides a detailed guide on downloading and installing eclipse for java development.', 'chapters': [{'end': 252.561, 'start': 55.534, 'title': 'Introduction to java programming', 'summary': 'Discusses the fundamentals of java, highlighting its popularity, creation history, features, and applications, emphasizing its simplicity, platform independence, and strong type checking, and noting its automatic garbage collection as a key feature.', 'duration': 197.027, 'highlights': ['Java is one of the most popular programming languages, created in 1991 and publicly released in 1995 by James Gosling, acquired by Oracle, and known for its simplicity and ease of use.', 'Java is a platform-independent language, enabling programs to run on any platform once compiled, and it enforces strong type checking to ensure data type integrity.', "Java's prominent features include being object-oriented, allowing objects to enable program execution and interact with each other, and providing automatic garbage collection, freeing up memory space during program execution.", "Java's versatility allows it to be used in various applications such as web, mobile, desktop, and command line applications, as well as in complex applications like gaming, microservices, and distributed computing."]}, {'end': 680.112, 'start': 253.061, 'title': 'Java: multi-threading, security, and platform independence', 'summary': "Highlights java's multi-threading support for building parallel applications, its security features with no pointers to avoid memory leaks, and its platform independence, allowing the same program to run on different platforms. it also covers the anatomy of java, including the java development kit (jdk), java runtime environment (jre), and java virtual machine (jvm).", 'duration': 427.051, 'highlights': ["Java's multi-threading support enables parallel application development, such as gaming applications, with separate threads for different functions, ensuring efficient and simultaneous processing.", "Java's security is reinforced by the absence of pointers, mitigating the risk of memory leaks and reference leaks encountered in languages like C or C++.", "Java's platform independence allows programs to be written once and run on different platforms, promoting flexibility and portability across operating systems like Linux, Windows, and MacOS.", 'The Java Development Kit (JDK) encompasses essential components like Java Runtime Environment (JRE), Java Virtual Machine (JVM), and supporting libraries, facilitating the development and execution of Java programs.']}, {'end': 938.19, 'start': 681.152, 'title': 'Java se 15 installation', 'summary': 'Discusses the importance of long-term support (lts) in java releases, the process of downloading and installing java se 15 on a windows machine, and the customization options available during installation.', 'duration': 257.038, 'highlights': ['Long-term support (LTS) are releases for which Oracle provides long-term security patches and updates, while non-LTS releases do not receive long-term support or patch fixes.', 'It is advisable to analyze and evaluate the version for application development, and for customer-facing applications, starting with a non-LTS version and upgrading to the latest LTS version when available is suggested.', 'The process of downloading Java SE 15 for a Windows machine is demonstrated, with the availability of multiple options for different platforms, including Linux and Mac OS.', 'The installation process of Java SE 15 is shown, with the option to customize the installation location if desired.']}, {'end': 1667.937, 'start': 938.73, 'title': 'Java installation and eclipse setup', 'summary': 'Discusses the successful installation of java, including verification steps, and provides a detailed guide on downloading and installing eclipse for java development, with a focus on the eclipse ide for enterprise java developers and the process of creating a basic java project.', 'duration': 729.207, 'highlights': ['Java installation verification', 'Eclipse download process', 'Eclipse installation and setup']}], 'duration': 1612.403, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ55534.jpg', 'highlights': ['Java is a platform-independent language, enabling programs to run on any platform once compiled, and it enforces strong type checking to ensure data type integrity.', "Java's versatility allows it to be used in various applications such as web, mobile, desktop, and command line applications, as well as in complex applications like gaming, microservices, and distributed computing.", "Java's multi-threading support enables parallel application development, such as gaming applications, with separate threads for different functions, ensuring efficient and simultaneous processing.", 'The Java Development Kit (JDK) encompasses essential components like Java Runtime Environment (JRE), Java Virtual Machine (JVM), and supporting libraries, facilitating the development and execution of Java programs.', "Java's security is reinforced by the absence of pointers, mitigating the risk of memory leaks and reference leaks encountered in languages like C or C++.", 'Long-term support (LTS) are releases for which Oracle provides long-term security patches and updates, while non-LTS releases do not receive long-term support or patch fixes.', 'It is advisable to analyze and evaluate the version for application development, and for customer-facing applications, starting with a non-LTS version and upgrading to the latest LTS version when available is suggested.', 'The process of downloading Java SE 15 for a Windows machine is demonstrated, with the availability of multiple options for different platforms, including Linux and Mac OS.', 'The installation process of Java SE 15 is shown, with the option to customize the installation location if desired.', 'Java is one of the most popular programming languages, created in 1991 and publicly released in 1995 by James Gosling, acquired by Oracle, and known for its simplicity and ease of use.']}, {'end': 2875.02, 'segs': [{'end': 1715.425, 'src': 'embed', 'start': 1688.083, 'weight': 3, 'content': [{'end': 1691.224, 'text': 'But for this lecture, I think this is what we wanted to achieve.', 'start': 1688.083, 'duration': 3.141}, {'end': 1697.568, 'text': 'We wanted to show how we can install Eclipse and how we can create a very sample Java CLI project.', 'start': 1691.244, 'duration': 6.324}, {'end': 1700.611, 'text': 'so this is it for this this session.', 'start': 1698.089, 'duration': 2.522}, {'end': 1704.955, 'text': 'in the next session, we will look at some of the data types in java.', 'start': 1700.611, 'duration': 4.344}, {'end': 1708.719, 'text': "let's get started with primitive data types in java.", 'start': 1704.955, 'duration': 3.764}, {'end': 1715.425, 'text': "we are going to learn about the primitive data types in java and we'll also see a short demonstration of it.", 'start': 1708.719, 'duration': 6.706}], 'summary': 'Demonstrated installation of eclipse and creation of a java cli project for a session, followed by plans to cover data types in the next session.', 'duration': 27.342, 'max_score': 1688.083, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ1688083.jpg'}, {'end': 1780.66, 'src': 'embed', 'start': 1752.369, 'weight': 0, 'content': [{'end': 1759.532, 'text': 'So the data types which store numbers are byte, short, int, long, float, and double.', 'start': 1752.369, 'duration': 7.163}, {'end': 1765.895, 'text': 'These six data types basically are used to store any kind of numeric value.', 'start': 1760.173, 'duration': 5.722}, {'end': 1767.596, 'text': "Let's understand these a bit more.", 'start': 1766.235, 'duration': 1.361}, {'end': 1774.159, 'text': 'Byte is the shortest possible data type value which you can use in Java to store numbers.', 'start': 1768.096, 'duration': 6.063}, {'end': 1780.66, 'text': 'You can only store numbers within the range of minus 128 to plus 127.', 'start': 1774.619, 'duration': 6.041}], 'summary': 'Java has 6 data types for storing numeric values, with byte storing numbers within -128 to 127.', 'duration': 28.291, 'max_score': 1752.369, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ1752369.jpg'}, {'end': 2383.068, 'src': 'embed', 'start': 2355.196, 'weight': 2, 'content': [{'end': 2359.717, 'text': "But at the same time, string is so customizable and it's so special in nature.", 'start': 2355.196, 'duration': 4.521}, {'end': 2364.499, 'text': "It's the way it stores the value, the way it provides the operations and handlings.", 'start': 2360.118, 'duration': 4.381}, {'end': 2372.121, 'text': "It's so different than primitive data types that it cannot fully be put in the same bucket as the primitive data types.", 'start': 2364.919, 'duration': 7.202}, {'end': 2378.023, 'text': "So that's why I said it's a special data type, a bit inclined towards the non-primitive category.", 'start': 2372.661, 'duration': 5.362}, {'end': 2383.068, 'text': 'So what is string basically? We covered about the char data type in the previous lecture.', 'start': 2378.604, 'duration': 4.464}], 'summary': 'String is a special, customizable data type distinct from primitive types.', 'duration': 27.872, 'max_score': 2355.196, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ2355196.jpg'}, {'end': 2588.54, 'src': 'embed', 'start': 2562.005, 'weight': 1, 'content': [{'end': 2569.389, 'text': 'That anything can be a number, that anything can be characters, that anything can be a floating number as well.', 'start': 2562.005, 'duration': 7.384}, {'end': 2580.775, 'text': 'So basic idea is that if you want to store a collection or a sequence of multiple values, how do you do that? You do that with the help of arrays.', 'start': 2569.669, 'duration': 11.106}, {'end': 2588.54, 'text': 'array is a data structure, a non-primitive data structure in java which can store lot of values of similar type.', 'start': 2581.334, 'duration': 7.206}], 'summary': 'Arrays in java can store multiple values of similar type, making it a versatile data structure.', 'duration': 26.535, 'max_score': 2562.005, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ2562005.jpg'}, {'end': 2752.083, 'src': 'embed', 'start': 2720.851, 'weight': 4, 'content': [{'end': 2726.234, 'text': "The first one is I'm just printing the string which has the value test and you can see it has printed here.", 'start': 2720.851, 'duration': 5.383}, {'end': 2727.695, 'text': 'It is coming from this line.', 'start': 2726.594, 'duration': 1.101}, {'end': 2736.019, 'text': "Then the next line which is printed is line number eight where I'm saying another string str1 and str1 also had the same value.", 'start': 2728.315, 'duration': 7.704}, {'end': 2738.861, 'text': 'So you can see another string has the same value.', 'start': 2736.059, 'duration': 2.802}, {'end': 2743.103, 'text': 'And then I have printed the array here, the complete array.', 'start': 2739.401, 'duration': 3.702}, {'end': 2745.164, 'text': 'And you see this strange value here.', 'start': 2743.583, 'duration': 1.581}, {'end': 2752.083, 'text': 'It also tells us that if you want to print the array, then you cannot just put the variable name and print it.', 'start': 2745.744, 'duration': 6.339}], 'summary': "Printing 'test' string, array, and strange value from the transcript.", 'duration': 31.232, 'max_score': 2720.851, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ2720851.jpg'}], 'start': 1668.672, 'title': 'Learning java data types, variables, and arrays', 'summary': 'Covers setting up eclipse, creating a java cli project, explaining primitive data types, discussing variables, non-primitive data types, and array basics, emphasizing the importance of variable conventions and zero-based indexing, with a focus on java string and array element access.', 'chapters': [{'end': 2047.533, 'start': 1668.672, 'title': 'Setting up eclipse and learning java data types', 'summary': 'Covers the process of setting up eclipse and creating a sample java cli project, followed by a detailed explanation of primitive data types in java, including the range and use cases of byte, short, int, long, float, double, boolean, and char data types.', 'duration': 378.861, 'highlights': ['The chapter covers the process of setting up Eclipse and creating a sample Java CLI project.', 'Detailed explanation of primitive data types in Java, including the range and use cases of byte, short, int, long, float, double, boolean, and char data types.']}, {'end': 2203.028, 'start': 2047.533, 'title': 'Java variables and data types', 'summary': 'Discusses the creation and printing of various data types and variables in java, including char, byte, short, int, float, double, and boolean, emphasizing the importance of semicolons and the conventions for declaring float and double values.', 'duration': 155.495, 'highlights': ['The chapter discusses the creation and printing of various data types and variables in Java, including char, byte, short, int, float, double, and boolean.', 'Emphasizes the importance of semicolons and the conventions for declaring float and double values.', 'Demonstrates the process of running the program and printing the values of the variables.']}, {'end': 2539.419, 'start': 2203.488, 'title': 'Java non-primitive data types', 'summary': 'Discusses non-primitive data types in java, covering the differences between primitive and non-primitive types, and focusing on string as a special data type inclined towards the non-primitive category, capable of storing a continuous sequence of characters.', 'duration': 335.931, 'highlights': ['The chapter discusses the differences between primitive and non-primitive data types, focusing on string as a special data type inclined towards the non-primitive category, capable of storing a continuous sequence of characters.', 'The chapter also explains the two ways of creating a string variable in Java, highlighting the difference in memory efficiency between reusing the same object and creating a new object each time.']}, {'end': 2697.582, 'start': 2539.999, 'title': 'Java array basics', 'summary': 'Explains the basics of arrays in java, including the creation, declaration, and indexing of array variables, emphasizing the ability to store a continuous sequence of homogeneous data types and the zero-based indexing. it also demonstrates the allocation of memory and assignment of values to array elements.', 'duration': 157.583, 'highlights': ['Arrays in Java are non-primitive data types that can store a continuous sequence of homogeneous data types, including numbers, characters, and floating point numbers.', 'Array variables in Java are identified by square brackets and require the specification of the data type and size, denoting the number of values the array can store.', 'Java arrays use zero-based indexing, with the first element being stored at index 0, and subsequent elements being stored at continuous memory locations denoted by their corresponding indexes.']}, {'end': 2875.02, 'start': 2697.582, 'title': 'Print array in java', 'summary': 'Explains how to print and access elements in an array in java, highlighting the use of index locations and the zero-based index format, and also demonstrates handling exceptions when accessing elements beyond the array size.', 'duration': 177.438, 'highlights': ["The chapter demonstrates printing the string 'test' and the variable 'str1' with the same value, and then prints the complete array.", 'Explaining the behavior of printing a non-primitive data type array, showing the memory footprint and the need to specify the index location to print a particular element.', 'Demonstrating changing the values in the array and printing specific elements based on index locations.', 'Illustrating accessing elements in the array using zero-based index format and explaining the error when trying to access an element beyond the array size.']}], 'duration': 1206.348, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ1668672.jpg', 'highlights': ['Detailed explanation of primitive data types in Java, including the range and use cases of byte, short, int, long, float, double, boolean, and char data types.', 'Arrays in Java are non-primitive data types that can store a continuous sequence of homogeneous data types, including numbers, characters, and floating point numbers.', 'The chapter discusses the differences between primitive and non-primitive data types, focusing on string as a special data type inclined towards the non-primitive category, capable of storing a continuous sequence of characters.', 'The chapter covers the process of setting up Eclipse and creating a sample Java CLI project.', "The chapter demonstrates printing the string 'test' and the variable 'str1' with the same value, and then prints the complete array."]}, {'end': 3944.724, 'segs': [{'end': 3061.606, 'src': 'embed', 'start': 3037.574, 'weight': 8, 'content': [{'end': 3045.957, 'text': "it's basically anything which you declare as a variable, is an identifier, and when you declare the variable name again,", 'start': 3037.574, 'duration': 8.383}, {'end': 3054.1, 'text': 'java puts some sort of restrictions as to what you can or cannot do when you work with java and you declare the variable names.', 'start': 3045.957, 'duration': 8.143}, {'end': 3058.563, 'text': 'for example, these variable names cannot start with numbers.', 'start': 3054.68, 'duration': 3.883}, {'end': 3061.606, 'text': 'so you cannot have a variable name which starts with any number.', 'start': 3058.563, 'duration': 3.043}], 'summary': 'Java has restrictions on variable names, such as not allowing names to start with numbers.', 'duration': 24.032, 'max_score': 3037.574, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3037574.jpg'}, {'end': 3128.829, 'src': 'embed', 'start': 3103.222, 'weight': 5, 'content': [{'end': 3109.384, 'text': 'but to give you an idea of what constants are, so constants are basically exactly what they sound like.', 'start': 3103.222, 'duration': 6.162}, {'end': 3117.786, 'text': 'they are the identifiers which you have declared in your program, whose value cannot be changed once defined.', 'start': 3109.384, 'duration': 8.402}, {'end': 3125.768, 'text': 'so if you write something as final int i equal to 5, then this value is fixed.', 'start': 3117.786, 'duration': 7.982}, {'end': 3128.829, 'text': 'you cannot change the value of i again in the program.', 'start': 3125.768, 'duration': 3.061}], 'summary': "Constants in programming are unchangeable identifiers, like 'final int i = 5'.", 'duration': 25.607, 'max_score': 3103.222, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3103222.jpg'}, {'end': 3407.08, 'src': 'embed', 'start': 3379.084, 'weight': 0, 'content': [{'end': 3383.845, 'text': 'you cannot use these in any other meaning or in any other way and, like i said,', 'start': 3379.084, 'duration': 4.761}, {'end': 3387.166, 'text': 'we will look at a detailed example of this as well in the coming lectures.', 'start': 3383.845, 'duration': 3.321}, {'end': 3391.829, 'text': 'so this was a quick overview of what are different types of tokens in java.', 'start': 3387.726, 'duration': 4.103}, {'end': 3399.434, 'text': 'so we have keywords, we have identifiers, constants, special symbols and operators.', 'start': 3391.829, 'duration': 7.605}, {'end': 3400.415, 'text': 'so this is it.', 'start': 3399.434, 'duration': 0.981}, {'end': 3407.08, 'text': "this is all what i wanted to cover in today's lecture, and in the next session we will be looking at data type conversions.", 'start': 3400.415, 'duration': 6.665}], 'summary': 'Overview of types of tokens in java including keywords, identifiers, constants, special symbols, and operators.', 'duration': 27.996, 'max_score': 3379.084, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3379084.jpg'}, {'end': 3517.689, 'src': 'embed', 'start': 3463.571, 'weight': 1, 'content': [{'end': 3469.654, 'text': 'here the smaller box is a variable or a data type which has a smaller range.', 'start': 3463.571, 'duration': 6.083}, {'end': 3473.936, 'text': 'if you remember, we talked about the range of short byte, int, etc.', 'start': 3469.654, 'duration': 4.282}, {'end': 3482.08, 'text': 'and we could see that as we go from short to byte, to int, to long, to float, to double, the ranges were increasing.', 'start': 3473.936, 'duration': 8.144}, {'end': 3491.904, 'text': 'right. so we will follow the same kind of analogy that if we have to store a smaller range variable into a larger range variable,', 'start': 3482.08, 'duration': 9.824}, {'end': 3494.045, 'text': 'java will automatically do that.', 'start': 3491.904, 'duration': 2.141}, {'end': 3499.726, 'text': 'but if i have to store a larger range variable into a smaller range variable,', 'start': 3494.045, 'duration': 5.681}, {'end': 3506.647, 'text': 'then i have to sacrifice some quality of the value and we will look at the examples of that as well.', 'start': 3499.726, 'duration': 6.921}, {'end': 3514.908, 'text': "so let's first look at the example where we can store a smaller range variable into a larger range variable.", 'start': 3506.647, 'duration': 8.261}, {'end': 3517.689, 'text': 'we call this as implicit data type conversion.', 'start': 3514.908, 'duration': 2.781}], 'summary': 'Java allows implicit data type conversion for smaller range variables to larger range variables.', 'duration': 54.118, 'max_score': 3463.571, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3463571.jpg'}, {'end': 3700.172, 'src': 'embed', 'start': 3673.897, 'weight': 4, 'content': [{'end': 3681.663, 'text': 'so if you hear the word data type casting or implicit data type casting, you can think that it is exactly the same concept as data type conversion.', 'start': 3673.897, 'duration': 7.766}, {'end': 3685.005, 'text': 'so this is about implicit data type conversion.', 'start': 3682.083, 'duration': 2.922}, {'end': 3688.346, 'text': "now let's look at an example of explicit data type conversion.", 'start': 3685.005, 'duration': 3.341}, {'end': 3689.547, 'text': 'how does that work?', 'start': 3688.346, 'duration': 1.201}, {'end': 3700.172, 'text': 'so, using the same analogy of the boxes now i will try to store a larger ranging value variable into a smaller range variable and see how that looks like.', 'start': 3689.547, 'duration': 10.625}], 'summary': 'Implicit and explicit data type conversion explained using analogy of boxes.', 'duration': 26.275, 'max_score': 3673.897, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3673897.jpg'}, {'end': 3860.593, 'src': 'embed', 'start': 3839.332, 'weight': 2, 'content': [{'end': 3848.519, 'text': "i'm telling that, telling java to explicitly cast the value of b, which is a long data type variable, into an integer c,", 'start': 3839.332, 'duration': 9.187}, {'end': 3852.403, 'text': "which is an int data type variable, and then i'm just printing the value.", 'start': 3848.519, 'duration': 3.884}, {'end': 3857.449, 'text': 'so this is what is happening in this program, that from double to float, to long, to int.', 'start': 3852.403, 'duration': 5.046}, {'end': 3860.593, 'text': "now let's run this program and see what happens.", 'start': 3857.449, 'duration': 3.144}], 'summary': 'Java program casts long to int, then prints value.', 'duration': 21.261, 'max_score': 3839.332, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3839332.jpg'}, {'end': 3917.501, 'src': 'embed', 'start': 3882.671, 'weight': 6, 'content': [{'end': 3883.972, 'text': 'so it works fine.', 'start': 3882.671, 'duration': 1.301}, {'end': 3891.496, 'text': 'then when we talk about the long representation, we are trying to convert a double variable into a long variable and we see that the precision,', 'start': 3883.972, 'duration': 7.524}, {'end': 3892.737, 'text': 'the decimal values, are lost.', 'start': 3891.496, 'duration': 1.241}, {'end': 3897.341, 'text': 'this is expected because long does not understand decimal values.', 'start': 3893.297, 'duration': 4.044}, {'end': 3902.267, 'text': "that's why anything after the decimal, or in fact the whole decimal portion, is gone.", 'start': 3897.341, 'duration': 4.926}, {'end': 3910.675, 'text': "when you're trying to store double or float into some absolute data type variables like int or long, and then in int representation,", 'start': 3902.267, 'duration': 8.408}, {'end': 3917.501, 'text': 'since you already have this long, this long can easily be casted to int by just providing this explicit casting,', 'start': 3910.675, 'duration': 6.826}], 'summary': 'Converting double to long loses decimal precision, expected behavior.', 'duration': 34.83, 'max_score': 3882.671, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3882671.jpg'}], 'start': 2875.34, 'title': 'Java tokens and data type conversions', 'summary': 'Covers tokens in java, including keywords, identifiers, constants, special symbols, and operators. it explains data type conversions in java, showcasing the principle that smaller data types can fit into larger ones, and demonstrates explicit and implicit data type conversions with examples, also emphasizing precision loss during conversions.', 'chapters': [{'end': 3295.085, 'start': 2875.34, 'title': 'Java tokens and their meanings', 'summary': 'Covers tokens in java, which are divided into five categories: keywords, identifiers, constants, special symbols, and operators. it explains their predefined meanings in java and the restrictions placed on identifiers, and gives an example of using constants to maintain fixed values in a program.', 'duration': 419.745, 'highlights': ['The chapter covers tokens in Java, which are divided into five categories: keywords, identifiers, constants, special symbols, and operators.', 'It explains their predefined meanings in Java and the restrictions placed on identifiers.', 'Gives an example of using constants to maintain fixed values in a program.']}, {'end': 3689.547, 'start': 3295.085, 'title': 'Java tokens and data type conversions', 'summary': 'Covers an overview of different types of tokens in java, including keywords, identifiers, constants, special symbols, and operators, followed by an explanation of data type conversions, emphasizing the principle that smaller data types can fit into larger ones, and demonstrating implicit and explicit data type conversions with examples.', 'duration': 394.462, 'highlights': ['The chapter covers an overview of different types of tokens in Java, including keywords, identifiers, constants, special symbols, and operators.', 'The explanation of data type conversions emphasizes the principle that smaller data types can fit into larger ones.', 'The chapter demonstrates implicit and explicit data type conversions with examples.']}, {'end': 3944.724, 'start': 3689.547, 'title': 'Data type conversion in java', 'summary': 'Demonstrates the process of converting larger data types (double, float, long) to smaller data types (float, long, int) through explicit type casting in java, showcasing the precision loss when converting to non-precision data types.', 'duration': 255.177, 'highlights': ['The chapter demonstrates the process of converting larger data types (double, float, long) to smaller data types (float, long, int) through explicit type casting in Java.', 'The precision loss when converting to non-precision data types (long, int) is showcased.', 'The concept of implicit and explicit data type casting is explained.']}], 'duration': 1069.384, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ2875340.jpg', 'highlights': ['The chapter covers tokens in Java, including keywords, identifiers, constants, special symbols, and operators.', 'It explains data type conversions in Java, showcasing the principle that smaller data types can fit into larger ones.', 'The chapter demonstrates the process of converting larger data types (double, float, long) to smaller data types (float, long, int) through explicit type casting in Java.', 'The explanation of data type conversions emphasizes the principle that smaller data types can fit into larger ones.', 'The chapter demonstrates implicit and explicit data type conversions with examples.', 'Gives an example of using constants to maintain fixed values in a program.', 'The precision loss when converting to non-precision data types (long, int) is showcased.', 'The concept of implicit and explicit data type casting is explained.', 'It explains their predefined meanings in Java and the restrictions placed on identifiers.']}, {'end': 4845.715, 'segs': [{'end': 3968.534, 'src': 'embed', 'start': 3944.724, 'weight': 2, 'content': [{'end': 3951.47, 'text': 'can easily be casted from a smaller range to a larger range without any changes or without any extra code.', 'start': 3944.724, 'duration': 6.746}, {'end': 3955.631, 'text': 'but when you have to go from a larger value to a smaller value,', 'start': 3951.93, 'duration': 3.701}, {'end': 3962.652, 'text': 'you have to provide these casting instructions to java to successfully cast those variables.', 'start': 3955.631, 'duration': 7.021}, {'end': 3968.534, 'text': 'in the next session we will be looking at how we can write the first hello world program in java,', 'start': 3962.652, 'duration': 5.882}], 'summary': 'Casting variables in java for range conversion, with focus on upcoming hello world program.', 'duration': 23.81, 'max_score': 3944.724, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3944724.jpg'}, {'end': 4043.407, 'src': 'embed', 'start': 4011.269, 'weight': 3, 'content': [{'end': 4016.054, 'text': 'so your java project might look like something like this you will have an src folder here.', 'start': 4011.269, 'duration': 4.785}, {'end': 4022.536, 'text': 'under the src folder you see some namespaces, sort of things created here.', 'start': 4017.394, 'duration': 5.142}, {'end': 4033.901, 'text': 'right, we call these as packages and in java you can think of package as something which can group multiple related artifacts together.', 'start': 4022.536, 'duration': 11.365}, {'end': 4035.942, 'text': 'this is simply a grouping mechanism.', 'start': 4033.901, 'duration': 2.041}, {'end': 4043.407, 'text': "i can say it's a way to put all the related artifacts to a particular business problem into a certain place.", 'start': 4035.942, 'duration': 7.465}], 'summary': 'In java, packages group related artifacts, providing a way to organize code for a specific business problem.', 'duration': 32.138, 'max_score': 4011.269, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4011269.jpg'}, {'end': 4199.734, 'src': 'embed', 'start': 4158.286, 'weight': 0, 'content': [{'end': 4169.22, 'text': 'you create a class for writing the business logic of checkout and then you create instance of this particular class to work for a particular customer order.', 'start': 4158.286, 'duration': 10.934}, {'end': 4174.988, 'text': "so class is basically a blueprint, it's the specification, it's the skeleton of the object.", 'start': 4169.22, 'duration': 5.768}, {'end': 4178.288, 'text': 'so once you click on this, you can create a class.', 'start': 4175.308, 'duration': 2.98}, {'end': 4180.469, 'text': 'now eclipse is a pretty smart ide.', 'start': 4178.288, 'duration': 2.181}, {'end': 4188.912, 'text': 'it will provide you with bunch of options on how you actually can create a class what and it will also provide you with some sensible defaults.', 'start': 4180.469, 'duration': 8.443}, {'end': 4193.573, 'text': 'for example, it will automatically select a source folder in your project which you have created.', 'start': 4188.912, 'duration': 4.661}, {'end': 4199.734, 'text': 'it will automatically select a package in fact the currently selected package and if you want to change the package, just hit,', 'start': 4193.573, 'duration': 6.161}], 'summary': 'Creating a class in eclipse for business logic and instance for customer order. eclipse provides options and defaults for class creation.', 'duration': 41.448, 'max_score': 4158.286, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4158286.jpg'}, {'end': 4614.265, 'src': 'heatmap', 'start': 4213.001, 'weight': 0.767, 'content': [{'end': 4226.909, 'text': "and you can see i have followed a sort of a naming convention here the first character i've kept it as capital and then any other new word which is coming in my class file name is also capitalized.", 'start': 4213.001, 'duration': 13.908}, {'end': 4235.437, 'text': 'so java would expect you and it would encourage you to follow this naming convention that whenever you are creating a class,', 'start': 4226.909, 'duration': 8.528}, {'end': 4242.845, 'text': 'always start with a capital letter, then small letters and every new word you are writing can start with a capital letter.', 'start': 4235.437, 'duration': 7.408}, {'end': 4246.288, 'text': "again, java will not throw an error if you don't do this.", 'start': 4242.845, 'duration': 3.443}, {'end': 4249.492, 'text': "uh, h capital or w capital, but it's a good practice.", 'start': 4246.288, 'duration': 3.204}, {'end': 4251.632, 'text': 'the next thing is the modifier.', 'start': 4249.992, 'duration': 1.64}, {'end': 4256.174, 'text': 'we are going to cover the modifiers in details in the in the upcoming lectures.', 'start': 4251.632, 'duration': 4.542}, {'end': 4265.376, 'text': 'but for now you can understand that anything which is marked as public is accessible to every other java class in this whole project.', 'start': 4256.174, 'duration': 9.202}, {'end': 4268.117, 'text': "that's the basic meaning of making a class as public.", 'start': 4265.376, 'duration': 2.741}, {'end': 4270.317, 'text': 'public as the name suggests itself.', 'start': 4268.117, 'duration': 2.2}, {'end': 4272.078, 'text': "it means it's visible to everyone.", 'start': 4270.317, 'duration': 1.761}, {'end': 4275.7, 'text': "you can select a super class and again we'll talk about this super class later.", 'start': 4272.358, 'duration': 3.342}, {'end': 4281.004, 'text': 'but if this is the java line object is the super class of all the classes which are created in java.', 'start': 4275.7, 'duration': 5.304}, {'end': 4287.648, 'text': 'again, interface is again an advanced concept and there are some other interesting uh uh, defaults it provides.', 'start': 4281.004, 'duration': 6.644}, {'end': 4291.37, 'text': 'for example, if you want to create a main method now, what is the main method?', 'start': 4287.648, 'duration': 3.722}, {'end': 4292.831, 'text': "we'll just cover it in a while.", 'start': 4291.37, 'duration': 1.461}, {'end': 4293.832, 'text': 'so i will not do that.', 'start': 4292.831, 'duration': 1.001}, {'end': 4296.554, 'text': 'i will leave everything as default and i will click on finish.', 'start': 4293.832, 'duration': 2.722}, {'end': 4309.863, 'text': 'so i have this new file coming up here and you can see it has automatically picked up the package which i selected and it has also written public class test hello world with a starting and ending curly braces.', 'start': 4297.114, 'duration': 12.749}, {'end': 4316.388, 'text': 'in the previous lecture we covered about these curly braces that all the code block have to be in the curly braces.', 'start': 4309.863, 'duration': 6.525}, {'end': 4324.373, 'text': 'whenever you write a java class, the very first statement java would expect to have in the class is package name.', 'start': 4316.388, 'duration': 7.985}, {'end': 4332.777, 'text': 'so make sure that you have package as a keyword and then the actual package name as the package name for that particular class.', 'start': 4324.373, 'duration': 8.404}, {'end': 4339.44, 'text': 'you can see the package follows a dot convention and it always ends with a semicolon, like all the java statements, end with semicolon.', 'start': 4332.777, 'duration': 6.663}, {'end': 4341.821, 'text': 'so that would be the first thing which you will write in your class.', 'start': 4339.44, 'duration': 2.381}, {'end': 4345.984, 'text': 'second thing is the access modifier of the class.', 'start': 4342.401, 'duration': 3.583}, {'end': 4350.749, 'text': 'like i said, you want this class to be accessible to every other file in this project.', 'start': 4345.984, 'duration': 4.765}, {'end': 4352.851, 'text': 'then you can mark this class as public.', 'start': 4350.749, 'duration': 2.102}, {'end': 4354.852, 'text': 'the next thing is the class keyword.', 'start': 4352.851, 'duration': 2.001}, {'end': 4359.697, 'text': 'you need to write this particular keyword, as is, otherwise your class will not be detected.', 'start': 4354.852, 'duration': 4.845}, {'end': 4360.798, 'text': 'so you write this as class.', 'start': 4359.697, 'duration': 1.101}, {'end': 4367.84, 'text': 'then you write test, hello, world or whatever name you want to write, but make sure that whatever public class name you provide here,', 'start': 4361.318, 'duration': 6.522}, {'end': 4370.341, 'text': 'that name should match with the file name.', 'start': 4367.84, 'duration': 2.501}, {'end': 4374.402, 'text': 'these two things should match the file name and the class name.', 'start': 4370.341, 'duration': 4.061}, {'end': 4382.385, 'text': "if they don't match, you would experience weird behaviors, as the class will not be compiled or class might not be able to run, etc.", 'start': 4374.402, 'duration': 7.983}, {'end': 4389.487, 'text': 'so always make sure that whatever file name you provide, you always have a class with that name in your file.', 'start': 4382.385, 'duration': 7.102}, {'end': 4393.508, 'text': 'so my class structure is is ready, but there is nothing here in this class.', 'start': 4389.867, 'duration': 3.641}, {'end': 4403.151, 'text': 'in fact you cannot, you cannot even execute this class because for executing the class, for executing any class in java, any class at all in java,', 'start': 4393.508, 'duration': 9.643}, {'end': 4404.932, 'text': 'you would need a main method.', 'start': 4403.151, 'duration': 1.781}, {'end': 4408.853, 'text': 'in java main method is the entry point method of the java.', 'start': 4404.932, 'duration': 3.921}, {'end': 4414.575, 'text': 'whenever you are trying to run any application, be it a very small or very large java application,', 'start': 4408.853, 'duration': 5.722}, {'end': 4421.096, 'text': 'you would always and always need a main method in the, in the class in the project somewhere,', 'start': 4414.575, 'duration': 6.521}, {'end': 4430.539, 'text': 'and you need to tell the java runtime to execute that class and then the class will have a main method and your program will start executing.', 'start': 4421.096, 'duration': 9.443}, {'end': 4434.602, 'text': 'So always have a main method, otherwise your program will not execute.', 'start': 4430.859, 'duration': 3.743}, {'end': 4443.11, 'text': 'And how do you write the main method? So you first write public, then you write static, then you write void, and then you write main.', 'start': 4434.963, 'duration': 8.147}, {'end': 4447.794, 'text': 'And then you provide a parameter to this method as this.', 'start': 4443.57, 'duration': 4.224}, {'end': 4449.294, 'text': "now let's understand.", 'start': 4448.254, 'duration': 1.04}, {'end': 4450.915, 'text': 'what did i actually write here?', 'start': 4449.294, 'duration': 1.621}, {'end': 4459.578, 'text': 'first, keyword is public, because this method has to be public because, like i said, java runtime needs to be able to access this method.', 'start': 4450.915, 'duration': 8.663}, {'end': 4466.641, 'text': 'so the similar concept which applied on the class is applied on this method as well that the entry point method has to be public.', 'start': 4459.578, 'duration': 7.063}, {'end': 4469.342, 'text': 'otherwise java will not be able to find this method.', 'start': 4466.641, 'duration': 2.701}, {'end': 4472.663, 'text': 'so you need to make this method exactly as public.', 'start': 4469.642, 'duration': 3.021}, {'end': 4474.344, 'text': 'the next keyword is static.', 'start': 4472.663, 'duration': 1.681}, {'end': 4477.925, 'text': 'you again need to write this keyword as is,', 'start': 4474.344, 'duration': 3.581}, {'end': 4486.528, 'text': 'and the reason we write static here is because we we want to run this particular class without creating an object of the class.', 'start': 4477.925, 'duration': 8.603}, {'end': 4489.93, 'text': 'static is again a keyword which we will cover in the upcoming lectures,', 'start': 4486.528, 'duration': 3.402}, {'end': 4498.333, 'text': 'but for now you can understand that whenever you want to access something within the class without creating an object,', 'start': 4489.93, 'duration': 8.403}, {'end': 4501.814, 'text': 'then you need to create it as static.', 'start': 4498.693, 'duration': 3.121}, {'end': 4503.454, 'text': 'the next is void.', 'start': 4501.814, 'duration': 1.64}, {'end': 4506.575, 'text': 'void is basically the return type of this method.', 'start': 4503.454, 'duration': 3.121}, {'end': 4509.256, 'text': 'the method name is main and it has to be main.', 'start': 4506.575, 'duration': 2.681}, {'end': 4511.076, 'text': 'it cannot be main one or main two.', 'start': 4509.256, 'duration': 1.82}, {'end': 4512.497, 'text': 'otherwise, if you do that,', 'start': 4511.076, 'duration': 1.421}, {'end': 4520.899, 'text': 'java will not be able to run your program because it will expect you to write this particular method exactly as what i have written here.', 'start': 4512.497, 'duration': 8.402}, {'end': 4523.259, 'text': 'no changes at all should be there.', 'start': 4520.899, 'duration': 2.36}, {'end': 4530.261, 'text': 'if you make any changes, java program will not run because it will not be able to find the entry point method, which is the main method.', 'start': 4523.259, 'duration': 7.002}, {'end': 4533.042, 'text': 'so public static void, main.', 'start': 4530.261, 'duration': 2.781}, {'end': 4535.842, 'text': 'remember that you need to have this in your program.', 'start': 4533.042, 'duration': 2.8}, {'end': 4541.864, 'text': 'so void is the return type, which means that this particular program it will not return anything back to the runtime,', 'start': 4535.842, 'duration': 6.022}, {'end': 4547.769, 'text': 'because a method can have this capability to either return something or not return something.', 'start': 4542.364, 'duration': 5.405}, {'end': 4554.035, 'text': 'for example, a method which can add two numbers will return the result of addition right.', 'start': 4547.769, 'duration': 6.266}, {'end': 4555.257, 'text': 'so we return the result.', 'start': 4554.035, 'duration': 1.222}, {'end': 4556.518, 'text': 'return is the word here.', 'start': 4555.257, 'duration': 1.261}, {'end': 4561.382, 'text': 'in this case, this method is not expected to return anything because there is nobody consuming it.', 'start': 4556.518, 'duration': 4.864}, {'end': 4565.867, 'text': 'right. java runtime will not do anything with the, with the return value of this particular method.', 'start': 4561.382, 'duration': 4.485}, {'end': 4573.032, 'text': "that's why java will force you to write void here, and main is the exact method name which you need to use.", 'start': 4566.207, 'duration': 6.825}, {'end': 4577.696, 'text': 'java will expect you to supply a string array argument.', 'start': 4573.032, 'duration': 4.664}, {'end': 4585.582, 'text': 'if we covered arrays in bit detail in the in the in the previous lectures and we will cover arrays in actually in the next lecture in very detail,', 'start': 4577.696, 'duration': 7.886}, {'end': 4593.208, 'text': 'but you can, as we discussed, that array is basically a sequence of characters or words or integers or anything right.', 'start': 4585.582, 'duration': 7.626}, {'end': 4599.213, 'text': 'so in this case, this is basically the mandatory parameter which you need to write, as is this parameter.', 'start': 4593.208, 'duration': 6.005}, {'end': 4600.074, 'text': 'name can be anything.', 'start': 4599.213, 'duration': 0.861}, {'end': 4605.618, 'text': 'obviously it can be arg, args or whatever you want to write it as, but the basic, fundamental,', 'start': 4600.074, 'duration': 5.544}, {'end': 4612.244, 'text': 'is that java will basically supply all the command line arguments using this particular string array.', 'start': 4605.618, 'duration': 6.626}, {'end': 4614.265, 'text': "that's why you need to provide this.", 'start': 4612.244, 'duration': 2.021}], 'summary': 'Java class naming convention and main method requirements explained.', 'duration': 401.264, 'max_score': 4213.001, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4213001.jpg'}, {'end': 4272.078, 'src': 'embed', 'start': 4226.909, 'weight': 6, 'content': [{'end': 4235.437, 'text': 'so java would expect you and it would encourage you to follow this naming convention that whenever you are creating a class,', 'start': 4226.909, 'duration': 8.528}, {'end': 4242.845, 'text': 'always start with a capital letter, then small letters and every new word you are writing can start with a capital letter.', 'start': 4235.437, 'duration': 7.408}, {'end': 4246.288, 'text': "again, java will not throw an error if you don't do this.", 'start': 4242.845, 'duration': 3.443}, {'end': 4249.492, 'text': "uh, h capital or w capital, but it's a good practice.", 'start': 4246.288, 'duration': 3.204}, {'end': 4251.632, 'text': 'the next thing is the modifier.', 'start': 4249.992, 'duration': 1.64}, {'end': 4256.174, 'text': 'we are going to cover the modifiers in details in the in the upcoming lectures.', 'start': 4251.632, 'duration': 4.542}, {'end': 4265.376, 'text': 'but for now you can understand that anything which is marked as public is accessible to every other java class in this whole project.', 'start': 4256.174, 'duration': 9.202}, {'end': 4268.117, 'text': "that's the basic meaning of making a class as public.", 'start': 4265.376, 'duration': 2.741}, {'end': 4270.317, 'text': 'public as the name suggests itself.', 'start': 4268.117, 'duration': 2.2}, {'end': 4272.078, 'text': "it means it's visible to everyone.", 'start': 4270.317, 'duration': 1.761}], 'summary': 'Java encourages class naming convention with capital letters and public access', 'duration': 45.169, 'max_score': 4226.909, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4226909.jpg'}, {'end': 4339.44, 'src': 'embed', 'start': 4309.863, 'weight': 7, 'content': [{'end': 4316.388, 'text': 'in the previous lecture we covered about these curly braces that all the code block have to be in the curly braces.', 'start': 4309.863, 'duration': 6.525}, {'end': 4324.373, 'text': 'whenever you write a java class, the very first statement java would expect to have in the class is package name.', 'start': 4316.388, 'duration': 7.985}, {'end': 4332.777, 'text': 'so make sure that you have package as a keyword and then the actual package name as the package name for that particular class.', 'start': 4324.373, 'duration': 8.404}, {'end': 4339.44, 'text': 'you can see the package follows a dot convention and it always ends with a semicolon, like all the java statements, end with semicolon.', 'start': 4332.777, 'duration': 6.663}], 'summary': 'Java class must start with a package name, following dot convention, and ending with a semicolon.', 'duration': 29.577, 'max_score': 4309.863, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4309863.jpg'}, {'end': 4443.11, 'src': 'embed', 'start': 4414.575, 'weight': 9, 'content': [{'end': 4421.096, 'text': 'you would always and always need a main method in the, in the class in the project somewhere,', 'start': 4414.575, 'duration': 6.521}, {'end': 4430.539, 'text': 'and you need to tell the java runtime to execute that class and then the class will have a main method and your program will start executing.', 'start': 4421.096, 'duration': 9.443}, {'end': 4434.602, 'text': 'So always have a main method, otherwise your program will not execute.', 'start': 4430.859, 'duration': 3.743}, {'end': 4443.11, 'text': 'And how do you write the main method? So you first write public, then you write static, then you write void, and then you write main.', 'start': 4434.963, 'duration': 8.147}], 'summary': 'Always include a main method in java class for program execution.', 'duration': 28.535, 'max_score': 4414.575, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4414575.jpg'}, {'end': 4713.14, 'src': 'embed', 'start': 4686.083, 'weight': 1, 'content': [{'end': 4693.489, 'text': 'then you need to use system class and all of these standard input, standard output and error are streams.', 'start': 4686.083, 'duration': 7.406}, {'end': 4695.391, 'text': "and that's what comes to the next word.", 'start': 4693.489, 'duration': 1.902}, {'end': 4699.674, 'text': 'what is this out out is a stream to print standard output.', 'start': 4695.391, 'duration': 4.283}, {'end': 4704.977, 'text': 'similarly, we have system.err, which is for printing the error output streams.', 'start': 4699.674, 'duration': 5.303}, {'end': 4709.639, 'text': 'similarly, we have system.in for taking its standard input streams.', 'start': 4704.977, 'duration': 4.662}, {'end': 4713.14, 'text': 'so system.in, system.out, system.err.', 'start': 4709.639, 'duration': 3.501}], 'summary': 'System class handles standard input, output, and error streams.', 'duration': 27.057, 'max_score': 4686.083, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4686083.jpg'}, {'end': 4781.401, 'src': 'embed', 'start': 4736.025, 'weight': 10, 'content': [{'end': 4742.29, 'text': 'so, like i mentioned earlier as well, this whole syntax is used to print and actually this is the core method.', 'start': 4736.025, 'duration': 6.265}, {'end': 4745.252, 'text': 'this is the real method which prints something on the console.', 'start': 4742.29, 'duration': 2.962}, {'end': 4753.397, 'text': 'so system class uses the output stream to print something on the console using the help of println method.', 'start': 4745.252, 'duration': 8.145}, {'end': 4755.519, 'text': 'there is also a print method.', 'start': 4753.397, 'duration': 2.122}, {'end': 4758.461, 'text': 'so there are two methods one is print and one is println.', 'start': 4755.519, 'duration': 2.942}, {'end': 4768.089, 'text': 'the difference is that in case of print method, the print method will not provide you or terminate on a next line, but in system.out.println,', 'start': 4758.461, 'duration': 9.628}, {'end': 4773.634, 'text': 'the ln means line here it will print something and it will bring the cursor to the next line.', 'start': 4768.089, 'duration': 5.545}, {'end': 4779.98, 'text': 'if you do not use this and if you again use another print statement, then both of the statements will be printed on the same line.', 'start': 4773.634, 'duration': 6.346}, {'end': 4781.401, 'text': 'i will show that as well.', 'start': 4779.98, 'duration': 1.421}], 'summary': 'The system class uses the println method to print on the console, which brings the cursor to the next line.', 'duration': 45.376, 'max_score': 4736.025, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4736025.jpg'}], 'start': 3944.724, 'title': 'Java program basics and creation', 'summary': 'Covers the basics of writing a java program, including casting variables, creating packages in eclipse, creating java classes, class structure, main method, and printing in java programs using system.out.println and system.out.print methods.', 'chapters': [{'end': 4119.279, 'start': 3944.724, 'title': 'Java program basics and package creation', 'summary': 'Explains the basics of writing a java program, including the process of casting variables and creating packages for grouping related artifacts, and also demonstrates the creation of a package in eclipse.', 'duration': 174.555, 'highlights': ['The chapter emphasizes the process of casting variables and mentions that casting from a larger value to a smaller value requires specific instructions to Java for successful casting.', 'The chapter discusses the creation of packages in Java, highlighting their purpose to group multiple related artifacts together, providing an example related to an e-commerce application.', "The chapter demonstrates the process of creating a package in Eclipse, highlighting the steps to right-click on the src folder, select 'new', and then 'package'."]}, {'end': 4291.37, 'start': 4119.279, 'title': 'Creating java classes in eclipse', 'summary': 'Covers the process of creating a java class in eclipse, emphasizing the significance of classes as blueprints for objects and providing an overview of the steps involved, such as selecting packages, naming conventions, and modifiers.', 'duration': 172.091, 'highlights': ['Classes serve as blueprints for objects in Java, defining the specifications and skeleton of the object, and are essential for creating instances of objects for specific functionalities, such as business logic for e-commerce operations.', 'Eclipse IDE offers various options and sensible defaults for creating a class, including automatically selecting the source folder and package, and encourages following naming conventions by suggesting the use of capital letters for the first character and new words in the class file name.', 'The concept of modifiers in Java, particularly the public modifier, is introduced, explaining its accessibility to other Java classes in the project.']}, {'end': 4600.074, 'start': 4291.37, 'title': 'Java class structure and main method', 'summary': "Covers the structure of a java class, emphasizing the importance of the package name, access modifier, class keyword, and main method, with a specific focus on the keywords 'public', 'static' and 'void' and the mandatory 'string array argument', highlighting the need for adherence to naming conventions and syntax for successful program execution.", 'duration': 308.704, 'highlights': ['The importance of the package name, access modifier, class keyword, and main method in a Java class', 'The significance of adhering to naming conventions and syntax for successful program execution', 'The necessity for the main method as the entry point for Java programs']}, {'end': 4845.715, 'start': 4600.074, 'title': 'Printing in java programs', 'summary': 'Illustrates the usage of system.out.println and system.out.print methods in a java program, emphasizing their functionality and differences, while also highlighting the role of the system class and its streams in handling standard input, output, and error streams.', 'duration': 245.641, 'highlights': ['The system class in Java contains several useful class fields and methods, including standard input, standard output, and error output streams.', 'The system.out.println method prints a string and terminates the line, while the system.out.print method does not terminate on a next line, resulting in the printed output being on the same line if multiple print statements are used consecutively.', 'Usage of system.out.println and system.out.print methods is demonstrated in the program, showcasing the difference in output presentation between the two methods.']}], 'duration': 900.991, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ3944724.jpg', 'highlights': ['Classes serve as blueprints for objects in Java, defining the specifications and skeleton of the object, and are essential for creating instances of objects for specific functionalities, such as business logic for e-commerce operations.', 'The system class in Java contains several useful class fields and methods, including standard input, standard output, and error output streams.', 'The chapter emphasizes the process of casting variables and mentions that casting from a larger value to a smaller value requires specific instructions to Java for successful casting.', 'The chapter discusses the creation of packages in Java, highlighting their purpose to group multiple related artifacts together, providing an example related to an e-commerce application.', "The chapter demonstrates the process of creating a package in Eclipse, highlighting the steps to right-click on the src folder, select 'new', and then 'package'.", 'Eclipse IDE offers various options and sensible defaults for creating a class, including automatically selecting the source folder and package, and encourages following naming conventions by suggesting the use of capital letters for the first character and new words in the class file name.', 'The concept of modifiers in Java, particularly the public modifier, is introduced, explaining its accessibility to other Java classes in the project.', 'The importance of the package name, access modifier, class keyword, and main method in a Java class', 'The significance of adhering to naming conventions and syntax for successful program execution', 'The necessity for the main method as the entry point for Java programs', 'The system.out.println method prints a string and terminates the line, while the system.out.print method does not terminate on a next line, resulting in the printed output being on the same line if multiple print statements are used consecutively.', 'Usage of system.out.println and system.out.print methods is demonstrated in the program, showcasing the difference in output presentation between the two methods.']}, {'end': 7818.005, 'segs': [{'end': 4958.897, 'src': 'embed', 'start': 4935.067, 'weight': 3, 'content': [{'end': 4946.01, 'text': 'The array can contain 10 elements, but the index of the array starts with 0 and will always end at length minus 1, which is 10, minus 1 in this case,', 'start': 4935.067, 'duration': 10.943}, {'end': 4947.551, 'text': 'which comes as 9..', 'start': 4946.01, 'duration': 1.541}, {'end': 4949.932, 'text': 'So it will always be length minus 1.', 'start': 4947.551, 'duration': 2.381}, {'end': 4954.434, 'text': 'The index will always start from 0 and go till length minus 1.', 'start': 4949.932, 'duration': 4.502}, {'end': 4955.535, 'text': 'Length can be anything.', 'start': 4954.434, 'duration': 1.101}, {'end': 4958.897, 'text': 'In this case the length is 10, so the index ends at 9.', 'start': 4955.755, 'duration': 3.142}], 'summary': 'Array with 10 elements, index starts at 0, ends at length minus 1 (9).', 'duration': 23.83, 'max_score': 4935.067, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4935067.jpg'}, {'end': 5086.446, 'src': 'embed', 'start': 5049.726, 'weight': 4, 'content': [{'end': 5051.968, 'text': 'it becomes an array data type.', 'start': 5049.726, 'duration': 2.242}, {'end': 5054.109, 'text': 'so this is an integer array representation.', 'start': 5051.968, 'duration': 2.141}, {'end': 5059.052, 'text': "now we just declared an array, but we still haven't allocated a size to it.", 'start': 5054.509, 'duration': 4.543}, {'end': 5063.095, 'text': 'so you can do that with this particular syntax.', 'start': 5059.052, 'duration': 4.043}, {'end': 5069.379, 'text': 'so you can put the variable name of the array and say new int and put the right size here.', 'start': 5063.095, 'duration': 6.284}, {'end': 5077.323, 'text': 'this size can be anything, and once you do this Now, array will actually allocate those memory boxes which we covered here.', 'start': 5069.379, 'duration': 7.944}, {'end': 5086.446, 'text': 'The moment you do new int10, these continuous boxes will be placed in the memory and the memory is allocated to this array.', 'start': 5077.823, 'duration': 8.623}], 'summary': 'Explanation of array allocation in java, using new int and memory allocation.', 'duration': 36.72, 'max_score': 5049.726, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ5049726.jpg'}, {'end': 5479.121, 'src': 'embed', 'start': 5455.585, 'weight': 0, 'content': [{'end': 5462.67, 'text': 'so arithmetic operators are basically used to perform any kind of arithmetic operation on a java program.', 'start': 5455.585, 'duration': 7.085}, {'end': 5469.455, 'text': 'it can be an addition operation, it can be a subtraction operation, it can be a multiplication operation,', 'start': 5462.67, 'duration': 6.785}, {'end': 5474.899, 'text': 'a division operation or an operation by which you can find the remainder of the division.', 'start': 5469.455, 'duration': 5.444}, {'end': 5479.121, 'text': 'so we will look at each of these with an example.', 'start': 5475.339, 'duration': 3.782}], 'summary': 'Arithmetic operators in java perform addition, subtraction, multiplication, division, and remainder operations.', 'duration': 23.536, 'max_score': 5455.585, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ5455585.jpg'}, {'end': 6560.035, 'src': 'embed', 'start': 6534.905, 'weight': 1, 'content': [{'end': 6542.169, 'text': 'So, in Java, if you need to compare anything for example, if you want to compare if something is less than the other thing,', 'start': 6534.905, 'duration': 7.264}, {'end': 6544.691, 'text': 'or something is greater than the other thing,', 'start': 6542.169, 'duration': 2.522}, {'end': 6551.996, 'text': 'or something is equal to the other thing then you need to use the comparison operators which are provided by Java.', 'start': 6544.691, 'duration': 7.305}, {'end': 6560.035, 'text': 'Here you can see I have opened the official Java docs and you can see a bunch of comparison or relational operators.', 'start': 6552.489, 'duration': 7.546}], 'summary': 'In java, use comparison operators to compare values. official java docs show a variety of relational operators.', 'duration': 25.13, 'max_score': 6534.905, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ6534905.jpg'}, {'end': 7590.888, 'src': 'embed', 'start': 7562.307, 'weight': 2, 'content': [{'end': 7568.869, 'text': "But in today's demo, what we are going to cover is the AND and OR examples of bitwise operations.", 'start': 7562.307, 'duration': 6.562}, {'end': 7573.538, 'text': 'Here I have again created a class called bitwise operator.', 'start': 7570.256, 'duration': 3.282}, {'end': 7575.979, 'text': 'I have a public static void main method.', 'start': 7574.158, 'duration': 1.821}, {'end': 7582.163, 'text': 'I have two variables here which are int a equal to five and int b equal to seven.', 'start': 7576.66, 'duration': 5.503}, {'end': 7590.888, 'text': "Now these five and seven are actually stored as bits as zeros and ones in the computer's memory.", 'start': 7582.603, 'duration': 8.285}], 'summary': 'Demo covers and and or examples of bitwise operations with int a=5 and int b=7.', 'duration': 28.581, 'max_score': 7562.307, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ7562307.jpg'}], 'start': 4845.715, 'title': 'Java arrays, operators, and bitwise operations', 'summary': 'Covers the fundamentals of arrays in java, including memory allocation, indexing, and storing/accessing elements, a detailed exploration of arithmetic, assignment, and unary operators, with examples of various operations, and the usage of comparison, logical, and bitwise operators, showcasing their functionality and advantages in java.', 'chapters': [{'end': 5368.876, 'start': 4845.715, 'title': 'Introduction to java arrays', 'summary': 'Covers the fundamentals of arrays in java, including the concept, memory allocation, indexing, and demonstration of storing and accessing elements, with a focus on integer arrays, ending with a note on creating arrays for different data types.', 'duration': 523.161, 'highlights': ['Arrays in Java are containers that can store values, or a sequence of values, in a continuous fashion.', 'The index of the array starts from 0 and ends at length minus 1; for example, an array of length 10 has indexes from 0 to 9.', "Memory allocation for an array is achieved using the syntax 'new int' followed by the desired size, allocating continuous memory locations for storage.", 'Storing and accessing elements in an array is based on indexing, starting from 0, and following the concept of length minus one for the last index.', 'The chapter concludes with a note on creating arrays for different data types, such as character arrays or string arrays, based on the specific data type requirements.']}, {'end': 5907.287, 'start': 5369.176, 'title': 'Java operators deep dive', 'summary': 'Covers a detailed exploration of arithmetic, assignment, and unary operators in java, demonstrating various operations such as addition, subtraction, multiplication, division, and modulus, showcasing the results of each operation in a java program.', 'duration': 538.111, 'highlights': ['The chapter primarily focuses on a detailed exploration of arithmetic, assignment, and unary operators in Java, showcasing various operations such as addition, subtraction, multiplication, division, and modulus, with corresponding demonstrations in a Java program.', 'The demonstration includes showcasing addition, subtraction, multiplication, division, and modulus operations in a Java program, with the results of each operation being printed and displayed.', 'The chapter provides detailed explanations and demonstrations of arithmetic, assignment, and unary operators in Java, covering various operations such as addition, subtraction, multiplication, division, and modulus, along with the corresponding results in a Java program.', 'The Java program demonstrates the addition, subtraction, multiplication, division, and modulus operations, showcasing the results of each operation with corresponding explanations and printed values.']}, {'end': 6858.488, 'start': 5907.287, 'title': 'Arithmetic and unary operators in java', 'summary': 'Demonstrates the usage and functionality of arithmetic and unary operators in java, with examples showcasing the increment, decrement, and negation operations, along with a detailed explanation of pre and post increment operators. it also covers the usage of relational operators for comparison in java, with a detailed walkthrough of the different operators and their application in code, along with a demonstration of their execution and outputs.', 'duration': 951.201, 'highlights': ['The chapter demonstrates the usage and functionality of arithmetic and unary operators in Java', 'Examples showcase the increment, decrement, and negation operations, along with a detailed explanation of pre and post increment operators', 'The chapter also covers the usage of relational operators for comparison in Java, with a detailed walkthrough of the different operators and their application in code']}, {'end': 7319.081, 'start': 6858.889, 'title': 'Comparison and logical operators in java', 'summary': 'Covers the usage of comparison and logical operators in java, including examples of and and or conditions, and the explanation of how they evaluate to true or false. the chapter also briefly introduces bitwise operators and their usage in complex bitwise calculations.', 'duration': 460.192, 'highlights': ['The chapter covers the usage of comparison and logical operators in Java, including examples of AND and OR conditions, and the explanation of how they evaluate to true or false.', 'The chapter briefly introduces bitwise operators and their usage in complex bitwise calculations.']}, {'end': 7818.005, 'start': 7319.081, 'title': 'Bitwise operators and operations', 'summary': 'Discusses bitwise operators and operations, explaining the concepts of and, or, left shift, and right shift, providing examples and their results, and highlighting the advantages of using double ampersand for short-circuit evaluation.', 'duration': 498.924, 'highlights': ['The chapter explains the concepts of bitwise AND and OR operations, providing examples and demonstrating the results, such as the bitwise AND of 5 and 7 resulting in 5 and the bitwise OR resulting in 7.', 'The advantages of using double ampersand for short-circuit evaluation are emphasized, describing how it saves processing power by skipping the evaluation of the right-hand condition if the left-hand condition is false.', 'The concept of left shift and right shift bitwise operations is introduced, explaining how the bits are shifted and providing a brief overview of these operations.']}], 'duration': 2972.29, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ4845715.jpg', 'highlights': ['The chapter primarily focuses on a detailed exploration of arithmetic, assignment, and unary operators in Java, showcasing various operations such as addition, subtraction, multiplication, division, and modulus, with corresponding demonstrations in a Java program.', 'The chapter covers the usage of comparison and logical operators in Java, including examples of AND and OR conditions, and the explanation of how they evaluate to true or false.', 'The chapter explains the concepts of bitwise AND and OR operations, providing examples and demonstrating the results, such as the bitwise AND of 5 and 7 resulting in 5 and the bitwise OR resulting in 7.', 'The index of the array starts from 0 and ends at length minus 1; for example, an array of length 10 has indexes from 0 to 9.', "Memory allocation for an array is achieved using the syntax 'new int' followed by the desired size, allocating continuous memory locations for storage."]}, {'end': 9370.319, 'segs': [{'end': 7866.873, 'src': 'embed', 'start': 7839.181, 'weight': 1, 'content': [{'end': 7842.422, 'text': 'So what are control flow statements and why do we need them?', 'start': 7839.181, 'duration': 3.241}, {'end': 7851.065, 'text': 'Control flow statements are the ones which can help you control and define the flow of execution in your program.', 'start': 7842.722, 'duration': 8.343}, {'end': 7853.026, 'text': 'Now, why do we need them?', 'start': 7851.285, 'duration': 1.741}, {'end': 7862.329, 'text': 'is because if we want to evaluate some conditions or we want to create some branches of execution, saying that if this condition becomes true,', 'start': 7853.026, 'duration': 9.303}, {'end': 7866.873, 'text': 'do this, and if this condition becomes false, do that, so you can see.', 'start': 7862.689, 'duration': 4.184}], 'summary': 'Control flow statements define program execution flow.', 'duration': 27.692, 'max_score': 7839.181, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ7839181.jpg'}, {'end': 7938.955, 'src': 'embed', 'start': 7912.316, 'weight': 4, 'content': [{'end': 7916.538, 'text': 'the result of an if statement will always have only two values.', 'start': 7912.316, 'duration': 4.222}, {'end': 7920.672, 'text': 'It can either have a true value or it can have a false value.', 'start': 7916.978, 'duration': 3.694}, {'end': 7927.213, 'text': 'There is no other possibility or there is no other value of an if statement or of an if expression.', 'start': 7921.012, 'duration': 6.201}, {'end': 7936.095, 'text': 'Now, like I explained, if you want to do a simple programming execution where you say if a particular condition becomes true, do this.', 'start': 7927.693, 'duration': 8.402}, {'end': 7938.955, 'text': 'And if this becomes false, then do that.', 'start': 7936.875, 'duration': 2.08}], 'summary': 'If statements only have two possible values: true or false.', 'duration': 26.639, 'max_score': 7912.316, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ7912316.jpg'}, {'end': 8441.819, 'src': 'embed', 'start': 8417.631, 'weight': 2, 'content': [{'end': 8424.534, 'text': 'But there is another case where we can use these if statements and that is when you have nested if blocks.', 'start': 8417.631, 'duration': 6.903}, {'end': 8427.294, 'text': "When would you use it? Let's take an example.", 'start': 8425.015, 'duration': 2.279}, {'end': 8441.819, 'text': "Let's say you have multiple conditions to check on a particular program and where the output of the first condition is the input of the second condition and the output of the second condition is the input to the third condition,", 'start': 8427.554, 'duration': 14.265}], 'summary': 'Nested if statements useful for multiple conditions in a program.', 'duration': 24.188, 'max_score': 8417.631, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ8417631.jpg'}, {'end': 8853.953, 'src': 'embed', 'start': 8825.32, 'weight': 3, 'content': [{'end': 8827.401, 'text': 'so yes, one is less than two.', 'start': 8825.32, 'duration': 2.081}, {'end': 8833.683, 'text': 'so this particular statement gets executed and this value gets stored here in the result variable.', 'start': 8827.401, 'duration': 6.282}, {'end': 8838.745, 'text': "so that's how you can use the ternary operators to write shorthand.", 'start': 8833.683, 'duration': 5.062}, {'end': 8842.826, 'text': 'if else statements, The same expression can also be written in a verbose way.', 'start': 8838.745, 'duration': 4.081}, {'end': 8853.953, 'text': 'For example, you can write it in this way, saying if A is less than B, then result equal to A, else result equal to B.', 'start': 8843.087, 'duration': 10.866}], 'summary': 'Ternary operator stores value based on condition, rather than using if-else statements.', 'duration': 28.633, 'max_score': 8825.32, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ8825320.jpg'}, {'end': 8941.354, 'src': 'embed', 'start': 8914.356, 'weight': 0, 'content': [{'end': 8923.862, 'text': 'So in such cases, switch statement can be used in which you can write switch statement to have as many possible execution paths as you want.', 'start': 8914.356, 'duration': 9.506}, {'end': 8926.528, 'text': 'and it will work with constant values as well.', 'start': 8924.207, 'duration': 2.321}, {'end': 8933.091, 'text': "So let's understand this with the help of an example as how and why will we use the switch statements.", 'start': 8926.848, 'duration': 6.243}, {'end': 8941.354, 'text': 'So for that I have created this class, which is called switch demo, and it also has a public static void main method, which is the entry point.', 'start': 8933.531, 'duration': 7.823}], 'summary': 'Switch statements allow multiple execution paths with constant values.', 'duration': 26.998, 'max_score': 8914.356, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ8914356.jpg'}], 'start': 7818.005, 'title': 'Java control flow and switch statements', 'summary': 'Covers control flow statements in java such as if, else, and else if statements, nested if statements, and ternary operators. it also discusses the usage of switch case statements, highlighting their effectiveness for handling multiple conditions and constant values.', 'chapters': [{'end': 8219.028, 'start': 7818.005, 'title': 'Java control flow statements', 'summary': 'Covers the concept of control flow statements in java, including if, else, and else if statements, explaining their purpose in defining the flow of program execution. it also provides an example of using if and else statements to assign grades based on test scores.', 'duration': 401.023, 'highlights': ['Control flow statements are essential to define the flow of execution in a program and are used to evaluate conditions and create branches of execution.', 'The if statement is used to evaluate a condition as true or false, and the result always has only two values: true or false.', 'The else if statement allows for the evaluation of multiple conditions in a top-down approach to define different grades based on test scores.']}, {'end': 8673.156, 'start': 8219.528, 'title': 'Nested if statements in java', 'summary': 'Explains the sequence and execution of else if blocks, followed by a detailed explanation of nested if statements and their use cases, with an example demonstrating the nested if conditions and the output. it also introduces ternary operators for simplifying if-else blocks.', 'duration': 453.628, 'highlights': ['The explanation of the sequence and execution of else if blocks, emphasizing writing the conditions in the desired natural program execution sequence.', 'Detailed explanation and demonstration of nested if statements with an example, illustrating the dependency of nested conditions on each other and the execution flow.', 'Introduction to ternary operators as a shorthand for writing if-else blocks, highlighting the simplification of code with examples.']}, {'end': 9076.163, 'start': 8673.156, 'title': 'Ternary operators and switch statements in java', 'summary': 'Explains how to use ternary operators to write shorthand if-else statements and discusses the need for and usage of switch case statements in java, highlighting the power of ternary operators and the effectiveness of switch statements for handling multiple conditions and constant values.', 'duration': 403.007, 'highlights': ['Ternary operators can be used only in cases when you have only one statement to execute in if block and one statement to execute in else block.', 'The same expression can also be written in a verbose if else way in which we have been seeing it before.', 'Switch statements can be used in cases where there are lots of if-else conditions and the expression evaluates to a constant value.']}, {'end': 9370.319, 'start': 9076.543, 'title': 'Java break statement and switch case', 'summary': "Explains the usage of the java 'break' statement within switch case blocks to abruptly break the control of execution from the current code block, and the usage of the 'default' block to handle unmatched conditions, demonstrating with examples and test results.", 'duration': 293.776, 'highlights': ["The 'break' statement in Java is used to abruptly break the control of execution from the current code block, identified with curly braces, and jump out of the current code block execution, as explained using examples and its relevance in optimizing processing time.", "The 'switch' statement in Java is demonstrated with case blocks for each month, and the usage of 'break' within each case to avoid evaluating unnecessary conditions, emphasizing the importance of the 'break' statement in such scenarios.", "The usage of the 'default' block in the switch statement is explained to handle unmatched conditions, with a demonstration of running the program with different input values to showcase the functionality of the default block."]}], 'duration': 1552.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ7818005.jpg', 'highlights': ['Switch statements are effective for handling multiple conditions and constant values', 'Control flow statements define the flow of execution and evaluate conditions', 'Nested if statements illustrate dependency of conditions and execution flow', 'Ternary operators simplify code and are used for one statement conditions', 'If statement evaluates conditions as true or false with only two possible results']}, {'end': 10928.724, 'segs': [{'end': 9395.347, 'src': 'embed', 'start': 9370.319, 'weight': 1, 'content': [{'end': 9380.744, 'text': 'so this is how you are going to use the switch and case statements while writing your conditions whenever your condition evaluates to multiple constant values.', 'start': 9370.319, 'duration': 10.425}, {'end': 9389.126, 'text': 'Remember the key here is to understand if your expression is evaluating to multiple constant values which do not change.', 'start': 9380.904, 'duration': 8.222}, {'end': 9395.347, 'text': 'And in those cases, using a switch case block is a better idea than writing if-else statements.', 'start': 9389.606, 'duration': 5.741}], 'summary': 'Use switch and case statements for multiple constant values in conditions.', 'duration': 25.028, 'max_score': 9370.319, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ9370319.jpg'}, {'end': 10064.359, 'src': 'embed', 'start': 10040.091, 'weight': 0, 'content': [{'end': 10049.318, 'text': "Let's get started with how to create and use a three-dimensional array or how to go about using multi-dimensional arrays in Java.", 'start': 10040.091, 'duration': 9.227}, {'end': 10055.863, 'text': 'So as you can see from this image, we talked about 1D array, which is having just one axis.', 'start': 10049.738, 'duration': 6.125}, {'end': 10058.765, 'text': 'Then we talked about 2D arrays in the last session.', 'start': 10056.443, 'duration': 2.322}, {'end': 10064.359, 'text': 'where we had rows and columns, basically an x-axis and a y-axis.', 'start': 10059.195, 'duration': 5.164}], 'summary': 'Tutorial on creating and using multi-dimensional arrays in java, including 1d and 2d arrays.', 'duration': 24.268, 'max_score': 10040.091, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ10040091.jpg'}, {'end': 10136.655, 'src': 'embed', 'start': 10114.835, 'weight': 2, 'content': [{'end': 10123.483, 'text': 'And there can be many other use cases in the mathematical and research computational use cases where you might want to use a 3D array.', 'start': 10114.835, 'duration': 8.648}, {'end': 10129.909, 'text': "But remember, there's an x-axis, there's a y-axis, and then there's a third axis, which is called the z-axis.", 'start': 10124.204, 'duration': 5.705}, {'end': 10136.655, 'text': 'So let us look at a Java program to understand how we can build a three-dimensional array.', 'start': 10130.549, 'duration': 6.106}], 'summary': '3d arrays are useful in mathematical and research computational use cases.', 'duration': 21.82, 'max_score': 10114.835, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ10114835.jpg'}, {'end': 10486.764, 'src': 'embed', 'start': 10454.43, 'weight': 3, 'content': [{'end': 10460.597, 'text': "let's get started with today's topic, which is about how to use do while loops now.", 'start': 10454.43, 'duration': 6.167}, {'end': 10468.168, 'text': 'in the previous session, We covered the usage of while loops, but we have another type of while loop, which is called a do while loop.', 'start': 10460.597, 'duration': 7.571}, {'end': 10472.872, 'text': "So let's understand when do we need that and how do you actually use that?", 'start': 10468.389, 'duration': 4.483}, {'end': 10477.877, 'text': 'Let me switch to the Java documentation and if I can find some syntax of it as well.', 'start': 10473.373, 'duration': 4.504}, {'end': 10486.764, 'text': 'Yep So as you can see here, if I just highlight this portion, this is how you actually write a do while statement block.', 'start': 10478.197, 'duration': 8.567}], 'summary': 'Introduction to do while loops in java.', 'duration': 32.334, 'max_score': 10454.43, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ10454430.jpg'}], 'start': 9370.319, 'title': 'Java arrays and loops', 'summary': 'Covers switch and case statements, one-dimensional, two-dimensional, and three-dimensional arrays in java, along with their complexities and zero-based indexing. it also discusses 2d array operations for matrix operations, introduces 3d arrays, and explains the usage of do while loops in java with multiple examples.', 'chapters': [{'end': 9836.105, 'start': 9370.319, 'title': 'Switch and case statements, multi-dimensional arrays', 'summary': 'Covers the usage of switch and case statements for multiple constant values, and provides a detailed understanding of one-dimensional, two-dimensional, and three-dimensional arrays in java, emphasizing the potential complexities and the zero-based indexing.', 'duration': 465.786, 'highlights': ['The chapter covers the usage of switch and case statements for multiple constant values', 'Provides a detailed understanding of one-dimensional, two-dimensional, and three-dimensional arrays in Java', 'Emphasizes the potential complexities and the zero-based indexing of arrays']}, {'end': 10020.809, 'start': 9836.686, 'title': '2d array operations in java', 'summary': 'Discusses the use of 2d arrays in java for performing matrix operations, demonstrating the printing of values in a matrix style and accessing specific elements using row and column indexes.', 'duration': 184.123, 'highlights': ['The program showcases the printing of values of a 2D array in a matrix style, demonstrating the representation of rows and columns, with specific examples of accessing individual elements and printing their values.', 'Explanation of the for loop for printing values and accessing specific elements in the 2D array, providing a clear understanding of how to manipulate and work with 2D arrays in Java.', 'Detailed demonstrations of accessing specific elements in the 2D array using row and column indexes, displaying the values at different positions within the array.']}, {'end': 10454.43, 'start': 10021.129, 'title': 'Introduction to 3d arrays in java', 'summary': 'Introduces 3d arrays in java, explaining their structure and usage, along with an example of accessing elements, emphasizing the potential complexity with increasing dimensions.', 'duration': 433.301, 'highlights': ['The chapter introduces 3D arrays in Java', 'An example of how to create and access elements in a 3D array is provided', 'Emphasis on potential complexity with increasing dimensions in arrays']}, {'end': 10928.724, 'start': 10454.43, 'title': 'Understanding do while loops in java', 'summary': 'Covers the usage of do while loops in java, explaining its syntax and usage, and provides a detailed comparison with while loops, running multiple examples to showcase its functionality and when to use it.', 'duration': 474.294, 'highlights': ['The chapter covers the usage of do while loops in Java, explaining its syntax and usage', 'Provides a detailed comparison with while loops, running multiple examples to showcase its functionality and when to use it', 'Running multiple examples to showcase its functionality and when to use it']}], 'duration': 1558.405, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ9370319.jpg', 'highlights': ['Detailed understanding of one-dimensional, two-dimensional, and three-dimensional arrays in Java', 'Usage of switch and case statements for multiple constant values', 'Introduction to 3D arrays in Java', 'Usage of do while loops in Java, with syntax and comparison to while loops']}, {'end': 11891.496, 'segs': [{'end': 10982.52, 'src': 'embed', 'start': 10955.37, 'weight': 1, 'content': [{'end': 10959.694, 'text': 'Now, Java provides multiple constructs to write loops in Java.', 'start': 10955.37, 'duration': 4.324}, {'end': 10961.295, 'text': 'There is a while loop.', 'start': 10959.914, 'duration': 1.381}, {'end': 10962.897, 'text': 'There is a do while loop.', 'start': 10961.596, 'duration': 1.301}, {'end': 10964.258, 'text': 'There is a for loop.', 'start': 10963.177, 'duration': 1.081}, {'end': 10966.3, 'text': 'There is also an enhanced for loop.', 'start': 10964.558, 'duration': 1.742}, {'end': 10971.437, 'text': 'And in the previous versions of Java, a use case of iterator was also very popular.', 'start': 10966.716, 'duration': 4.721}, {'end': 10980.099, 'text': 'So there are multiple ways in which you can actually iterate over a collection and access all the elements of the collection one by one.', 'start': 10971.757, 'duration': 8.342}, {'end': 10982.52, 'text': 'And you can use it to multiple useful cases.', 'start': 10980.279, 'duration': 2.241}], 'summary': 'Java offers multiple loop constructs for iterating over collections, including while, do while, for, enhanced for, and iterators.', 'duration': 27.15, 'max_score': 10955.37, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ10955370.jpg'}, {'end': 11025.838, 'src': 'embed', 'start': 10997.504, 'weight': 3, 'content': [{'end': 11004.866, 'text': 'and the while loop can automatically access all the employees salary one by one and keep adding the bonus to the salary.', 'start': 10997.504, 'duration': 7.362}, {'end': 11009.727, 'text': "this would be an easier way to do this, rather than individually updating each employee's salary,", 'start': 11004.866, 'duration': 4.861}, {'end': 11014.669, 'text': 'and the first loop statement we are going to understand is a while loop.', 'start': 11009.727, 'duration': 4.942}, {'end': 11018.197, 'text': 'so The syntax of while loop is very straightforward.', 'start': 11014.669, 'duration': 3.528}, {'end': 11019.977, 'text': 'You write the while keyword.', 'start': 11018.497, 'duration': 1.48}, {'end': 11025.838, 'text': 'You enter the actual condition which will be evaluating to a Boolean true or false.', 'start': 11020.377, 'duration': 5.461}], 'summary': "While loop adds bonus to employees' salaries, simplifying updates. syntax is simple: while keyword, condition evaluating to true or false.", 'duration': 28.334, 'max_score': 10997.504, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ10997504.jpg'}, {'end': 11064.057, 'src': 'embed', 'start': 11038.9, 'weight': 5, 'content': [{'end': 11045.444, 'text': 'And these statements will keep executing till the time this particular expression evaluates to true.', 'start': 11038.9, 'duration': 6.544}, {'end': 11048.967, 'text': 'So generally the way it works is that it will enter the while block.', 'start': 11045.685, 'duration': 3.282}, {'end': 11050.528, 'text': 'It will evaluate the expression.', 'start': 11049.167, 'duration': 1.361}, {'end': 11056.132, 'text': 'If the expression becomes true, then the statements inside this particular while block will be executed.', 'start': 11050.908, 'duration': 5.224}, {'end': 11061.996, 'text': 'And after the execution of the statement, it will again go back again, evaluate the expression.', 'start': 11056.432, 'duration': 5.564}, {'end': 11064.057, 'text': 'We call them steps basically.', 'start': 11062.196, 'duration': 1.861}], 'summary': 'While loop executes statements until expression is true', 'duration': 25.157, 'max_score': 11038.9, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11038900.jpg'}, {'end': 11566.678, 'src': 'embed', 'start': 11535.986, 'weight': 0, 'content': [{'end': 11538.727, 'text': 'All of that can be done in a single line in the for loop.', 'start': 11535.986, 'duration': 2.741}, {'end': 11544.39, 'text': "And that's why I said it is the most sophisticated and easiest way to write loops in Java.", 'start': 11539.047, 'duration': 5.343}, {'end': 11552.715, 'text': 'So you write all of these three things, the initialization, the condition, and the increment or decrement values in the single line.', 'start': 11544.81, 'duration': 7.905}, {'end': 11561.239, 'text': 'And then you start with the curly braces and you write the code which you want to keep executing till the condition evaluates to false.', 'start': 11553.235, 'duration': 8.004}, {'end': 11563.216, 'text': "That's the basic syntax of it.", 'start': 11561.755, 'duration': 1.461}, {'end': 11566.678, 'text': 'So let us try to understand this with the help of an example.', 'start': 11563.656, 'duration': 3.022}], 'summary': 'Java for loops provide a sophisticated way to write loops, condensing initialization, condition, and increment/decrement in a single line.', 'duration': 30.692, 'max_score': 11535.986, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11535986.jpg'}, {'end': 11744.445, 'src': 'embed', 'start': 11701.936, 'weight': 2, 'content': [{'end': 11709.266, 'text': 'This condition checking, execution and increment will continue till the time this condition holds true.', 'start': 11701.936, 'duration': 7.33}, {'end': 11714.271, 'text': 'The moment this condition becomes false, the control will come out at line number nine.', 'start': 11709.666, 'duration': 4.605}, {'end': 11717.394, 'text': "So that's the basic anatomy and control flow.", 'start': 11714.571, 'duration': 2.823}, {'end': 11720.777, 'text': "It's very important to understand the control flow of a for loop.", 'start': 11717.714, 'duration': 3.063}, {'end': 11729.112, 'text': 'Otherwise, you might end up into a program which is forever running and which will just eat up all the memory available in your JVM.', 'start': 11721.077, 'duration': 8.035}, {'end': 11732.255, 'text': 'So be very sure of what you write in your for loop.', 'start': 11729.533, 'duration': 2.722}, {'end': 11738.18, 'text': 'Be very sure of especially these two parts, the condition and the increment or decrement.', 'start': 11732.535, 'duration': 5.645}, {'end': 11740.121, 'text': 'So this is very important piece.', 'start': 11738.72, 'duration': 1.401}, {'end': 11744.445, 'text': 'The initialization happens only once, and then this condition evaluates.', 'start': 11740.161, 'duration': 4.284}], 'summary': 'Understanding for loop control flow is crucial to prevent memory issues in programs.', 'duration': 42.509, 'max_score': 11701.936, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11701936.jpg'}], 'start': 10928.724, 'title': 'Java loop iterations', 'summary': 'Covers java loop iterations including while loop, do while loop, for loop, enhanced for loop, and iterators. it discusses their importance in simplifying repetitive tasks and provides examples of use cases. the chapter also explains while loops and for loops in detail with examples and emphasizes the importance of avoiding infinite loops by carefully monitoring the termination condition.', 'chapters': [{'end': 11019.977, 'start': 10928.724, 'title': 'Java loops and iteration', 'summary': 'Discusses the various ways to iterate over elements in java, including while loop, do while loop, for loop, enhanced for loop, and iterators, highlighting the importance of loops in simplifying repetitive tasks and providing examples of use cases such as adding bonuses to employee salaries.', 'duration': 91.253, 'highlights': ['The chapter emphasizes the importance of loops in simplifying the process of iterating over elements in Java, mentioning multiple constructs including while loop, do while loop, for loop, enhanced for loop, and iterators, to access all elements of a collection.', "The example of adding bonuses to employee salaries is presented to illustrate the usefulness of loops, highlighting the advantage of using a while loop to automatically access and update each employee's salary, demonstrating the efficiency of loops in handling repetitive tasks."]}, {'end': 11364.16, 'start': 11020.377, 'title': 'While loop basics', 'summary': 'Explains the concept of while loops, demonstrating a basic example and emphasizing the importance of changing the loop condition to avoid infinite loops, ultimately resulting in the loop executing 9 times before the condition becomes false.', 'duration': 343.783, 'highlights': ['The while loop keeps executing till the time the condition evaluates to true.', 'Demonstrates a basic while loop example executing 9 times till the condition becomes false.', 'Emphasizes the importance of changing the loop condition to avoid infinite loops.']}, {'end': 11891.496, 'start': 11364.16, 'title': 'Understanding java for loop', 'summary': 'Covers the syntax and functionality of for loops in java, explaining the initialization, termination, and increment parts of the loop, with an example demonstrating the control flow and output, emphasizing the importance of understanding and carefully monitoring the termination condition to avoid infinite loops.', 'duration': 527.336, 'highlights': ['The chapter covers the syntax and functionality of for loops in Java, explaining the initialization, termination, and increment parts of the loop.', 'An example demonstrates the control flow and output, emphasizing the importance of understanding and carefully monitoring the termination condition to avoid infinite loops.', 'The for loop in Java provides a sophisticated and concise way to write loops by combining the initialization, condition, and increment or decrement values in a single line, compared to using multiple lines in a while loop.', 'It is essential to understand the control flow of a for loop, especially the termination condition and the increment or decrement, to avoid creating programs that result in infinite loops and consume excessive memory.']}], 'duration': 962.772, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ10928724.jpg', 'highlights': ['The for loop in Java provides a sophisticated and concise way to write loops by combining the initialization, condition, and increment or decrement values in a single line, compared to using multiple lines in a while loop.', 'The chapter emphasizes the importance of loops in simplifying the process of iterating over elements in Java, mentioning multiple constructs including while loop, do while loop, for loop, enhanced for loop, and iterators, to access all elements of a collection.', 'An example demonstrates the control flow and output, emphasizing the importance of understanding and carefully monitoring the termination condition to avoid infinite loops.', "The example of adding bonuses to employee salaries is presented to illustrate the usefulness of loops, highlighting the advantage of using a while loop to automatically access and update each employee's salary, demonstrating the efficiency of loops in handling repetitive tasks.", 'It is essential to understand the control flow of a for loop, especially the termination condition and the increment or decrement, to avoid creating programs that result in infinite loops and consume excessive memory.', 'The while loop keeps executing till the time the condition evaluates to true.', 'Emphasizes the importance of changing the loop condition to avoid infinite loops.', 'Demonstrates a basic while loop example executing 9 times till the condition becomes false.']}, {'end': 12805.522, 'segs': [{'end': 11915.866, 'src': 'embed', 'start': 11891.516, 'weight': 0, 'content': [{'end': 11897.682, 'text': "So I'm just going to kill the program, but this is something which you should avoid whenever you are writing Java code,", 'start': 11891.516, 'duration': 6.166}, {'end': 11901.363, 'text': 'and this happens quite often with beginner programmers.', 'start': 11897.682, 'duration': 3.681}, {'end': 11903.423, 'text': 'so this is all I wanted to cover.', 'start': 11901.363, 'duration': 2.06}, {'end': 11907.724, 'text': "in today's session we talked in detail about the for loop,", 'start': 11903.423, 'duration': 4.301}, {'end': 11915.866, 'text': 'and in the next session we are going to talk about another interesting way of writing for loops, which is also called enhanced for loops.', 'start': 11907.724, 'duration': 8.142}], 'summary': "Today's session covered for loops in java, to be avoided by beginner programmers.", 'duration': 24.35, 'max_score': 11891.516, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11891516.jpg'}, {'end': 11954.665, 'src': 'embed', 'start': 11926.576, 'weight': 1, 'content': [{'end': 11935.463, 'text': 'and today we are just going to talk about another way of writing for loops which is a bit even more smarter than the traditional for loops,', 'start': 11926.576, 'duration': 8.887}, {'end': 11937.424, 'text': 'which we call as enhanced for loops.', 'start': 11935.463, 'duration': 1.961}, {'end': 11946.572, 'text': 'We generally use the enhanced for loops for scenarios whenever we have to iterate over a collection of items or an array of items.', 'start': 11937.885, 'duration': 8.687}, {'end': 11954.665, 'text': 'Those are the most popular common use cases of using enhanced for loop, and this for loop is even simpler.', 'start': 11946.952, 'duration': 7.713}], 'summary': 'Enhanced for loops offer a smarter and simpler way to iterate over collections or arrays.', 'duration': 28.089, 'max_score': 11926.576, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11926576.jpg'}, {'end': 12003.061, 'src': 'embed', 'start': 11969.536, 'weight': 2, 'content': [{'end': 11973.439, 'text': 'you specify the collection in the rightmost side of the bracket.', 'start': 11969.536, 'duration': 3.903}, {'end': 11977.203, 'text': 'the collection can be an array, It can be a list, can be a map.', 'start': 11973.439, 'duration': 3.764}, {'end': 11982.527, 'text': 'So whatever different kind of collections which are available in Java, and we are going to cover collections in detail.', 'start': 11977.444, 'duration': 5.083}, {'end': 11987.09, 'text': "So don't worry if you don't understand what are lists and what are maps and what are sets.", 'start': 11982.827, 'duration': 4.263}, {'end': 11991.753, 'text': 'We will go into detail of each of these one by one in the upcoming sessions.', 'start': 11987.55, 'duration': 4.203}, {'end': 12003.061, 'text': 'But the idea is that you put the collection to the rightmost, then you put a colon and then you put a representation of the member of this collection.', 'start': 11992.294, 'duration': 10.767}], 'summary': 'Java covers arrays, lists, and maps in detail, in upcoming sessions.', 'duration': 33.525, 'max_score': 11969.536, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11969536.jpg'}, {'end': 12740.311, 'src': 'embed', 'start': 12718.554, 'weight': 3, 'content': [{'end': 12727.679, 'text': 'So whenever you have a scenario where you have to iterate over a collection based on a certain value of another collection,', 'start': 12718.554, 'duration': 9.125}, {'end': 12729.881, 'text': 'then you can use nested for loops.', 'start': 12727.679, 'duration': 2.202}, {'end': 12734.603, 'text': 'Or you have a scenario where you have to iterate over 2D or 3D arrays.', 'start': 12730.481, 'duration': 4.122}, {'end': 12740.311, 'text': 'For example, if we were dealing with 3D arrays, then you would have seen three nested for loops here.', 'start': 12735.184, 'duration': 5.127}], 'summary': 'Nested for loops are used for iterating over collections based on certain values or 2d/3d arrays.', 'duration': 21.757, 'max_score': 12718.554, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ12718554.jpg'}], 'start': 11891.516, 'title': 'Java for loops and collections', 'summary': 'Covers the drawbacks of killing a program in java, traditional and enhanced for loops, and the usage of collections including arrays, lists, and maps. it also explains nested for loops using a specific example of iterating through a 2d array.', 'chapters': [{'end': 11969.536, 'start': 11891.516, 'title': 'Java for loop session', 'summary': 'Covered the drawbacks of killing a program in java, discussed the basics of traditional for loops, and introduced the concept of enhanced for loops, which are commonly used for iterating over a collection or an array in a simpler way.', 'duration': 78.02, 'highlights': ['The chapter emphasized the importance of avoiding killing a program when writing Java code, a common mistake made by beginner programmers.', 'The session provided a detailed discussion on the basics of traditional for loops and their control flow.', 'The chapter introduced the concept of enhanced for loops, highlighting their usage for iterating over collections or arrays in a simpler and smarter way.']}, {'end': 12377.721, 'start': 11969.536, 'title': 'Java collections and enhanced for loops', 'summary': 'Covers the usage of collections in java, including arrays, lists, and maps. it also explains the concept of the enhanced for loop, highlighting its automatic initialization, condition evaluation, and incrementation based on the size of the collection.', 'duration': 408.185, 'highlights': ['The chapter covers the usage of collections in Java, including arrays, lists, and maps.', 'Explains the concept of the enhanced for loop, highlighting its automatic initialization, condition evaluation, and incrementation based on the size of the collection.', 'Demonstrates the usage of nested for loops with an example of a two-dimensional array and discusses the interpretation of the array in a 2D matrix style.']}, {'end': 12805.522, 'start': 12378.201, 'title': 'Nested for loop example', 'summary': 'Explains the concept of nested for loops by using a specific example of iterating through a 2d array, demonstrating the process of printing the elements in a matrix style and highlighting the application of nested for loops in iterating over collections based on a certain value, with an emphasis on the logic behind the execution of inner loops for every value of the outer loop.', 'duration': 427.321, 'highlights': ['The chapter emphasizes the application of nested for loops in iterating over collections based on a certain value, with an example of iterating through a 2D array, showcasing the logic behind the execution of inner loops for every value of the outer loop.', 'The code example demonstrates the process of printing the elements in a matrix style, depicting the functionality of nested for loops in iterating through a 2D array and producing the desired output.', 'The detailed explanation of the nested for loop example provides a clear understanding of the process of iterating through a 2D array and the logic behind nested for loops, offering a comprehensive insight into the application of nested for loops in various scenarios.']}], 'duration': 914.006, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ11891516.jpg', 'highlights': ['The chapter emphasized the importance of avoiding killing a program when writing Java code, a common mistake made by beginner programmers.', 'The chapter introduced the concept of enhanced for loops, highlighting their usage for iterating over collections or arrays in a simpler and smarter way.', 'The chapter covers the usage of collections in Java, including arrays, lists, and maps.', 'The detailed explanation of the nested for loop example provides a clear understanding of the process of iterating through a 2D array and the logic behind nested for loops, offering a comprehensive insight into the application of nested for loops in various scenarios.', 'The chapter emphasizes the application of nested for loops in iterating over collections based on a certain value, with an example of iterating through a 2D array, showcasing the logic behind the execution of inner loops for every value of the outer loop.']}, {'end': 13940.114, 'segs': [{'end': 12873.294, 'src': 'embed', 'start': 12830.029, 'weight': 0, 'content': [{'end': 12834.092, 'text': 'You can do this for any n-dimensional kind of array or a collection.', 'start': 12830.029, 'duration': 4.063}, {'end': 12837.514, 'text': "So this is all I wanted to cover in today's session.", 'start': 12834.652, 'duration': 2.862}, {'end': 12843.414, 'text': 'where we discussed about the nested for loops concept and how and where we will use it,', 'start': 12837.97, 'duration': 5.444}, {'end': 12848.298, 'text': 'and in the next session we will be discussing about the java collections framework.', 'start': 12843.414, 'duration': 4.884}, {'end': 12853.842, 'text': "let's get started with collections in java or the collections framework in java.", 'start': 12848.298, 'duration': 5.544}, {'end': 12860.087, 'text': 'i must say that this is probably the most important concept of the java programming language,', 'start': 12853.842, 'duration': 6.245}, {'end': 12865.051, 'text': 'which you will be using heavily whenever you are working in any production grade application.', 'start': 12860.087, 'duration': 4.964}, {'end': 12873.294, 'text': "So let's understand the collections framework and the different classes and the utilities available inside the collections framework.", 'start': 12865.407, 'duration': 7.887}], 'summary': 'Covered n-dimensional arrays, nested for loops, and importance of java collections framework.', 'duration': 43.265, 'max_score': 12830.029, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ12830029.jpg'}, {'end': 12916.273, 'src': 'embed', 'start': 12892.461, 'weight': 3, 'content': [{'end': 12898.984, 'text': 'in the upcoming sessions we will go into the hands-on exercise of some of the most popular collections.', 'start': 12892.461, 'duration': 6.523}, {'end': 12905.047, 'text': 'we will not be able to provide hands-on of all the collections, classes which you which you can see on the screen,', 'start': 12898.984, 'duration': 6.063}, {'end': 12909.73, 'text': 'because then it is going to take a very, very long time to complete this concept.', 'start': 12905.047, 'duration': 4.683}, {'end': 12916.273, 'text': 'but we will cover the most popular ones or the most used ones out of this particular framework.', 'start': 12909.73, 'duration': 6.543}], 'summary': 'Upcoming sessions will focus on hands-on exercises of popular collections to cover the most used ones in the framework.', 'duration': 23.812, 'max_score': 12892.461, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ12892461.jpg'}, {'end': 13184.561, 'src': 'embed', 'start': 13160.103, 'weight': 6, 'content': [{'end': 13167.548, 'text': 'When we talk about the set interface, these three different types of interfaces represent three different properties of collection.', 'start': 13160.103, 'duration': 7.445}, {'end': 13170.096, 'text': 'And these properties are exclusive of each other.', 'start': 13168.095, 'duration': 2.001}, {'end': 13172.016, 'text': 'For example, if we talk about set.', 'start': 13170.376, 'duration': 1.64}, {'end': 13177.799, 'text': 'So set has a property that everything which you put into set will be unique.', 'start': 13172.397, 'duration': 5.402}, {'end': 13182.62, 'text': 'It will never ever tolerate or contain any duplicate elements.', 'start': 13178.159, 'duration': 4.461}, {'end': 13184.561, 'text': "That's the property of set.", 'start': 13183.14, 'duration': 1.421}], 'summary': 'Set interface ensures unique elements, no duplicates allowed.', 'duration': 24.458, 'max_score': 13160.103, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13160103.jpg'}, {'end': 13284.882, 'src': 'embed', 'start': 13253.973, 'weight': 7, 'content': [{'end': 13259.176, 'text': "So it's basically, we can call it as an indexed ordered collection, which can hold duplicates.", 'start': 13253.973, 'duration': 5.203}, {'end': 13261.537, 'text': 'Then the third one is Q here.', 'start': 13259.756, 'duration': 1.781}, {'end': 13264.151, 'text': 'So Q is basically as you can.', 'start': 13262.27, 'duration': 1.881}, {'end': 13266.312, 'text': 'This is basically inspired from real world.', 'start': 13264.431, 'duration': 1.881}, {'end': 13268.213, 'text': 'So think of any queue.', 'start': 13266.612, 'duration': 1.601}, {'end': 13274.937, 'text': 'If you, if you go to buy something at a grocery store or if you go to buy a ticket at a railway station,', 'start': 13268.573, 'duration': 6.364}, {'end': 13277.738, 'text': 'or you go to the check in counter at the airports.', 'start': 13274.937, 'duration': 2.801}, {'end': 13284.882, 'text': 'So you stand in a queue and the concept of queue is that it works on a concept of first in first out.', 'start': 13278.139, 'duration': 6.743}], 'summary': 'Indexed ordered collection holding duplicates, inspired by real-world queues, operates on first in first out principle.', 'duration': 30.909, 'max_score': 13253.973, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13253973.jpg'}, {'end': 13391.947, 'src': 'embed', 'start': 13366.803, 'weight': 1, 'content': [{'end': 13373.806, 'text': 'so there are the different properties of these interfaces but, like i said, the most popular ones are these three ones.', 'start': 13366.803, 'duration': 7.003}, {'end': 13376.943, 'text': "now let's talk about the abstract classes.", 'start': 13373.806, 'duration': 3.137}, {'end': 13384.765, 'text': 'so the abstract classes you see here are abstract collection, abstract set, abstract list, abstract queue, abstract sequential list.', 'start': 13376.943, 'duration': 7.822}, {'end': 13387.306, 'text': 'generally, you will not be using these directly.', 'start': 13384.765, 'duration': 2.541}, {'end': 13391.947, 'text': "you don't need to use them directly, but you should be aware that they exist.", 'start': 13387.306, 'duration': 4.641}], 'summary': 'Popular interfaces include abstract collection, abstract set, and abstract list. they are not used directly but are important to be aware of.', 'duration': 25.144, 'max_score': 13366.803, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13366803.jpg'}, {'end': 13687.245, 'src': 'embed', 'start': 13638.403, 'weight': 4, 'content': [{'end': 13644.085, 'text': 'So it will keep updating its size based on the number of elements which are coming to the collection.', 'start': 13638.403, 'duration': 5.682}, {'end': 13646.327, 'text': "That's the whole property of ArrayList.", 'start': 13644.446, 'duration': 1.881}, {'end': 13647.367, 'text': 'So remember,', 'start': 13646.747, 'duration': 0.62}, {'end': 13658.073, 'text': "it's used in the cases when you have an ordered collection to store and you want to access them based on the index and you want a dynamic update of the size.", 'start': 13647.367, 'duration': 10.706}, {'end': 13662.835, 'text': 'The second sibling of it, which is linked list, is also a type of list.', 'start': 13658.693, 'duration': 4.142}, {'end': 13666.856, 'text': 'but it has slightly different properties than ArrayList.', 'start': 13663.254, 'duration': 3.602}, {'end': 13671.117, 'text': 'In case of ArrayList, it was an index based collection.', 'start': 13667.396, 'duration': 3.721}, {'end': 13679.581, 'text': 'You access the element based on the indexes, but in LinkList, you access the elements based on the previous and the next element.', 'start': 13671.518, 'duration': 8.063}, {'end': 13681.282, 'text': "That's pretty much what it knows.", 'start': 13680.041, 'duration': 1.241}, {'end': 13687.245, 'text': 'So an item can only be accessed in a particular sequence, starting from head to the tail.', 'start': 13681.342, 'duration': 5.903}], 'summary': 'Arraylist and linkedlist are types of lists, with arraylist being index-based and dynamically resizable, while linkedlist accesses elements based on previous and next elements.', 'duration': 48.842, 'max_score': 13638.403, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13638403.jpg'}, {'end': 13821.942, 'src': 'embed', 'start': 13795.305, 'weight': 8, 'content': [{'end': 13800.607, 'text': 'Every time the way in which the elements are accessed, their order will be different.', 'start': 13795.305, 'duration': 5.302}, {'end': 13802.148, 'text': 'You cannot predict that.', 'start': 13801.228, 'duration': 0.92}, {'end': 13804.469, 'text': "And that's the property of HashSet.", 'start': 13802.488, 'duration': 1.981}, {'end': 13811.732, 'text': 'Whereas when we talk about TreeSet, in case of TreeSet, you can have a sort of fixed order and a tree hierarchy.', 'start': 13804.789, 'duration': 6.943}, {'end': 13813.032, 'text': 'So a tree hierarchy.', 'start': 13812.072, 'duration': 0.96}, {'end': 13819.42, 'text': 'if you know about the tree data structure from the data structure and algorithm section, you already would know what a tree looks like.', 'start': 13813.032, 'duration': 6.388}, {'end': 13821.942, 'text': 'basically it has a root and it has child.', 'start': 13819.42, 'duration': 2.522}], 'summary': 'Hashset has unpredictable order, treeset has fixed order and tree hierarchy.', 'duration': 26.637, 'max_score': 13795.305, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13795305.jpg'}, {'end': 13897.471, 'src': 'embed', 'start': 13872.741, 'weight': 9, 'content': [{'end': 13886.587, 'text': 'where you want to maintain a FIFO fashion collection but at the same time you also want to allow few elements of it to override this FIFO arrangement and get processed ahead of their queue number.', 'start': 13872.741, 'duration': 13.846}, {'end': 13889.508, 'text': 'So you can use priority queue in those cases.', 'start': 13886.947, 'duration': 2.561}, {'end': 13892.829, 'text': "Talking about stack, let's understand stack first.", 'start': 13890.128, 'duration': 2.701}, {'end': 13897.471, 'text': 'And stack is a LIFO arrangement, last in, first out.', 'start': 13893.249, 'duration': 4.222}], 'summary': 'Maintain fifo collection but allow elements to override. use priority queue. stack is lifo arrangement.', 'duration': 24.73, 'max_score': 13872.741, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13872741.jpg'}], 'start': 12805.522, 'title': 'Java collections and nested for loops', 'summary': 'Covers nested for loops for iterating through n-dimensional arrays, the java collections framework used in production-grade applications, and introduces interfaces, abstract classes, and java collection interfaces including set, list, and queue, emphasizing their properties and use cases. it also covers the relationships of interfaces, abstract classes, and concrete classes such as arraylist, linkedlist, hashset, treeset, priorityqueue, and stack in java.', 'chapters': [{'end': 12916.273, 'start': 12805.522, 'title': 'Nested for loops and java collections', 'summary': 'Covers the concept of nested for loops for iterating through n-dimensional arrays and the importance of the java collections framework, which is heavily used in production-grade applications. it also outlines the plan for future sessions to cover hands-on exercises for popular collections classes.', 'duration': 110.751, 'highlights': ['The importance of the Java Collections framework is emphasized as a crucial concept in the Java programming language, heavily used in production-grade applications.', 'The chapter explains the concept of nested for loops for iterating through n-dimensional arrays, providing a foundational understanding of the iterative process.', 'Future sessions will focus on hands-on exercises for popular collections classes, ensuring practical application of the theoretical concepts discussed.']}, {'end': 13366.803, 'start': 12916.273, 'title': 'Java collections overview', 'summary': 'Introduces the concepts of interfaces, abstract classes, and java collection interfaces including set, list, and queue, emphasizing their properties and use cases.', 'duration': 450.53, 'highlights': ['The chapter introduces the concepts of interfaces, abstract classes, and Java collection interfaces including Set, List, and Queue, emphasizing their properties and use cases.', 'The set interface has a property that everything which you put into set will be unique, never tolerating or containing any duplicate elements. List is an index-based collection, allowing duplicates and maintaining a fixed order, while Queue follows the concept of first in first out, suitable for modeling real-world scenarios like queues at a store or tickets at a railway station.', 'Sorted set enforces unique elements with an additional constraint of being sorted, while Navigable set introduces navigation properties, and DQ represents a double-ended queue allowing insertion and removal from both the front and back.']}, {'end': 13940.114, 'start': 13366.803, 'title': 'Collection interfaces and abstract classes', 'summary': 'Covers the interfaces and abstract classes in the collection framework, including the properties and relationships of interfaces, abstract classes, and concrete classes such as arraylist, linkedlist, hashset, treeset, priorityqueue, and stack in java.', 'duration': 573.311, 'highlights': ['ArrayList is a dynamic array that can dynamically update its size based on the number of elements stored, distinguishing it from static arrays.', 'LinkedList is an element access-based on previous and next elements, not indexes, unlike ArrayList, making it suitable for sequential element access.', 'HashSet does not preserve the insertion order of elements and provides a different order of access on iteration, distinguishing it from TreeSet, which maintains a fixed order and tree hierarchy for elements.', 'PriorityQueue allows FIFO arrangement with the capability for certain elements to be executed on priority, overriding the FIFO order.', 'Stack follows the Last-In-First-Out (LIFO) arrangement, enabling the element put last to be consumed first, similar to stacking plates.']}], 'duration': 1134.592, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ12805522.jpg', 'highlights': ['The importance of the Java Collections framework is emphasized as a crucial concept in the Java programming language, heavily used in production-grade applications.', 'The chapter introduces the concepts of interfaces, abstract classes, and Java collection interfaces including Set, List, and Queue, emphasizing their properties and use cases.', 'The chapter explains the concept of nested for loops for iterating through n-dimensional arrays, providing a foundational understanding of the iterative process.', 'Future sessions will focus on hands-on exercises for popular collections classes, ensuring practical application of the theoretical concepts discussed.', 'ArrayList is a dynamic array that can dynamically update its size based on the number of elements stored, distinguishing it from static arrays.', 'LinkedList is an element access-based on previous and next elements, not indexes, unlike ArrayList, making it suitable for sequential element access.', 'The set interface has a property that everything which you put into set will be unique, never tolerating or containing any duplicate elements.', 'List is an index-based collection, allowing duplicates and maintaining a fixed order, while Queue follows the concept of first in first out, suitable for modeling real-world scenarios like queues at a store or tickets at a railway station.', 'HashSet does not preserve the insertion order of elements and provides a different order of access on iteration, distinguishing it from TreeSet, which maintains a fixed order and tree hierarchy for elements.', 'PriorityQueue allows FIFO arrangement with the capability for certain elements to be executed on priority, overriding the FIFO order.']}, {'end': 15429.946, 'segs': [{'end': 13990.925, 'src': 'embed', 'start': 13966.104, 'weight': 0, 'content': [{'end': 13974.208, 'text': 'But for now you can understand that whenever you have a program in which you want to access a collection in a thread safe manner,', 'start': 13966.104, 'duration': 8.104}, {'end': 13980.501, 'text': 'where two threads cannot modify the same element at the same time, then you will use vectors.', 'start': 13974.208, 'duration': 6.293}, {'end': 13985.763, 'text': 'so we covered about the complete collections, framework classes, the interfaces and the abstract classes,', 'start': 13980.501, 'duration': 5.262}, {'end': 13990.925, 'text': 'and always remember the uh the reason why you will use array list or linked list,', 'start': 13985.763, 'duration': 5.162}], 'summary': 'Use vectors for thread-safe collection access and consider array list or linked list based on requirements.', 'duration': 24.821, 'max_score': 13966.104, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13966104.jpg'}, {'end': 14063.136, 'src': 'embed', 'start': 14029.756, 'weight': 2, 'content': [{'end': 14033.718, 'text': 'And it broadly covers all the points which I described in the previous session,', 'start': 14029.756, 'duration': 3.962}, {'end': 14040.068, 'text': 'which were that an ArrayList is basically an array-based implementation of a list.', 'start': 14033.718, 'duration': 6.35}, {'end': 14046.43, 'text': "It's an indexed-based implementation, so you can access the elements based on their index position.", 'start': 14040.568, 'duration': 5.862}, {'end': 14049.851, 'text': 'You can directly access any element if you know its index.', 'start': 14046.77, 'duration': 3.081}, {'end': 14052.712, 'text': 'It accepts any kind of duplicates as well.', 'start': 14050.372, 'duration': 2.34}, {'end': 14055.273, 'text': 'And by default, it is not thread safe.', 'start': 14053.193, 'duration': 2.08}, {'end': 14063.136, 'text': 'If two threads are trying to access the same collection at the same time, or maybe trying to modify the collection,', 'start': 14055.673, 'duration': 7.463}], 'summary': 'Arraylist is an array-based list, allowing indexed access and duplicates, but not thread safe.', 'duration': 33.38, 'max_score': 14029.756, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ14029756.jpg'}, {'end': 14134.065, 'src': 'embed', 'start': 14113.505, 'weight': 1, 'content': [{'end': 14125.074, 'text': 'But the reason I have written list here is because it is a better practice or I would say it is a best practice to always initialize the concrete implementations with the interface type.', 'start': 14113.505, 'duration': 11.569}, {'end': 14127.002, 'text': "I'm making a very generic statement,", 'start': 14125.481, 'duration': 1.521}, {'end': 14134.065, 'text': 'which is applicable to collections and at any other type of classes and objects you might be creating in your program.', 'start': 14127.002, 'duration': 7.063}], 'summary': 'Best practice: initialize concrete implementations with interface type for collections and other classes.', 'duration': 20.56, 'max_score': 14113.505, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ14113505.jpg'}, {'end': 14345.755, 'src': 'embed', 'start': 14318.512, 'weight': 3, 'content': [{'end': 14324.957, 'text': "Let's say, if this ArrayList is going to store only two elements and the default size is definitely way way bigger than two elements,", 'start': 14318.512, 'duration': 6.445}, {'end': 14326.558, 'text': "then you're going to waste a lot of memories.", 'start': 14324.957, 'duration': 1.601}, {'end': 14333.388, 'text': "So that's why it is a best practice to specify, explicitly specify some sort of an initial size.", 'start': 14327.045, 'duration': 6.343}, {'end': 14339.392, 'text': 'This is also acceptable because it is automatically inferring the type from the declaration.', 'start': 14333.989, 'duration': 5.403}, {'end': 14341.373, 'text': "You don't need to specify it again here.", 'start': 14339.612, 'duration': 1.761}, {'end': 14345.755, 'text': 'In fact, some of these modern IDEs will also show you a warning if you write it here.', 'start': 14341.793, 'duration': 3.962}], 'summary': 'Specifying initial size for arraylist prevents memory wastage and is a best practice.', 'duration': 27.243, 'max_score': 14318.512, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ14318512.jpg'}, {'end': 14628.4, 'src': 'embed', 'start': 14598.154, 'weight': 4, 'content': [{'end': 14600.655, 'text': 'We can also write the same loop using for enhanced loop.', 'start': 14598.154, 'duration': 2.501}, {'end': 14612.001, 'text': "So let's say if I write for int i colon array list, and then inside it, I can just say system.out.println i.", 'start': 14601.076, 'duration': 10.925}, {'end': 14623.596, 'text': "and if I comment this particular loop for for a moment and run this program, I see the values one by one, because it's Ellen.", 'start': 14616.129, 'duration': 7.467}, {'end': 14628.4, 'text': 'so every output comes on on a new line, but you can pretty much see the same output.', 'start': 14623.596, 'duration': 4.804}], 'summary': 'Using an enhanced for loop to print values from an array list, resulting in each value being output on a new line.', 'duration': 30.246, 'max_score': 14598.154, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ14598154.jpg'}, {'end': 14713.672, 'src': 'embed', 'start': 14693.804, 'weight': 5, 'content': [{'end': 14703.988, 'text': 'So basic idea is that whenever you want to have a kind of implementation where the order of the elements is strictly maintained,', 'start': 14693.804, 'duration': 10.184}, {'end': 14709.83, 'text': 'where the first element can refer to the second element, the second element can refer to the third element, and so on.', 'start': 14703.988, 'duration': 5.842}, {'end': 14713.672, 'text': 'In those kind of cases, you are going to use linked list.', 'start': 14710.33, 'duration': 3.342}], 'summary': 'Linked list maintains strict element order for references.', 'duration': 19.868, 'max_score': 14693.804, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ14693804.jpg'}, {'end': 14796.259, 'src': 'embed', 'start': 14755.994, 'weight': 6, 'content': [{'end': 14763.96, 'text': 'So if multiple threads are trying to access a linked list concurrently at least one of the threads and one of the threads tries to modify the list,', 'start': 14755.994, 'duration': 7.966}, {'end': 14766.702, 'text': 'then it must be synchronized externally by some other ways.', 'start': 14763.96, 'duration': 2.742}, {'end': 14768.703, 'text': 'Otherwise you will get unpredictable results.', 'start': 14766.782, 'duration': 1.921}, {'end': 14773.947, 'text': 'And again, this also provides a bunch of utility methods and we will cover some of those methods.', 'start': 14769.604, 'duration': 4.343}, {'end': 14780.912, 'text': 'As you can see, add method for adding an element, add all, add first, contains, get first, get last,', 'start': 14774.067, 'duration': 6.845}, {'end': 14787.814, 'text': 'will cover some of these methods in the demonstration which follows this particular documentation.', 'start': 14781.391, 'duration': 6.423}, {'end': 14790.536, 'text': "and with that let's jump to the implementation.", 'start': 14787.814, 'duration': 2.722}, {'end': 14796.259, 'text': 'so i have prepared an example here for the linked list, which is called linked list demo.', 'start': 14790.536, 'duration': 5.723}], 'summary': 'Concurrency in accessing linked list needs synchronization to avoid unpredictable results. utility methods like add, contains, get can be demonstrated.', 'duration': 40.265, 'max_score': 14755.994, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ14755994.jpg'}, {'end': 15311.685, 'src': 'embed', 'start': 15281.968, 'weight': 9, 'content': [{'end': 15285.469, 'text': 'we are going to learn about sets in Java in the next session.', 'start': 15281.968, 'duration': 3.501}, {'end': 15288.75, 'text': "let's get started with hash set in Java.", 'start': 15285.469, 'duration': 3.281}, {'end': 15289.35, 'text': 'if you remember,', 'start': 15288.75, 'duration': 0.6}, {'end': 15301.883, 'text': 'I covered in the collections framework session that hash set is part of the set interface hierarchy and sets have a property that they keep the collections element unique.', 'start': 15289.35, 'duration': 12.533}, {'end': 15311.685, 'text': 'if you try to add duplicate elements to the a set, it will not accept that and it will still maintain the uniqueness property of the collection.', 'start': 15301.883, 'duration': 9.802}], 'summary': 'Learn about sets in java, specifically hash set, keeping elements unique.', 'duration': 29.717, 'max_score': 15281.968, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ15281968.jpg'}], 'start': 13940.414, 'title': 'Java data structures', 'summary': 'Covers arraylist and vectors in java, emphasizing differences and thread safety of vectors. it also explains the basics and operations of arraylist, highlighting the importance of specifying initial size. additionally, it discusses linked lists in java, focusing on properties, methods, and the need for external synchronization. furthermore, the chapter delves into understanding java linked lists, hash sets, and their manipulation methods.', 'chapters': [{'end': 14181.768, 'start': 13940.414, 'title': 'Arraylist and vectors in java', 'summary': 'Covers the differences between arraylist and vectors, emphasizing the thread safety of vectors, and the importance of initializing concrete implementations with the interface type to enable easy interchangeability between implementations.', 'duration': 241.354, 'highlights': ['Vectors are thread safe while lists are not thread safe, making them suitable for thread safe collection access.', 'Importance of initializing concrete implementations with the interface type for easy interchangeability between implementations.', 'ArrayList is an array-based implementation of a list, allowing direct access to elements based on their index position and accepting duplicates.']}, {'end': 14655.351, 'start': 14182.304, 'title': 'Arraylist in java: basics and operations', 'summary': 'Explains the basics of arraylist in java, including its declaration, initialization, adding and removing elements, and fetching elements using methods like add, remove, get, and size. it also emphasizes the importance of specifying the initial size to optimize memory usage.', 'duration': 473.047, 'highlights': ['The chapter explains the basics of ArrayList in Java, including its declaration, initialization, adding and removing elements, and fetching elements using methods like add, remove, get, and size.', 'It emphasizes the importance of specifying the initial size to optimize memory usage.', 'The chapter also demonstrates the usage of both classic for loop and enhanced for loop for iterating over the ArrayList.']}, {'end': 14954.985, 'start': 14655.351, 'title': 'Introduction to linked lists in java', 'summary': 'Discusses the properties and methods of linked lists in java, highlighting its reference-based implementation, lack of random access, and the need for external synchronization in concurrent access, while also demonstrating the use of specific methods such as add, add first, and add last.', 'duration': 299.634, 'highlights': ['The linked list in Java maintains the order of elements and uses reference-based implementation, allowing elements to refer to each other, unlike ArrayList, which supports random access through ArrayList.get method.', 'The only way to access a specific element in a linked list is by traversing from the head, as it does not support direct random access like ArrayList, demonstrating a difference in accessing elements between the two implementations.', 'The need for external synchronization in a linked list is highlighted, indicating that if multiple threads are trying to access and modify the list concurrently, it must be synchronized externally to avoid unpredictable results.', 'The demonstration of specific utility methods in linked lists, such as add, add first, and add last, is mentioned, emphasizing the practical implementation of these methods in the subsequent documentation and code demonstration.']}, {'end': 15429.946, 'start': 14955.575, 'title': 'Understanding java linked lists & hash sets', 'summary': 'Explains the usage of different methods for modifying and manipulating linked lists in java, providing examples of adding, removing, and accessing elements, and then proceeds to introduce the concept of hash sets in java, outlining their unique features and usage.', 'duration': 474.371, 'highlights': ['The speaker demonstrates the usage of different methods for adding, removing, and accessing elements in a Java linked list, providing a step-by-step explanation and output for each operation, such as adding elements, adding elements at specific positions, and removing elements based on both value and index position.', 'The chapter also covers the introduction of hash sets in Java, highlighting their unique features of maintaining unique elements, accessing elements in a random fashion, and providing utility methods for adding, removing, and checking elements, with a demonstration on creating and operating upon a hash set in Java.']}], 'duration': 1489.532, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ13940414.jpg', 'highlights': ['Vectors are thread safe for collection access', 'Importance of initializing concrete implementations', 'ArrayList allows direct access to elements', 'Importance of specifying initial size for ArrayList', 'Usage of classic and enhanced for loop for ArrayList', 'LinkedList maintains order and uses reference-based implementation', 'Need for external synchronization in LinkedList', 'Demonstration of utility methods in LinkedList', 'Demonstration of adding, removing, and accessing elements in LinkedList', 'Introduction of hash sets in Java with unique features']}, {'end': 17693.446, 'segs': [{'end': 15554.122, 'src': 'embed', 'start': 15525.779, 'weight': 0, 'content': [{'end': 15530.843, 'text': "To understand that, we need to understand how HashSet's add method works.", 'start': 15525.779, 'duration': 5.064}, {'end': 15535.707, 'text': 'So this add method is basically returning a Boolean value.', 'start': 15531.544, 'duration': 4.163}, {'end': 15539.931, 'text': 'If the element is added successfully, this add is going to return true.', 'start': 15536.268, 'duration': 3.663}, {'end': 15546.196, 'text': 'And if the element could not be added successfully, this add method is going to return false.', 'start': 15540.431, 'duration': 5.765}, {'end': 15547.557, 'text': "So let's do that.", 'start': 15546.776, 'duration': 0.781}, {'end': 15550.399, 'text': "Let's store the result of these add methods.", 'start': 15547.617, 'duration': 2.782}, {'end': 15554.122, 'text': "Let's call this R1 and let's call this one as R2.", 'start': 15550.98, 'duration': 3.142}], 'summary': "Explanation of hashset's add method returning true or false based on successful addition.", 'duration': 28.343, 'max_score': 15525.779, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ15525779.jpg'}, {'end': 15644.576, 'src': 'embed', 'start': 15613.286, 'weight': 1, 'content': [{'end': 15617.689, 'text': 'original c was maintained and when you try to add a duplicate value with the same value,', 'start': 15613.286, 'duration': 4.403}, {'end': 15622.593, 'text': 'a duplicate element with the same value hashtag is going to reject that.', 'start': 15617.689, 'duration': 4.904}, {'end': 15631.799, 'text': 'so that actually proves that the set will maintain the uh the uniqueness property and it will reject all the duplicates subsequently.', 'start': 15622.593, 'duration': 9.206}, {'end': 15633.901, 'text': 'that was about the add uh property.', 'start': 15631.799, 'duration': 2.102}, {'end': 15638.084, 'text': "now let's understand another interesting property of the contains method.", 'start': 15633.901, 'duration': 4.183}, {'end': 15644.576, 'text': 'contains method of the set class is used to find if an element exists in the set or not.', 'start': 15638.084, 'duration': 6.492}], 'summary': 'Set class maintains uniqueness, rejects duplicates. contains method checks element existence.', 'duration': 31.29, 'max_score': 15613.286, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ15613286.jpg'}, {'end': 16273.812, 'src': 'embed', 'start': 16244.693, 'weight': 4, 'content': [{'end': 16254.598, 'text': 'So you need a key and value arrangement in a Java program to store that kind of information and use that kind of information in your program.', 'start': 16244.693, 'duration': 9.905}, {'end': 16257.52, 'text': "And that's where map comes into picture.", 'start': 16255.178, 'duration': 2.342}, {'end': 16264.665, 'text': 'Whenever you have to store a key value arrangement, remember you would always think about maps.', 'start': 16258.14, 'duration': 6.525}, {'end': 16273.812, 'text': 'Maps should be the right collection or the right data structure to be used if you want to store any key value arrangement in your program.', 'start': 16264.946, 'duration': 8.866}], 'summary': 'Use maps in java for key-value arrangements in programs.', 'duration': 29.119, 'max_score': 16244.693, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ16244693.jpg'}, {'end': 17283.848, 'src': 'embed', 'start': 17258.854, 'weight': 2, 'content': [{'end': 17267.919, 'text': 'We went deeper into the HashMap representation and we saw a bunch of methods, containsKey, KeySet, EntrySet, Get, Put, etc.', 'start': 17258.854, 'duration': 9.065}, {'end': 17273.302, 'text': 'And we showed how we can use the HashMap for different purposes in the program.', 'start': 17268.259, 'duration': 5.043}, {'end': 17281.126, 'text': "In the next session, we'll go deeper into the TreeMap concept and we'll also look at a demo of TreeMap and we'll understand how it works.", 'start': 17273.722, 'duration': 7.404}, {'end': 17283.848, 'text': "Let's get started with TreeMaps in Java.", 'start': 17281.407, 'duration': 2.441}], 'summary': 'Explored hashmap methods, discussed treemap concept, and upcoming session on treemaps in java.', 'duration': 24.994, 'max_score': 17258.854, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ17258854.jpg'}, {'end': 17354.08, 'src': 'embed', 'start': 17330.659, 'weight': 3, 'content': [{'end': 17339.441, 'text': "then the tree map will automatically sort all the map entries in an integer sorted fashion, where you'll see the natural number,", 'start': 17330.659, 'duration': 8.782}, {'end': 17342.453, 'text': 'sorting behavior like 123 and so on.', 'start': 17339.441, 'duration': 3.012}, {'end': 17354.08, 'text': 'Similarly, if you store alphabets or strings, then those will be sorted in a natural sorting alphabetical order starting from A to Z.', 'start': 17342.953, 'duration': 11.127}], 'summary': 'Tree map automatically sorts map entries in natural order.', 'duration': 23.421, 'max_score': 17330.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ17330659.jpg'}], 'start': 15429.946, 'title': 'Java map and set methods', 'summary': "Delves into hashset's add method for rejecting duplicate elements, introduces hashset and treeset functionalities in java, explains treemap and hashmap usage, and explores utility methods in java map.", 'chapters': [{'end': 15633.901, 'start': 15429.946, 'title': "Understanding hashset's add method", 'summary': "Explores the behavior of hashset's add method, demonstrating how duplicate elements are rejected and the unique property of sets is maintained, with a rejection of duplicate elements subsequently.", 'duration': 203.955, 'highlights': ["The add method of HashSet returns a Boolean value, with 'true' indicating a successful addition and 'false' indicating rejection of the addition.", 'The demonstration shows that when adding duplicate elements to a HashSet, the set maintains its uniqueness property by rejecting subsequent duplicate elements.', "The chapter also confirms that the original 'C' element was not overwritten, as the rejected duplicate addition did not overwrite the existing element."]}, {'end': 15929.354, 'start': 15633.901, 'title': 'Understanding hashset and treeset in java', 'summary': 'Explains the contains method of hashset to check for element existence, the remove method to delete elements, and the iteration process. it also introduces treeset for maintaining natural order and highlights the need for synchronization in a multi-threaded environment.', 'duration': 295.453, 'highlights': ['The contains method of the HashSet class is used to find if an element exists in the set or not', 'The remove operation of the HashSet can be used to remove an element from the set', 'TreeSet is used to maintain the natural ordering of elements and cannot have duplicate elements', 'TreeSet is not synchronized and requires careful handling in multi-threaded environments']}, {'end': 16841.092, 'start': 15929.815, 'title': 'Java: treemap and hashmap explained', 'summary': 'Explains the functionality and usage of treemap and hashmap in java. it covers how treemap maintains natural sorting order, uniqueness property, and key-value arrangement, while hashmap provides random access and key-value arrangement. it also discusses the significance of using maps for storing key-value arrangements in a program, and highlights the differences between map implementation classes, including treemap, hashmap, and linkedhashmap.', 'duration': 911.277, 'highlights': ['TreeSet maintains natural sorting order based on the predefined type in Java, such as String, and automatically applies sorting algorithm to sort the strings based on their natural order of sequence.', 'Map should be used to store any key-value arrangement in a Java program, as it provides a key-value arrangement and is the right collection or data structure for such storage.', 'HashMap provides random access and key-value arrangement and is not by default synchronized, while LinkedHashMap maintains insertion order and provides a sorted representation.']}, {'end': 17258.494, 'start': 16842.142, 'title': 'Java map utility methods', 'summary': 'Explains how to use utility methods in java map, including finding the size of the map, checking for key presence, fetching values, iterating over keys and entries, with examples and outputs.', 'duration': 416.352, 'highlights': ['The chapter explains how to use utility methods in Java Map, including finding the size of the map, checking for key presence, fetching values, iterating over keys and entries, with examples and outputs.', 'The map size is printed as three, indicating the addition of three entries.', 'The contains key method is showcased, enabling the check for the presence of a particular key in the map.', 'The usage of map.keyset and map.entryset to iterate over keys and entries is explained, with corresponding outputs.']}, {'end': 17693.446, 'start': 17258.854, 'title': 'Understanding treemap in java', 'summary': 'Covers the concept of treemap in java, highlighting its natural sorting behavior for keys and providing an example demonstrating the sorted output, emphasizing the need for custom sorting implementation for custom keys.', 'duration': 434.592, 'highlights': ['The TreeMap in Java automatically sorts map entries based on the key type, such as integers or strings, and provides a natural ordering behavior, demonstrated through examples (e.g., integers sorted in ascending order, strings sorted alphabetically).', 'For custom keys with no built-in sorting behavior, a user-defined sorting implementation is required, and upcoming lectures will cover the types of sorting implementations for such scenarios.', 'Readers are encouraged to explore the various methods available in TreeMap, including element removal and iteration, by referring to the Javadocs API for comprehensive understanding of TreeMap functionalities.']}], 'duration': 2263.5, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ15429946.jpg', 'highlights': ["The add method of HashSet returns a Boolean value, with 'true' indicating a successful addition and 'false' indicating rejection of the addition.", 'The demonstration shows that when adding duplicate elements to a HashSet, the set maintains its uniqueness property by rejecting subsequent duplicate elements.', 'The chapter explains how to use utility methods in Java Map, including finding the size of the map, checking for key presence, fetching values, iterating over keys and entries, with examples and outputs.', 'TreeMap in Java automatically sorts map entries based on the key type, such as integers or strings, and provides a natural ordering behavior, demonstrated through examples (e.g., integers sorted in ascending order, strings sorted alphabetically).', 'Map should be used to store any key-value arrangement in a Java program, as it provides a key-value arrangement and is the right collection or data structure for such storage.']}, {'end': 19087.925, 'segs': [{'end': 17794.549, 'src': 'embed', 'start': 17744.395, 'weight': 1, 'content': [{'end': 17749.238, 'text': "that is why you can say it is a type of list, but actually it's not a type of list.", 'start': 17744.395, 'duration': 4.843}, {'end': 17751.36, 'text': 'it has its own representation.', 'start': 17749.238, 'duration': 2.122}, {'end': 17759.244, 'text': 'you will use stack in the cases where you will have to maintain a lifo representation of the objects.', 'start': 17751.36, 'duration': 7.884}, {'end': 17761.586, 'text': 'now, what is a lifo representation?', 'start': 17759.244, 'duration': 2.342}, {'end': 17765.148, 'text': 'it means last in, first out.', 'start': 17761.586, 'duration': 3.562}, {'end': 17778.301, 'text': "that's the basically the full form of the lifo acronym and what it means that the element which goes at the last in the inside the collection will be the first to come out.", 'start': 17765.148, 'duration': 13.153}, {'end': 17786.845, 'text': 'Think of it as a stack of plates at your dining table, where you put plates over one another,', 'start': 17779.262, 'duration': 7.583}, {'end': 17794.549, 'text': 'and the last plate which you put on that plate stack will be the first one to be picked up by somebody who wants to eat something,', 'start': 17786.845, 'duration': 7.704}], 'summary': 'A stack maintains a last in, first out representation and is used in cases where lifo representation of objects needs to be maintained.', 'duration': 50.154, 'max_score': 17744.395, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ17744395.jpg'}, {'end': 17960.991, 'src': 'embed', 'start': 17930.326, 'weight': 7, 'content': [{'end': 17935.23, 'text': 'Basically, the stack is holding the list of all the countries or the entries of all the countries.', 'start': 17930.326, 'duration': 4.904}, {'end': 17939.594, 'text': 'So you say America at line 11.', 'start': 17935.71, 'duration': 3.884}, {'end': 17943.577, 'text': "Then at line 12, I'm again doing stack.push and entering Germany.", 'start': 17939.594, 'duration': 3.983}, {'end': 17948.746, 'text': "at line 13, I'm again doing another stack.push and entering India.", 'start': 17944.304, 'duration': 4.442}, {'end': 17954.008, 'text': 'So basically I have added three countries names inside this stack.', 'start': 17949.446, 'duration': 4.562}, {'end': 17960.991, 'text': 'Now, if you, if you can think about the mental representation, or if you try to build a mental representation of this,', 'start': 17954.748, 'duration': 6.243}], 'summary': 'A stack holds entries of 3 countries: america, germany, and india.', 'duration': 30.665, 'max_score': 17930.326, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ17930326.jpg'}, {'end': 18605.237, 'src': 'embed', 'start': 18579.466, 'weight': 0, 'content': [{'end': 18584.25, 'text': 'One of the most popular implementation of queue interface is a priority queue class.', 'start': 18579.466, 'duration': 4.784}, {'end': 18588.353, 'text': 'So the priority queue class is again, technically it is a queue.', 'start': 18584.89, 'duration': 3.463}, {'end': 18592.151, 'text': 'which basically works on the concept of first in, first out.', 'start': 18588.789, 'duration': 3.362}, {'end': 18596.172, 'text': 'But at the same time, it also works on a priority.', 'start': 18592.471, 'duration': 3.701}, {'end': 18605.237, 'text': 'You can assign a priority to the elements, which will decide which element is going to come first and which element is going to come second.', 'start': 18596.212, 'duration': 9.025}], 'summary': 'Priority queue class is a popular implementation of queue interface, working on fifo and priority.', 'duration': 25.771, 'max_score': 18579.466, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ18579466.jpg'}, {'end': 18671.056, 'src': 'embed', 'start': 18640.111, 'weight': 5, 'content': [{'end': 18644.412, 'text': 'And like I mentioned, if you use priority queue, you can see the import of it here.', 'start': 18640.111, 'duration': 4.301}, {'end': 18653.133, 'text': 'If you see the priority queue, then you get that natural sorting or natural ordering logic phenomena out of the box.', 'start': 18645.592, 'duration': 7.541}, {'end': 18662.435, 'text': 'Because we are using strings here, so Java already knows how to sort strings and it is going to sort strings in the alphabetical sorting order.', 'start': 18653.933, 'duration': 8.502}, {'end': 18671.056, 'text': "If you are providing a custom class of yours, maybe let's say queue of students, then in that case, you need to tell Java how to sort those elements.", 'start': 18663.075, 'duration': 7.981}], 'summary': 'Using priority queue in java provides natural sorting for strings and requires custom sorting logic for custom classes.', 'duration': 30.945, 'max_score': 18640.111, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ18640111.jpg'}, {'end': 18960.705, 'src': 'embed', 'start': 18934.355, 'weight': 4, 'content': [{'end': 18938.236, 'text': 'if you just want to view which element is sitting at the head of the queue.', 'start': 18934.355, 'duration': 3.881}, {'end': 18943.538, 'text': "If you just want to view it, you don't want to remove the element, but you just want to view the element.", 'start': 18938.437, 'duration': 5.101}, {'end': 18945.659, 'text': 'In that case, you can call the peek method.', 'start': 18943.779, 'duration': 1.88}, {'end': 18952.802, 'text': "So I'm just calling queue.peek and storing the output of queue.peek into a variable called head and then just printing the head.", 'start': 18946.099, 'duration': 6.703}, {'end': 18954.663, 'text': "So let's see what happens in this case.", 'start': 18953.182, 'duration': 1.481}, {'end': 18960.705, 'text': "Okay, so I'm getting this message which says head of the queue is Germany, because Germany is now the new head,", 'start': 18955.223, 'duration': 5.482}], 'summary': 'Using the peek method, the head of the queue is germany.', 'duration': 26.35, 'max_score': 18934.355, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ18934355.jpg'}], 'start': 17693.446, 'title': 'Java stacks and queues', 'summary': 'Covers the concepts of stacks and queues in java, including their functionality, use cases, and methods. it emphasizes lifo representation in stacks, fifo arrangement in queues, and provides hands-on examples for practical understanding.', 'chapters': [{'end': 17819.46, 'start': 17693.446, 'title': 'Stacks in java', 'summary': 'Introduces the concept of stacks in java, providing an overview of their functionality, use cases, and a real-life analogy, emphasizing the lifo representation, with a hands-on example.', 'duration': 126.014, 'highlights': ['The stack in Java is used to maintain a lifo representation of objects, where the last element inside the collection will be the first to come out, similar to a stack of plates at a dining table.', 'The chapter provides a hands-on example of building and using a stack in a real-life scenario in Java.', 'The stack extends the list interface but has its own representation, making it suitable for maintaining a lifo order of objects.', "The lifo acronym stands for 'last in, first out', representing the characteristic of a stack.", 'The analogy of a stack of plates at a dining table is used to illustrate the lifo representation of a stack in Java.']}, {'end': 18439.409, 'start': 17819.46, 'title': 'Working with java stacks', 'summary': 'Discusses the usage of stack in java, covering the push and pop methods and demonstrating the process through a detailed example, including adding, removing, and peeking elements.', 'duration': 619.949, 'highlights': ['The push method is used to insert elements inside the stack, with examples showcasing the addition of string elements like America, Germany, and India.', 'The pop method is utilized to remove elements from the stack, with a detailed example showing the removal of elements like India and Germany from the stack.', 'The use of the peek method to view the top element of the stack without removing it is explained, providing insights into the difference between pop and peek methods.']}, {'end': 18809.663, 'start': 18440.03, 'title': 'Understanding queues in java', 'summary': 'Focuses on the queue interface in java, its fifo arrangement, the priority queue class, and a hands-on example, highlighting the natural ordering logic and the concept of head and tail. it emphasizes the value proposition of queue and stacks for specific scenarios.', 'duration': 369.633, 'highlights': ['The queue interface in Java is based on the FIFO (First-In-First-Out) arrangement, where the first element entering the queue will be the first to be removed, contrasting with the LIFO (Last-In-First-Out) philosophy of stacks. This premise guides the selection of the appropriate collection for specific project scenarios.', 'The priority queue class is a popular implementation of the queue interface, working on the concept of FIFO while also incorporating a priority system to determine the order of elements. It utilizes the natural ordering logic seen in other ordered collections like tree set and tree map.', 'The hands-on example includes initializing a priority queue for strings, demonstrating the automatic alphabetical sorting of elements due to the natural sorting logic. The concept of head and tail in the queue is also explained, emphasizing the order of elements and their positions in the queue.']}, {'end': 19087.925, 'start': 18810.083, 'title': 'Queue methods and natural sorting', 'summary': "Discusses the tostring method in java which is automatically called when printing a variable, the implications of using the tostring method in priority queues, and the functionalities of remove, peek, and poll methods, showcasing their impact on the queue's natural ordering sequence.", 'duration': 277.842, 'highlights': ["The toString method is automatically called when printing a variable in Java, even though it doesn't need to be explicitly written.", 'Using the toString method in priority queues does not adhere to natural ordering and results in a random order when the queue is printed directly.', 'The remove method in a FIFO queue removes the head element, adhering to the natural sorting order, and printing the remaining queue confirms the removal of the specified element.', 'The peek method allows viewing the element at the head of the queue without removing it, and respects the natural sorting order.', 'The poll method removes and returns the head element of the queue, allowing it to be stored and further utilized in the program.']}], 'duration': 1394.479, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ17693446.jpg', 'highlights': ['The priority queue class is a popular implementation of the queue interface, working on the concept of FIFO while also incorporating a priority system to determine the order of elements. It utilizes the natural ordering logic seen in other ordered collections like tree set and tree map.', "The lifo acronym stands for 'last in, first out', representing the characteristic of a stack.", 'The queue interface in Java is based on the FIFO (First-In-First-Out) arrangement, where the first element entering the queue will be the first to be removed, contrasting with the LIFO (Last-In-First-Out) philosophy of stacks. This premise guides the selection of the appropriate collection for specific project scenarios.', 'The stack in Java is used to maintain a lifo representation of objects, where the last element inside the collection will be the first to come out, similar to a stack of plates at a dining table.', 'The use of the peek method to view the top element of the stack without removing it is explained, providing insights into the difference between pop and peek methods.', 'The hands-on example includes initializing a priority queue for strings, demonstrating the automatic alphabetical sorting of elements due to the natural sorting logic. The concept of head and tail in the queue is also explained, emphasizing the order of elements and their positions in the queue.', 'The analogy of a stack of plates at a dining table is used to illustrate the lifo representation of a stack in Java.', 'The push method is used to insert elements inside the stack, with examples showcasing the addition of string elements like America, Germany, and India.']}, {'end': 20940.049, 'segs': [{'end': 19115.275, 'src': 'embed', 'start': 19087.945, 'weight': 3, 'content': [{'end': 19090.688, 'text': 'This is a special case if the queue has only one element left.', 'start': 19087.945, 'duration': 2.743}, {'end': 19093.98, 'text': 'So this is all I wanted to cover in the case of queues.', 'start': 19091.038, 'duration': 2.942}, {'end': 19097.703, 'text': 'And, like I mentioned in all the previous sessions as well,', 'start': 19094.34, 'duration': 3.363}, {'end': 19102.306, 'text': 'do go and check out the Java docs API of the queue interface and the priority queue classes.', 'start': 19097.703, 'duration': 4.603}, {'end': 19107.49, 'text': 'Learn and just get familiar with all the different methods which are available in this class,', 'start': 19102.806, 'duration': 4.684}, {'end': 19115.275, 'text': 'so that when you start using these queues types or these collection types, you know what all utilities and methods are available.', 'start': 19107.49, 'duration': 7.785}], 'summary': 'Special case for single element queue. explore java docs for queue and priority queue classes.', 'duration': 27.33, 'max_score': 19087.945, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ19087945.jpg'}, {'end': 19301.741, 'src': 'embed', 'start': 19278.297, 'weight': 2, 'content': [{'end': 19287.56, 'text': 'If you see those two specifications in any entity, you can map that entity or you can write that entity inside a Java program as a class,', 'start': 19278.297, 'duration': 9.263}, {'end': 19292.24, 'text': 'because class in Java will exactly have these two properties.', 'start': 19287.56, 'duration': 4.68}, {'end': 19301.741, 'text': 'it will have some attributes, which we call as properties, and it will have some behaviors, which technically are called as methods.', 'start': 19292.24, 'duration': 9.501}], 'summary': 'Entities with 2 specifications can be mapped to java classes with properties and methods.', 'duration': 23.444, 'max_score': 19278.297, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ19278297.jpg'}, {'end': 19967.708, 'src': 'heatmap', 'start': 19580.91, 'weight': 0.758, 'content': [{'end': 19589.051, 'text': "we have a string address argument being passed into this method and this gets set inside the current object's address property.", 'start': 19580.91, 'duration': 8.141}, {'end': 19597.593, 'text': "So I've provided a way for the external world to set the values of name, age and address, because for each student you would need to set these values.", 'start': 19589.731, 'duration': 7.862}, {'end': 19604.84, 'text': 'Now, you also need to provide a way to receive the values or to return the values or to read the values.', 'start': 19598.297, 'duration': 6.543}, {'end': 19608.162, 'text': 'For reading operation, you need to provide the getter method.', 'start': 19605.38, 'duration': 2.782}, {'end': 19610.723, 'text': 'So you see this get, again, this is not a keyword.', 'start': 19608.522, 'duration': 2.201}, {'end': 19612.163, 'text': "It's a standard naming convention.", 'start': 19610.783, 'duration': 1.38}, {'end': 19617.226, 'text': 'So similar, when you wrote set name, similarly, you will write a get name method.', 'start': 19612.664, 'duration': 4.562}, {'end': 19624.449, 'text': "This get name method is supposed to be reading the current object's names, properties, value, and will return that value.", 'start': 19617.626, 'duration': 6.823}, {'end': 19625.79, 'text': 'Since name is a string.', 'start': 19624.609, 'duration': 1.181}, {'end': 19629.25, 'text': "that's why you see return type as string here.", 'start': 19625.79, 'duration': 3.46}, {'end': 19635.471, 'text': 'similarly, get age is going to return the age, which is an integer, and address is going to return the address.', 'start': 19629.25, 'duration': 6.221}, {'end': 19639.272, 'text': 'you can also write it like this, which is absolutely fine.', 'start': 19635.471, 'duration': 3.801}, {'end': 19647.454, 'text': 'it is not going to complain because technically it is returning the current objects name, properties and age, property and the address property.', 'start': 19639.272, 'duration': 8.182}, {'end': 19649.254, 'text': "now let's talk about this.", 'start': 19647.454, 'duration': 1.8}, {'end': 19650.774, 'text': 'what is what is this section?', 'start': 19649.254, 'duration': 1.52}, {'end': 19659.102, 'text': "so this section is basically called a constructor, And I have a whole session dedicated on the constructors, but let's understand why we need this.", 'start': 19650.774, 'duration': 8.328}, {'end': 19665.885, 'text': 'Remember when I told you the definition of the class, I said that class is a blueprint of an object.', 'start': 19660.262, 'duration': 5.623}, {'end': 19670.728, 'text': 'So you have created a student class and you have 5, 000 students in your college.', 'start': 19666.666, 'duration': 4.062}, {'end': 19675.57, 'text': 'Now you need to create a new student object for each of those students.', 'start': 19671.148, 'duration': 4.422}, {'end': 19680.013, 'text': 'You need to initialize this student class 5, 000 times.', 'start': 19676.031, 'duration': 3.982}, {'end': 19685.37, 'text': 'How do you do that? To do that, We do that with the help of constructors.', 'start': 19680.433, 'duration': 4.937}, {'end': 19686.711, 'text': 'We call this constructor.', 'start': 19685.47, 'duration': 1.241}, {'end': 19688.632, 'text': 'This is a special type of method.', 'start': 19686.831, 'duration': 1.801}, {'end': 19694.997, 'text': 'Remember, this is a special type of method which is provided by Java to initialize any classes objects.', 'start': 19688.872, 'duration': 6.125}, {'end': 19701.542, 'text': 'If you want to create multiple objects of the student class, you can repeatedly call this student constructor.', 'start': 19695.718, 'duration': 5.824}, {'end': 19702.823, 'text': 'We call this constructor.', 'start': 19701.582, 'duration': 1.241}, {'end': 19707.807, 'text': 'So you put public here because we want this constructor to be accessible to the outside world.', 'start': 19702.983, 'duration': 4.824}, {'end': 19710.029, 'text': 'Then you put the exact class name.', 'start': 19708.328, 'duration': 1.701}, {'end': 19714.833, 'text': 'So whatever class name you have provided here, You need to put the exact last name here.', 'start': 19710.569, 'duration': 4.264}, {'end': 19717.535, 'text': "If you don't do that, Java is going to raise an error.", 'start': 19715.194, 'duration': 2.341}, {'end': 19723.94, 'text': 'If I do this here, it is going to, you see a red line here because Java failed to compile this constructor.', 'start': 19718.216, 'duration': 5.724}, {'end': 19727.962, 'text': 'It does not understand what is student triple one, but it does understand what is student.', 'start': 19724.04, 'duration': 3.922}, {'end': 19729.763, 'text': 'So this is how it is going to be.', 'start': 19728.543, 'duration': 1.22}, {'end': 19736.128, 'text': 'And then you provide all the properties which are going to create the student object.', 'start': 19730.364, 'duration': 5.764}, {'end': 19739.47, 'text': "So you're going to create the name, the age, and the address.", 'start': 19736.728, 'duration': 2.742}, {'end': 19742.072, 'text': 'So the name, age, and address.', 'start': 19739.87, 'duration': 2.202}, {'end': 19746.216, 'text': 'And then you set those values again, similar to the setter methods we have seen.', 'start': 19742.694, 'duration': 3.522}, {'end': 19748.437, 'text': 'The reason we need to use this here?', 'start': 19746.836, 'duration': 1.601}, {'end': 19751.859, 'text': 'because if you write it like this,', 'start': 19748.437, 'duration': 3.422}, {'end': 19757.862, 'text': "then Java doesn't understand the difference between the current object's name and the name coming from the argument.", 'start': 19751.859, 'duration': 6.003}, {'end': 19760.724, 'text': 'So to differentiate that, you need to use this here.', 'start': 19758.242, 'duration': 2.482}, {'end': 19769.248, 'text': "If you use n here, and if I just use n here, then this is fine because there's only single name variable in this whole class then.", 'start': 19761.084, 'duration': 8.164}, {'end': 19774.027, 'text': 'But if I write it like this, then, and if i write it like this,', 'start': 19769.628, 'duration': 4.399}, {'end': 19779.79, 'text': "then java doesn't know if this name is basically the student class's name or this name is student class's name.", 'start': 19774.027, 'duration': 5.763}, {'end': 19785.152, 'text': 'it will get confused, like you are getting confused if you, if you try to just find this in mind mapping.', 'start': 19779.79, 'duration': 5.362}, {'end': 19791.935, 'text': "so that's why we need to write this here, so that it's clearly differentiable, that whenever i use this dot name,", 'start': 19785.152, 'duration': 6.783}, {'end': 19797.178, 'text': "i'm referring to the classes name property, and when i'm just using the name, i'm referring to the method argument.", 'start': 19791.935, 'duration': 5.243}, {'end': 19800.737, 'text': "that's what we do in doing this in this constructor.", 'start': 19798.055, 'duration': 2.682}, {'end': 19808.121, 'text': 'so you basically initialize all the properties of your class with some values with the help of constructor.', 'start': 19800.737, 'duration': 7.384}, {'end': 19810.843, 'text': 'so we have the constructor, we have the setter, we have the getter.', 'start': 19808.121, 'duration': 2.722}, {'end': 19812.183, 'text': 'we can cover about this two string.', 'start': 19810.843, 'duration': 1.34}, {'end': 19816.186, 'text': 'basically, this two string is to print, print something, but we can cover that later.', 'start': 19812.183, 'duration': 4.003}, {'end': 19819.348, 'text': "now let's initialize this particular class.", 'start': 19816.186, 'duration': 3.162}, {'end': 19822.489, 'text': "so I'm similar to the initialization we have seen so far.", 'start': 19819.348, 'duration': 3.141}, {'end': 19825.257, 'text': 'you just write student, You write the object name.', 'start': 19822.489, 'duration': 2.768}, {'end': 19826.158, 'text': 'This can be anything.', 'start': 19825.277, 'duration': 0.881}, {'end': 19830.719, 'text': 'And then you use the new keyword, which is used to initialize anything in Java.', 'start': 19826.498, 'duration': 4.221}, {'end': 19834.88, 'text': 'New is a keyword in Java, which you can use to initialize literally anything in Java.', 'start': 19831.279, 'duration': 3.601}, {'end': 19836.801, 'text': 'So you use new student.', 'start': 19835.24, 'duration': 1.561}, {'end': 19843.103, 'text': 'And when you say new student, you can provide all the values which should match its constructor.', 'start': 19837.281, 'duration': 5.822}, {'end': 19847.804, 'text': 'So here we have three values, string, integer, and string.', 'start': 19843.603, 'duration': 4.201}, {'end': 19853.666, 'text': 'And here also we are supplying three values, string, integer, and string again.', 'start': 19848.584, 'duration': 5.082}, {'end': 19859.418, 'text': 'remember to match this exactly with one of the constructors which is available in the class.', 'start': 19854.196, 'duration': 5.222}, {'end': 19861.399, 'text': "if it doesn't match, it is going to fail.", 'start': 19859.418, 'duration': 1.981}, {'end': 19862.5, 'text': 'it will not work.', 'start': 19861.399, 'duration': 1.101}, {'end': 19870.903, 'text': "so if i, for example, if i do this, then i'm supplying four arguments to the student class, but there is no constructor matching four arguments,", 'start': 19862.5, 'duration': 8.403}, {'end': 19872.284, 'text': 'so it is going to complain.', 'start': 19870.903, 'duration': 1.381}, {'end': 19875.225, 'text': 'you see this red line and the code is not compiling.', 'start': 19872.284, 'duration': 2.941}, {'end': 19879.787, 'text': "if i remove this, then it is matching it, and that's how you basically create a student object.", 'start': 19875.225, 'duration': 4.562}, {'end': 19882.758, 'text': 'So an object is basically an instance of the class.', 'start': 19880.157, 'duration': 2.601}, {'end': 19883.898, 'text': 'Remember that very well.', 'start': 19882.958, 'duration': 0.94}, {'end': 19885.698, 'text': 'An object is an instance of the class.', 'start': 19884.138, 'duration': 1.56}, {'end': 19891.7, 'text': "Once you have created an instance of the class, then you can call any method, like say, let's say you want to read the name.", 'start': 19886.038, 'duration': 5.662}, {'end': 19893.76, 'text': 'So you can call get name.', 'start': 19891.72, 'duration': 2.04}, {'end': 19894.841, 'text': 'You can read the name.', 'start': 19894.02, 'duration': 0.821}, {'end': 19902.022, 'text': 'Similarly, if you want to, so if you, if you want to read the age of the student, then you can do that as well.', 'start': 19895.181, 'duration': 6.841}, {'end': 19905.203, 'text': 'So let me just copy this and do this.', 'start': 19902.042, 'duration': 3.161}, {'end': 19906.704, 'text': "Let's call get age.", 'start': 19905.963, 'duration': 0.741}, {'end': 19914.714, 'text': 'I want to print the name, I want to print the age and I also want to print the address.', 'start': 19909.11, 'duration': 5.604}, {'end': 19916.536, 'text': 'so get control space.', 'start': 19914.714, 'duration': 1.822}, {'end': 19918.918, 'text': 'I get suggestion address yep.', 'start': 19916.536, 'duration': 2.382}, {'end': 19919.878, 'text': "so I'm printing the name,", 'start': 19918.918, 'duration': 0.96}, {'end': 19928.145, 'text': "I'm printing the age and I'm printing the address after I have initialized the object successfully by using this constructor representation,", 'start': 19919.878, 'duration': 8.267}, {'end': 19929.686, 'text': 'using the new keyword.', 'start': 19928.145, 'duration': 1.541}, {'end': 19932.308, 'text': "so now let's run this method or run this class.", 'start': 19929.686, 'duration': 2.622}, {'end': 19941.079, 'text': 'basically, When I ran this class, the whole class got compiled the constructor, the getters and the setters and the properties and their types.', 'start': 19932.308, 'duration': 8.771}, {'end': 19941.86, 'text': 'everything was set.', 'start': 19941.079, 'duration': 0.781}, {'end': 19947.741, 'text': "Then the main got called and I created a new object from this class's blueprint.", 'start': 19942.1, 'duration': 5.641}, {'end': 19949.482, 'text': 'The object name was John.', 'start': 19948.102, 'duration': 1.38}, {'end': 19956.704, 'text': 'Then I called john.getName to print the name which is stored inside this particular instance of the student class.', 'start': 19949.802, 'duration': 6.902}, {'end': 19961.727, 'text': 'Similarly the age of age which is stored in this particular instance.', 'start': 19957.364, 'duration': 4.363}, {'end': 19963.747, 'text': 'so we stored the name as john.', 'start': 19961.727, 'duration': 2.02}, {'end': 19967.708, 'text': 'so when we call john dot get name, we get john we got.', 'start': 19963.747, 'duration': 3.961}], 'summary': 'A java class is explained, including getters, setters, and constructors, with an example of creating and using a student object.', 'duration': 386.798, 'max_score': 19580.91, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ19580910.jpg'}, {'end': 20115.211, 'src': 'embed', 'start': 20093.645, 'weight': 0, 'content': [{'end': 20102.168, 'text': 'in the previous session we covered about the concept of classes and we walked us through with an example student class where we had a constructor.', 'start': 20093.645, 'duration': 8.523}, {'end': 20106.369, 'text': 'If I just open this back, this is the class which we covered in the last lecture.', 'start': 20102.468, 'duration': 3.901}, {'end': 20115.211, 'text': 'And we had this constructor where we supplied the required, the necessary number of arguments, which can match my students properties.', 'start': 20106.829, 'duration': 8.382}], 'summary': 'Covered classes and constructor example with student class.', 'duration': 21.566, 'max_score': 20093.645, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ20093645.jpg'}, {'end': 20270.633, 'src': 'embed', 'start': 20241.93, 'weight': 1, 'content': [{'end': 20250.338, 'text': 'So, taking that concept further, I have created a class called cuboid and I have three different properties written in this class,', 'start': 20241.93, 'duration': 8.408}, {'end': 20256.142, 'text': 'as we know that a cuboid has basically three properties, which are width, height and depth.', 'start': 20250.338, 'duration': 5.804}, {'end': 20262.346, 'text': "so I'm taking that example here, creating a class for a cuboid, providing the width, height and depth.", 'start': 20256.142, 'duration': 6.204}, {'end': 20270.633, 'text': "for simplicity, I'm taking this as integers, but generally you will see this as doubles, probably because the values can be in decimal points.", 'start': 20262.346, 'duration': 8.287}], 'summary': 'Created a cuboid class with properties width, height, and depth.', 'duration': 28.703, 'max_score': 20241.93, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ20241930.jpg'}, {'end': 20661.154, 'src': 'embed', 'start': 20628.066, 'weight': 4, 'content': [{'end': 20629.948, 'text': 'So these are the four constructor invocations.', 'start': 20628.066, 'duration': 1.882}, {'end': 20633.911, 'text': 'So this class is demonstrating four different kinds of constructor invocations.', 'start': 20630.048, 'duration': 3.863}, {'end': 20636.774, 'text': "Let's run this class and observe the output.", 'start': 20634.472, 'duration': 2.302}, {'end': 20639.536, 'text': "Okay So let's start from here.", 'start': 20638.035, 'duration': 1.501}, {'end': 20645.562, 'text': 'I called this particular constructor with three arguments, 10, 20, and 15.', 'start': 20640.217, 'duration': 5.345}, {'end': 20651.907, 'text': 'And then the volume was calculated, which would be 10 into 20 into 15, which is 3000.', 'start': 20645.562, 'duration': 6.345}, {'end': 20654.73, 'text': 'So this sysout basically prints this output.', 'start': 20651.907, 'duration': 2.823}, {'end': 20661.154, 'text': "Then move on to the next one where I'm saying cuboid with defaults, which is having the value 10 and 20.", 'start': 20655.509, 'duration': 5.645}], 'summary': 'Demonstration of four constructor invocations with calculations and output.', 'duration': 33.088, 'max_score': 20628.066, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ20628066.jpg'}], 'start': 19087.945, 'title': 'Java classes and constructors', 'summary': 'Covers java classes, objects, constructors, and cuboid class constructors, emphasizing the importance of queue interface and priority queue classes, with examples demonstrating the properties and methods. it also explains the significance of constructors in initializing class objects, multiple constructors, and their relevance in handling different use cases for the same class.', 'chapters': [{'end': 19125.683, 'start': 19087.945, 'title': 'Queue interface and priority queue classes', 'summary': 'Covers the special case of queues with only one element left, emphasizes the importance of familiarizing with the methods available in the java docs api of the queue interface and the priority queue classes, and mentions the automatic method suggestions in good ides.', 'duration': 37.738, 'highlights': ['Familiarize with the methods available in the Java docs API of the queue interface and the priority queue classes to understand the utilities and methods available.', 'Emphasize the importance of understanding different methods available in queue and priority queue classes when using these collection types.', 'Mention the automatic method suggestions in good IDEs, which help in accessing available methods.']}, {'end': 19650.774, 'start': 19125.683, 'title': 'Classes and objects in java', 'summary': 'Covers the concept of classes and objects in java, emphasizing that a class is a blueprint of an object and an object is an instance of a class, with examples demonstrating the properties and methods of representing real-world entities in a java program.', 'duration': 525.091, 'highlights': ['A class is a blueprint of an object, and an object is an instance of a class, with examples from real-world entities such as students and their attributes and behaviors.', 'Entities in the real world can be mapped as classes in a Java program, with attributes and behaviors represented as properties and methods, serving as the foundation of Java programming.', 'The importance of identifying entities with attributes and behaviors in a program, as Java requires the representation of these entities through corresponding Java classes to write a program.']}, {'end': 20240.889, 'start': 19650.774, 'title': 'Understanding constructors in java', 'summary': 'Covers the concept of constructors in java, emphasizing the need for constructors to initialize class objects, the process of using constructors to create multiple objects, and the significance of constructors in differentiating and initializing class properties. it also introduces the concept of multiple constructors and their relevance in handling different use cases for the same class.', 'duration': 590.115, 'highlights': ['The chapter covers the concept of constructors in Java, emphasizing the need for constructors to initialize class objects', 'The process of using constructors to create multiple objects', 'The significance of constructors in differentiating and initializing class properties', 'Introduces the concept of multiple constructors and their relevance in handling different use cases for the same class']}, {'end': 20482.407, 'start': 20241.93, 'title': 'Java cuboid class constructors', 'summary': 'Explains the creation of a java cuboid class with four different constructors to handle various use cases, including supplying all values, keeping depth constant, setting all dimensions equal, and setting default static values.', 'duration': 240.477, 'highlights': ['The chapter explains the creation of a Java cuboid class with four different constructors to handle various use cases.', 'The constructor allows for supplying all values, creating individual objects with different width, height, and depth.', 'Another constructor keeps the depth constant at 10 and allows varying width and height for each object.', 'A constructor is created for setting all dimensions equal, essentially creating a cube.', 'A constructor with no arguments sets static default values for all objects when no specific values are supplied.']}, {'end': 20940.049, 'start': 20482.647, 'title': 'Cuboid volume calculator', 'summary': "Demonstrates the use of different constructors to calculate the volume of a cuboid, showcasing four different constructor invocations and the default behavior of java's constructor implementation.", 'duration': 457.402, 'highlights': ['The chapter demonstrates four different kinds of constructor invocations for calculating the volume of a cuboid.', 'The default constructor provided by Java initializes the values of all properties to the default values supported by the data type, resulting in a volume of 0.', "Java's behavior requires the explicit provision of a default constructor if any constructor with at least one parameter is provided in the class."]}], 'duration': 1852.104, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ19087945.jpg', 'highlights': ['The chapter covers the concept of constructors in Java, emphasizing the need for constructors to initialize class objects', 'The chapter explains the creation of a Java cuboid class with four different constructors to handle various use cases', 'Entities in the real world can be mapped as classes in a Java program, with attributes and behaviors represented as properties and methods', 'Familiarize with the methods available in the Java docs API of the queue interface and the priority queue classes to understand the utilities and methods available', 'The chapter demonstrates four different kinds of constructor invocations for calculating the volume of a cuboid']}, {'end': 23095.145, 'segs': [{'end': 21010.199, 'src': 'embed', 'start': 20982.179, 'weight': 0, 'content': [{'end': 20985.421, 'text': "But I'm talking about stream as a concept in general.", 'start': 20982.179, 'duration': 3.242}, {'end': 20992.166, 'text': 'This is a slightly newer concept which was introduced in Java 8 and has been there and it is extremely popular.', 'start': 20985.642, 'duration': 6.524}, {'end': 21000.813, 'text': 'And the reason Java introduced this concept of streams to the JDK was to promote the functional programming paradigm.', 'start': 20992.487, 'duration': 8.326}, {'end': 21010.199, 'text': 'what we have been seeing so far is basically an object or the same lines of code which you would write in java in an in a classic object oriented way,', 'start': 21001.113, 'duration': 9.086}], 'summary': 'Java 8 introduced streams to promote functional programming paradigm.', 'duration': 28.02, 'max_score': 20982.179, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ20982179.jpg'}, {'end': 21046.435, 'src': 'embed', 'start': 21020.686, 'weight': 1, 'content': [{'end': 21026.83, 'text': 'so the basic concept of streams is to help you iterating and manipulating collections.', 'start': 21020.686, 'duration': 6.144}, {'end': 21033.652, 'text': 'so remember all the classes which we covered in the collections framework the list, the set, the map, etc.', 'start': 21027.33, 'duration': 6.322}, {'end': 21042.454, 'text': 'streams provide you with a better and optimized way to basically allow you to manipulate those collections, iterate over those collections,', 'start': 21033.652, 'duration': 8.802}, {'end': 21046.435, 'text': 'change the representation of the collection types, etc.', 'start': 21042.454, 'duration': 3.981}], 'summary': 'Streams optimize collection manipulation and iteration for better performance.', 'duration': 25.749, 'max_score': 21020.686, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ21020686.jpg'}, {'end': 21104.3, 'src': 'embed', 'start': 21082.815, 'weight': 2, 'content': [{'end': 21091.55, 'text': 'So the streaming will basically help you work on a very large size item in a way using a very small memory footprint.', 'start': 21082.815, 'duration': 8.735}, {'end': 21092.731, 'text': "That's the power of streams.", 'start': 21091.63, 'duration': 1.101}, {'end': 21097.895, 'text': "Contrary to that, you can also, let's say, if you are, if you're watching a one gigabytes video,", 'start': 21093.372, 'duration': 4.523}, {'end': 21104.3, 'text': 'then you can either download the whole one gigabyte video on your mobile, which is going to consume complete one gigabyte space on your memory.', 'start': 21097.895, 'duration': 6.405}], 'summary': 'Streaming enables working on large items with small memory footprint, saving space and enhancing performance.', 'duration': 21.485, 'max_score': 21082.815, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ21082815.jpg'}, {'end': 21951.314, 'src': 'embed', 'start': 21927.628, 'weight': 3, 'content': [{'end': 21935.953, 'text': "let's say, that is your requirement that you have to get only the elements of this list where the name of the element starts with the letter p,", 'start': 21927.628, 'duration': 8.325}, {'end': 21937.594, 'text': 'if that is your requirement.', 'start': 21935.953, 'duration': 1.641}, {'end': 21946.42, 'text': 'probably this is how you will be writing the code if you are not using the streams api, where you will create a new list, an empty list, basically,', 'start': 21937.594, 'duration': 8.826}, {'end': 21951.314, 'text': 'and then you will iterate over the old list, which is the languages.', 'start': 21946.42, 'duration': 4.894}], 'summary': "Code filters list elements starting with 'p', without streams api.", 'duration': 23.686, 'max_score': 21927.628, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ21927628.jpg'}, {'end': 22740.867, 'src': 'embed', 'start': 22711.172, 'weight': 4, 'content': [{'end': 22718.433, 'text': 'so whenever you have to change the whole collection representation into a single result, Remember that line.', 'start': 22711.172, 'duration': 7.261}, {'end': 22725.357, 'text': 'whenever you have to change the representation of the complete collection into a single result,', 'start': 22718.433, 'duration': 6.924}, {'end': 22730.18, 'text': 'in those cases you will use the reduce method of the streams API.', 'start': 22725.357, 'duration': 4.823}, {'end': 22733.602, 'text': 'And if you apply this definition to the example I gave you,', 'start': 22730.34, 'duration': 3.262}, {'end': 22740.867, 'text': 'I have a collection of numbers and I want to calculate the sum of all the elements of this collection, which is a single result,', 'start': 22733.602, 'duration': 7.265}], 'summary': 'Use the reduce method to calculate the sum of a collection in the streams api.', 'duration': 29.695, 'max_score': 22711.172, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ22711172.jpg'}], 'start': 20940.049, 'title': 'Java streams api', 'summary': 'Discusses parameterized constructors, introduction of streams in java 8, benefits of using stream api, efficient code conversion, filtering, sorting, iterating, and reduce functionality, emphasizing optimization, functional programming paradigm, and efficient code demonstration.', 'chapters': [{'end': 21235.624, 'start': 20940.049, 'title': 'Java streams and constructors', 'summary': 'Discusses the concept of parameterized constructors in java and the introduction of streams in java 8, emphasizing its popularity, optimization, and promotion of functional programming paradigm.', 'duration': 295.575, 'highlights': ['The concept of streams in Java 8 promotes the functional programming paradigm by allowing the same code to be written in a single line as opposed to traditional object-oriented code, reducing it from 10 lines to 1 line.', 'Streams in Java provide an optimized way to manipulate collections and iterate over them, enhancing the representation and functionality of collection types like list, set, and map.', 'Streaming in Java allows for processing large-sized items using a small memory footprint, unlike traditional downloading, which would require the complete memory space for the item.']}, {'end': 21628.097, 'start': 21235.724, 'title': 'Introduction to stream api in java', 'summary': 'Discusses the benefits of using stream api in java to leverage multicore processors, the process of converting a collection into a stream, and the use of map and collect methods for transforming and terminating the stream, respectively.', 'duration': 392.373, 'highlights': ['The stream API provides utility methods for various operations, which can be used to manipulate the elements of a collection under different conditions.', 'The map method in the stream API is used to change the representation of elements within a collection, such as converting the elements to their squares.', 'The collect method in the stream API is a terminal operation that converts the stream back into a list, allowing for further use in the program.']}, {'end': 21865.058, 'start': 21628.597, 'title': 'Using streams api for efficient code', 'summary': 'Covers the conversion of a list of numbers into their squares using traditional and streams api approaches, with the latter demonstrating a more efficient and concise way of achieving the same result, resulting in a set of squared numbers.', 'duration': 236.461, 'highlights': ['The chapter covers the conversion of a list of numbers into their squares using traditional and Streams API approaches.', 'The Streams API approach demonstrates a more efficient and concise way of achieving the same result.', 'The result is a set of squared numbers.']}, {'end': 22614.9, 'start': 21865.258, 'title': 'Streams api: filtering, sorting, and iterating', 'summary': "Covers using the streams api to efficiently filter a list of strings to get elements starting with the letter 'p', achieving the same logic in a single line using the streams api, sorting a list of strings in natural order, and iterating over a collection using the streams api.", 'duration': 749.642, 'highlights': ["The Streams API efficiently filters a list of strings to get elements starting with the letter 'p', reducing verbose code to a single line.", 'The Streams API provides a straightforward method to sort a collection in natural order, reducing the complexity of sorting implementation.', 'The for each method of the Streams API allows iterating over a collection in a single line of code, providing a smarter way to iterate over collections.']}, {'end': 23095.145, 'start': 22614.9, 'title': 'Java streams api - reduce functionality', 'summary': 'Covers the usage of the reduce method in the java streams api, explaining its need, functionality, and implementation, with a focus on calculating the sum of a collection, and the usage of identity, accumulator, and combiner functions.', 'duration': 480.245, 'highlights': ['The reduce method is used to change the representation of a complete collection into a single result, such as calculating the sum of all elements.', "The reduce method's functionality is based on three terms: identity, accumulator, and combiner, with the identity serving as the default or initial value of the reduction operation.", 'The combiner function is optional and required only when dealing with two elements of different data types, serving as a means to handle mismatching data types in the accumulator function.']}], 'duration': 2155.096, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ20940049.jpg', 'highlights': ['The concept of streams in Java 8 promotes functional programming paradigm, reducing code from 10 to 1 line.', 'Streams in Java provide an optimized way to manipulate collections and iterate over them.', 'Streaming in Java allows for processing large-sized items using a small memory footprint.', "The Streams API efficiently filters a list of strings to get elements starting with the letter 'p'.", 'The reduce method is used to change the representation of a complete collection into a single result.']}, {'end': 23983.901, 'segs': [{'end': 23202.655, 'src': 'embed', 'start': 23159.692, 'weight': 0, 'content': [{'end': 23166.878, 'text': 'I should not get any variable or I should not even have access to any variable which I am not supposed to access.', 'start': 23159.692, 'duration': 7.186}, {'end': 23170.982, 'text': 'So the idea is providing the least privilege principle.', 'start': 23167.199, 'duration': 3.783}, {'end': 23173.964, 'text': 'Give access to different functions, different variables,', 'start': 23171.182, 'duration': 2.782}, {'end': 23180.87, 'text': 'different programs only by providing them the kind of access which they need to run efficiently.', 'start': 23173.964, 'duration': 6.906}, {'end': 23183.301, 'text': 'and do not give them complete access.', 'start': 23181.38, 'duration': 1.921}, {'end': 23192.628, 'text': 'So, with that notion in mind, Java created the concept of access modifiers and it created these three modifiers, which are called public,', 'start': 23183.862, 'duration': 8.766}, {'end': 23193.989, 'text': 'protected and private.', 'start': 23192.628, 'duration': 1.361}, {'end': 23200.634, 'text': 'If you do not provide any modifier, then it goes to no modifier, or some people also call it as default modifier,', 'start': 23194.189, 'duration': 6.445}, {'end': 23202.655, 'text': 'which is also a type of access modifier.', 'start': 23200.634, 'duration': 2.021}], 'summary': 'Java introduces access modifiers: public, protected, private to enforce least privilege principle.', 'duration': 42.963, 'max_score': 23159.692, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ23159692.jpg'}, {'end': 23276.131, 'src': 'embed', 'start': 23245.478, 'weight': 2, 'content': [{'end': 23248.259, 'text': 'It will be available to the whole world basically.', 'start': 23245.478, 'duration': 2.781}, {'end': 23260.461, 'text': 'Any subclass or any package or any other class which might have been written in your Java program will be able to access that particular class or variable or method if you put public in front of that.', 'start': 23248.759, 'duration': 11.702}, {'end': 23264.442, 'text': 'The second modifier level is protected.', 'start': 23260.981, 'duration': 3.461}, {'end': 23272.629, 'text': 'One of the other thing which you will understand as I explain this, is that as you move down into this particular table,', 'start': 23265.086, 'duration': 7.543}, {'end': 23276.131, 'text': 'the access level will start getting more and more restricted.', 'start': 23272.629, 'duration': 3.502}], 'summary': "Java allows access levels to be set, with 'public' offering the widest access and 'protected' offering slightly restricted access.", 'duration': 30.653, 'max_score': 23245.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ23245478.jpg'}], 'start': 23095.802, 'title': 'Java access modifiers & inheritance', 'summary': 'Covers the concept of access modifiers in java, emphasizing security and the creation of public, protected, and private modifiers. it also explains inheritance in object-oriented programming using examples, highlighting the usage of public, protected, default, and private modifiers.', 'chapters': [{'end': 23369.408, 'start': 23095.802, 'title': 'Java access modifiers', 'summary': 'Explains the concept of access modifiers in java, emphasizing the philosophy of security and the creation of public, protected, and private modifiers to control access to classes, variables, and methods, ensuring least privilege principle and restricted access levels.', 'duration': 273.606, 'highlights': ['Java created the concept of access modifiers - public, protected, private, and default (no modifier) - to control access to classes, variables, and methods, ensuring least privilege principle.', 'The philosophy behind access modifiers revolves around security, aiming to provide the least privilege principle and restrict access to different functions, variables, and programs.', 'Public modifier allows access to the whole program, while protected modifier restricts access to within the class, package, and subclasses.']}, {'end': 23983.901, 'start': 23369.948, 'title': 'Java access modifiers & inheritance', 'summary': 'Explains the access modifiers in java, including public, protected, default, and private, and demonstrates their usage through examples. it also introduces the concept of inheritance in object-oriented programming, using a bank account scenario as an example to illustrate how multiple classes can share similar behavior and properties.', 'duration': 613.953, 'highlights': ['The chapter explains the access modifiers in Java, including public, protected, default, and private, and demonstrates their usage through examples.', 'It also introduces the concept of inheritance in object-oriented programming, using a bank account scenario as an example to illustrate how multiple classes can share similar behavior and properties.']}], 'duration': 888.099, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ23095802.jpg', 'highlights': ['Java created access modifiers: public, protected, private, default.', 'Access modifiers aim for least privilege principle and security.', 'Public modifier allows access to the whole program.']}, {'end': 26137.656, 'segs': [{'end': 24113.471, 'src': 'embed', 'start': 24084.836, 'weight': 0, 'content': [{'end': 24088.398, 'text': 'And the basic idea, which I told you, lies in the parent and child relationship.', 'start': 24084.836, 'duration': 3.562}, {'end': 24096.563, 'text': 'And this is how you can conceptualize it, that you will have a base class or a parent class, and then you can have multiple children.', 'start': 24088.858, 'duration': 7.705}, {'end': 24100.806, 'text': 'And then those children can again have their own children and so on and so forth.', 'start': 24096.823, 'duration': 3.983}, {'end': 24106.089, 'text': 'So this hierarchy, this whole inheritance hierarchy can go as deep as you want it to be.', 'start': 24101.066, 'duration': 5.023}, {'end': 24113.471, 'text': "And that's the basic idea and basic conceptualization of how you understand and how you visualize inheritance.", 'start': 24106.587, 'duration': 6.884}], 'summary': 'Inheritance involves parent-child relationships, with the hierarchy able to go deep.', 'duration': 28.635, 'max_score': 24084.836, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ24084836.jpg'}, {'end': 24577.987, 'src': 'heatmap', 'start': 24190.816, 'weight': 0.935, 'content': [{'end': 24196.639, 'text': "So I'm trying to conceptualize the same example here where I've created a class called bicycle, and this is my base class.", 'start': 24190.816, 'duration': 5.823}, {'end': 24201.801, 'text': 'I defined two properties in the bicycle class, which is gear and speed.', 'start': 24197.319, 'duration': 4.482}, {'end': 24206.143, 'text': "We will come back to protected in a while, but let's leave that there.", 'start': 24202.181, 'duration': 3.962}, {'end': 24208.923, 'text': 'So I have two properties, which is gear and speed.', 'start': 24206.601, 'duration': 2.322}, {'end': 24213.045, 'text': "I have a constructor where I'm initializing the starting speed and the starting gear.", 'start': 24209.283, 'duration': 3.762}, {'end': 24219.69, 'text': 'And then I have three methods here, which says set gear, apply break and speed up.', 'start': 24213.666, 'duration': 6.024}, {'end': 24223.733, 'text': 'When I apply break, the speed is going to get reduced.', 'start': 24220.13, 'duration': 3.603}, {'end': 24226.514, 'text': "So that's why you see minus equal to unary operator.", 'start': 24224.013, 'duration': 2.501}, {'end': 24230.617, 'text': "And when I'm trying to speed up, the speed is going to increase.", 'start': 24227.455, 'duration': 3.162}, {'end': 24233.239, 'text': "That's why I'm using the plus equal to unary operator.", 'start': 24231.017, 'duration': 2.222}, {'end': 24239.382, 'text': 'So when you use the method speed up, the speed is going to be increased by the value you supply in the method.', 'start': 24233.82, 'duration': 5.562}, {'end': 24246.924, 'text': 'Similarly, when you apply the break, the speed is going to get reduced by the amount you supply in the method argument.', 'start': 24239.802, 'duration': 7.122}, {'end': 24251.465, 'text': 'And that is my base class, bicycle, gear, speed, and three methods.', 'start': 24247.244, 'duration': 4.221}, {'end': 24253.826, 'text': "Now let's have a look at the child class.", 'start': 24252.005, 'duration': 1.821}, {'end': 24260.147, 'text': 'So the way you will define the inheritance relationship in Java is by using this extends keyword.', 'start': 24254.626, 'duration': 5.521}, {'end': 24262.508, 'text': 'Remember, I told you to remember the extends keyword.', 'start': 24260.407, 'duration': 2.101}, {'end': 24264.279, 'text': 'So what you will do?', 'start': 24262.958, 'duration': 1.321}, {'end': 24273.263, 'text': 'that you will write your class name as usual and then you will use extends keyword and then you will use the parent class name or the base class name.', 'start': 24264.279, 'duration': 8.984}, {'end': 24277.025, 'text': "So here I'm saying class mountain bike extends bicycle.", 'start': 24273.644, 'duration': 3.381}, {'end': 24279.727, 'text': "And here I'm providing an additional property.", 'start': 24277.566, 'duration': 2.161}, {'end': 24283.288, 'text': 'Remember the whole commonality versus differentiality equation.', 'start': 24280.047, 'duration': 3.241}, {'end': 24288.191, 'text': 'So a mountain bike might have an extra property to adjust the seat height.', 'start': 24283.689, 'duration': 4.502}, {'end': 24292.133, 'text': "So that's the extra property, which mountain bike is having.", 'start': 24288.711, 'duration': 3.422}, {'end': 24298.388, 'text': 'And then, since this mountain bike is extending the bicycle class,', 'start': 24293.024, 'duration': 5.364}, {'end': 24305.034, 'text': 'this mountain bike class has the responsibility to initialize the bicycle class as well.', 'start': 24298.388, 'duration': 6.646}, {'end': 24316.243, 'text': 'And the way it will fulfill that responsibility is by taking all the arguments of bicycle class plus the mountain bike class in its constructor.', 'start': 24305.654, 'duration': 10.589}, {'end': 24318.705, 'text': "And that's why you see three different properties here.", 'start': 24316.563, 'duration': 2.142}, {'end': 24324.77, 'text': 'You see the start height property, which is the property of this particular class, which is the seat height,', 'start': 24319.085, 'duration': 5.685}, {'end': 24330.653, 'text': 'and then you see the start speed and start gear property, which directly are not available in this class.', 'start': 24324.77, 'duration': 5.883}, {'end': 24335.134, 'text': 'but this class is inheriting those properties from the base class.', 'start': 24330.653, 'duration': 4.481}, {'end': 24337.355, 'text': 'remember the keyword inheritance here.', 'start': 24335.134, 'duration': 2.221}, {'end': 24341.317, 'text': 'and then, once you do that, how do you initialize the base class constructor?', 'start': 24337.355, 'duration': 3.962}, {'end': 24343.458, 'text': 'is by calling the super method.', 'start': 24341.317, 'duration': 2.141}, {'end': 24351.021, 'text': 'this is again a keyword in java and you will use this super keyword to refer to the base class constructor in this way.', 'start': 24343.458, 'duration': 7.563}, {'end': 24359.849, 'text': 'So what you will do technically is that you will write super and you will supply the arguments which is required by the base class constructor.', 'start': 24351.363, 'duration': 8.486}, {'end': 24366.014, 'text': 'If I go back, the base class constructor requires two arguments, start speed and start gear.', 'start': 24360.47, 'duration': 5.544}, {'end': 24370.277, 'text': 'So I write super and then I write start speed and start gear.', 'start': 24366.955, 'duration': 3.322}, {'end': 24376.342, 'text': "So whatever I got from here in the constructor of mountain bike, I'm supplying those values as is to super.", 'start': 24370.357, 'duration': 5.985}, {'end': 24385.61, 'text': 'And Java will automatically take care of invoking this particular constructor the moment it encounters this kind of statement.', 'start': 24376.923, 'duration': 8.687}, {'end': 24393.297, 'text': 'Another thing to notice is that the super keyword or super statement has to be the first statement inside your constructor.', 'start': 24386.431, 'duration': 6.866}, {'end': 24401.604, 'text': 'Remember that whenever you are dealing with inheritance and whenever you have to initialize the super class constructor or the base class constructor,', 'start': 24393.597, 'duration': 8.007}, {'end': 24409.047, 'text': 'Use the super constructor invocation as the very first statement inside your child class constructor.', 'start': 24402.18, 'duration': 6.867}, {'end': 24412.05, 'text': 'Otherwise, Java will not compile the program.', 'start': 24409.488, 'duration': 2.562}, {'end': 24414.573, 'text': 'And then you will initialize the local variable.', 'start': 24412.531, 'duration': 2.042}, {'end': 24416.435, 'text': 'I should call this as this.', 'start': 24415.213, 'duration': 1.222}, {'end': 24420.699, 'text': 'Remember, we discussed about this in the classes session.', 'start': 24416.835, 'duration': 3.864}, {'end': 24424.522, 'text': 'Okay And then it just has a method of set height.', 'start': 24421.721, 'duration': 2.801}, {'end': 24427.742, 'text': "So there's no extra method with this mountain bike is providing,", 'start': 24424.642, 'duration': 3.1}, {'end': 24435.444, 'text': 'but this mountain bike will have access to all the methods which have been provided here and all the properties which have been provided here.', 'start': 24427.742, 'duration': 7.702}, {'end': 24439.165, 'text': 'This mountain bike can access everything from the bicycle class.', 'start': 24435.984, 'duration': 3.181}, {'end': 24446.566, 'text': "And that's the whole idea of inheritance that the child class can access the properties of the base class by extending the base class.", 'start': 24439.245, 'duration': 7.321}, {'end': 24450.047, 'text': "Now let's look at how do we invoke this particular class?", 'start': 24447.386, 'duration': 2.661}, {'end': 24456.182, 'text': 'So for that I have a simple class name as inheritance demo, which has a public static point main method.', 'start': 24450.677, 'duration': 5.505}, {'end': 24460.005, 'text': 'And then I am initializing the mountain bike class.', 'start': 24456.722, 'duration': 3.283}, {'end': 24463.748, 'text': "I'm supplying three values as 20, 10 and one.", 'start': 24460.926, 'duration': 2.822}, {'end': 24466.671, 'text': 'So the 20 goes to start height.', 'start': 24464.489, 'duration': 2.182}, {'end': 24470.574, 'text': 'The 10 here goes to start speed.', 'start': 24467.531, 'duration': 3.043}, {'end': 24475.438, 'text': 'And one here goes to gear or the start gear.', 'start': 24471.595, 'duration': 3.843}, {'end': 24477.32, 'text': "And that's how I'm setting the values.", 'start': 24476.059, 'duration': 1.261}, {'end': 24482.461, 'text': 'So when I call this particular constructor here, the mountain bike constructor is going to,', 'start': 24477.898, 'duration': 4.563}, {'end': 24489.625, 'text': 'this mountain bike constructor is going to get called and which, in turn, is going to call the base class bicycle class constructor as well.', 'start': 24482.461, 'duration': 7.164}, {'end': 24491.086, 'text': 'And everything will be set accordingly.', 'start': 24489.725, 'duration': 1.361}, {'end': 24493.268, 'text': "And then let's try to access the gear property.", 'start': 24491.326, 'duration': 1.942}, {'end': 24496.67, 'text': 'Remember gear is not directly available in the mountain bike class,', 'start': 24493.608, 'duration': 3.062}, {'end': 24502.794, 'text': "but I'm still able to do mountain bike dot gear because child class can access the parents class properties.", 'start': 24496.67, 'duration': 6.124}, {'end': 24506.376, 'text': 'Similarly, the same thing goes for speed as well.', 'start': 24503.694, 'duration': 2.682}, {'end': 24510.175, 'text': 'And seat height is the local property of this particular class mountain bike.', 'start': 24506.894, 'duration': 3.281}, {'end': 24511.956, 'text': 'So it will anyways be accessible.', 'start': 24510.415, 'duration': 1.541}, {'end': 24520.038, 'text': 'So I can access all the properties of the base class and the child class itself seamlessly without any differentiation.', 'start': 24512.476, 'duration': 7.562}, {'end': 24522.039, 'text': "Now let's try to call a method.", 'start': 24520.359, 'duration': 1.68}, {'end': 24524.98, 'text': "So here I'm calling the method apply break.", 'start': 24522.519, 'duration': 2.461}, {'end': 24529.201, 'text': 'Remember apply break was defined in the base class, not in the child class.', 'start': 24525.52, 'duration': 3.681}, {'end': 24530.642, 'text': "It's defined here.", 'start': 24529.642, 'duration': 1}, {'end': 24537.28, 'text': "So I'm calling the apply break method and I want to reduce the speed, the current speed by one.", 'start': 24531.198, 'duration': 6.082}, {'end': 24543.742, 'text': "And then I'm printing the current speed saying that bike speed after applying break is mountain bike dot speed.", 'start': 24537.82, 'duration': 5.922}, {'end': 24547.003, 'text': "So let's run this particular program and observe the outputs.", 'start': 24544.122, 'duration': 2.881}, {'end': 24557.127, 'text': "Okay So the first statement which gets printed is at line number seven, which says gear is one because it's coming from here.", 'start': 24548.984, 'duration': 8.143}, {'end': 24563.224, 'text': 'Then the seat height is mountain bike dot seat height, which is 20, which is the first argument here.', 'start': 24557.563, 'duration': 5.661}, {'end': 24568.085, 'text': 'And then the bike speed is 10, which is coming as here and getting printed here.', 'start': 24563.624, 'duration': 4.461}, {'end': 24572.406, 'text': "And then when I apply the break, let's go back to the apply break method.", 'start': 24568.665, 'duration': 3.741}, {'end': 24577.987, 'text': 'The logic is that whatever is the current speed, reduce it by the value I supply in the method.', 'start': 24572.586, 'duration': 5.401}], 'summary': 'Inheritance and usage of base and child class properties and methods demonstrated using a bicycle and mountain bike class in java.', 'duration': 387.171, 'max_score': 24190.816, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ24190816.jpg'}, {'end': 24818.882, 'src': 'embed', 'start': 24795.231, 'weight': 2, 'content': [{'end': 24802.795, 'text': 'You can think of it as a security feature that you want to protect the properties of your class,', 'start': 24795.231, 'duration': 7.564}, {'end': 24806.657, 'text': 'and you will use encapsulation to protect the properties.', 'start': 24802.795, 'duration': 3.862}, {'end': 24810.319, 'text': "How you implement encapsulation? Let's have a look at that now.", 'start': 24807.197, 'duration': 3.122}, {'end': 24814.481, 'text': 'So basic idea is to encapsulate the objects.', 'start': 24810.819, 'duration': 3.662}, {'end': 24818.882, 'text': 'create sort of a capsule around the object, which can provide that protection layer.', 'start': 24814.94, 'duration': 3.942}], 'summary': 'Encapsulation protects class properties by creating a protective layer around objects.', 'duration': 23.651, 'max_score': 24795.231, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ24795231.jpg'}, {'end': 25730.341, 'src': 'heatmap', 'start': 25342.434, 'weight': 0.843, 'content': [{'end': 25344.255, 'text': 'work together to speed up.', 'start': 25342.434, 'duration': 1.821}, {'end': 25346.936, 'text': 'there would be engine, there would be propulsion, there would be fuel.', 'start': 25344.255, 'duration': 2.681}, {'end': 25347.736, 'text': 'there would be.', 'start': 25346.936, 'duration': 0.8}, {'end': 25348.637, 'text': 'there might be some.', 'start': 25347.736, 'duration': 0.901}, {'end': 25351.198, 'text': "if it's an electric car, they would batteries.", 'start': 25348.637, 'duration': 2.561}, {'end': 25356.08, 'text': 'uh, there would be whole different kinds of pistons and plugs which will make the car speed up.', 'start': 25351.198, 'duration': 4.882}, {'end': 25363.203, 'text': "it's not only a single component, it's a lot of different components under the hood, and that's the concept of abstraction,", 'start': 25356.08, 'duration': 7.123}, {'end': 25369.916, 'text': 'that we only show the relevant parts to the user and we hide all the internal details from the user.', 'start': 25363.203, 'duration': 6.713}, {'end': 25371.957, 'text': "That's the basic idea of abstraction.", 'start': 25370.216, 'duration': 1.741}, {'end': 25381.921, 'text': 'So a car manufacturer abstracts away all the inner technical details from the driver and just gives the driver a single pedal to speed up the car.', 'start': 25372.257, 'duration': 9.664}, {'end': 25386.983, 'text': "For a user, it's a very good experience because he doesn't need to know about all the internals of the car.", 'start': 25382.361, 'duration': 4.622}, {'end': 25395.354, 'text': 'But the car manufacturer can hide all the details and provide a very simple interface for the driver to interact with which is just a gas pedal.', 'start': 25387.423, 'duration': 7.931}, {'end': 25397.615, 'text': "And that's the basic idea of abstraction.", 'start': 25395.814, 'duration': 1.801}, {'end': 25402.258, 'text': 'And we try to apply the same kind of concept to Java in the form of abstraction.', 'start': 25397.915, 'duration': 4.343}, {'end': 25410.042, 'text': 'And Java provides this kind of concept implementation with the help of a keyword, which is called abstract.', 'start': 25402.578, 'duration': 7.464}, {'end': 25415.246, 'text': 'Now, abstract is a keyword which can be used in front of a class or a method.', 'start': 25410.483, 'duration': 4.763}, {'end': 25420.389, 'text': 'When you use it in front of a class, the whole class becomes abstract.', 'start': 25415.586, 'duration': 4.803}, {'end': 25422.47, 'text': 'Abstract class is a type of class.', 'start': 25420.829, 'duration': 1.641}, {'end': 25425.491, 'text': 'So the class itself becomes an abstract class.', 'start': 25422.97, 'duration': 2.521}, {'end': 25432.512, 'text': 'One of the things to remember is that abstract class cannot be instantiated, but can be subclassed.', 'start': 25426.111, 'duration': 6.401}, {'end': 25437.213, 'text': 'Remember we talked about the concept of subclass and the parent class when we talked about inheritance.', 'start': 25432.852, 'duration': 4.361}, {'end': 25444.515, 'text': 'So if you make a class as abstract class, you cannot call the constructor of the class because you cannot instantiate it,', 'start': 25437.713, 'duration': 6.802}, {'end': 25448.816, 'text': 'but you can extend the abstract class and create a child class out of it.', 'start': 25444.515, 'duration': 4.301}, {'end': 25450.656, 'text': "That's the concept of abstract class.", 'start': 25449.216, 'duration': 1.44}, {'end': 25452.967, 'text': 'Another concept is abstract method.', 'start': 25451.246, 'duration': 1.721}, {'end': 25455.949, 'text': 'You can also use the abstract keyword in front of a method.', 'start': 25453.047, 'duration': 2.902}, {'end': 25464.015, 'text': 'And when you use abstract keyword in front of a method, then that method is only declared without an implementation.', 'start': 25456.229, 'duration': 7.786}, {'end': 25470.019, 'text': "You are not going to provide any implementation of the method and you're just going to declare the method.", 'start': 25464.315, 'duration': 5.704}, {'end': 25471.04, 'text': 'Something like this.', 'start': 25470.339, 'duration': 0.701}, {'end': 25474.042, 'text': 'We will see a similar example in the hands-on as well.', 'start': 25471.58, 'duration': 2.462}, {'end': 25477.144, 'text': "But that's the basic idea that you just declare the method.", 'start': 25474.262, 'duration': 2.882}, {'end': 25484.042, 'text': "you are not providing an implementation as to what does move to method actually does, because that's the whole concept of abstraction.", 'start': 25477.58, 'duration': 6.462}, {'end': 25492.104, 'text': 'And it is the responsibility of the child classes, which inherit the particular class in which the abstract method would be sitting.', 'start': 25484.402, 'duration': 7.702}, {'end': 25500.086, 'text': 'So that child class will be having the responsibility to provide a concrete implementation of the declared method.', 'start': 25492.544, 'duration': 7.542}, {'end': 25502.687, 'text': "Let's understand this better with the help of an example.", 'start': 25500.366, 'duration': 2.321}, {'end': 25510.632, 'text': 'So here I have created a class called graphic object, and I have made the class as abstract class.', 'start': 25503.107, 'duration': 7.525}, {'end': 25517.057, 'text': 'This is the keyword which you need to use in front before the class keyword, and the class becomes an abstract class.', 'start': 25511.152, 'duration': 5.905}, {'end': 25521.08, 'text': 'Now, when you create an abstract class, it automatically gets some properties.', 'start': 25517.657, 'duration': 3.423}, {'end': 25528.145, 'text': 'The first property is that this particular class must have at least one abstract method.', 'start': 25521.52, 'duration': 6.625}, {'end': 25530.667, 'text': 'and this is how you define the abstract methods,', 'start': 25528.145, 'duration': 2.522}, {'end': 25536.672, 'text': 'where you just provide the declaration but you do not provide the implementation of the draw method or the resize method.', 'start': 25530.667, 'duration': 6.005}, {'end': 25544.337, 'text': 'the way you will create the abstract methods is by using the abstract keyword before the actual method declaration starts.', 'start': 25537.216, 'duration': 7.121}, {'end': 25552.099, 'text': 'so general method declaration would look like this, and if you use abstract in front of it, this becomes an abstract method declaration.', 'start': 25544.337, 'duration': 7.762}, {'end': 25554.759, 'text': 'abstract class can also have concrete methods.', 'start': 25552.099, 'duration': 2.66}, {'end': 25560.6, 'text': 'so that is the liberty which abstract class gives you, that you can have abstract methods which are just declared,', 'start': 25554.759, 'duration': 5.841}, {'end': 25566.521, 'text': 'but you can also have normal methods which are which where you can also provide the implementation.', 'start': 25560.6, 'duration': 5.921}, {'end': 25571.165, 'text': 'So you can have normal methods and abstract methods as well in an abstract class.', 'start': 25566.823, 'duration': 4.342}, {'end': 25573.385, 'text': 'So this is the abstract class.', 'start': 25572.005, 'duration': 1.38}, {'end': 25580.888, 'text': 'Now if you want to provide an implementation of the draw and resize method you have to extend this abstract class.', 'start': 25573.866, 'duration': 7.022}, {'end': 25588.591, 'text': 'So we extend this abstract class by creating two child classes out of this particular abstract class, which is circle.java.', 'start': 25581.368, 'duration': 7.223}, {'end': 25589.211, 'text': 'where you can see,', 'start': 25588.591, 'duration': 0.62}, {'end': 25600.549, 'text': "I create a normal class and I use the extends keyword for inheritance and I'm saying that circle class is inheriting from the graphic object class which was my abstract class.", 'start': 25589.211, 'duration': 11.338}, {'end': 25608.993, 'text': 'and once i use this extends keyword, then i have the responsibility of providing the implementation of the abstract methods.', 'start': 25600.549, 'duration': 8.444}, {'end': 25616.696, 'text': 'actually, java will force me to provide the implementation of these two methods if i do not provide all the declared methods.', 'start': 25608.993, 'duration': 7.703}, {'end': 25618.337, 'text': 'so there are two declared methods here.', 'start': 25616.696, 'duration': 1.641}, {'end': 25625.69, 'text': 'so if the circuit class does not provide the implementation for both draw and resize methods,', 'start': 25618.337, 'duration': 7.353}, {'end': 25633.758, 'text': 'then java will throw an error and it will ask you to take an action which can be either define all the methods,', 'start': 25625.69, 'duration': 8.068}, {'end': 25640.384, 'text': 'meaning provide implementation for all the methods, or make the circle class itself as abstract.', 'start': 25633.758, 'duration': 6.626}, {'end': 25644.047, 'text': "let's see if i just comment this particular out, i get an error.", 'start': 25640.384, 'duration': 3.663}, {'end': 25646.99, 'text': 'you see a red line here and if you click on this particular balloon here,', 'start': 25644.047, 'duration': 2.943}, {'end': 25654.238, 'text': 'It will say either you can add the unimplemented methods or you can make the circle type as abstract.', 'start': 25647.495, 'duration': 6.743}, {'end': 25657.34, 'text': 'These are the two options which you will get to fix this particular error.', 'start': 25654.358, 'duration': 2.982}, {'end': 25665.444, 'text': 'So an abstract class can be extended by another abstract class if the child abstract class is not implementing all the methods of the parent.', 'start': 25657.74, 'duration': 7.704}, {'end': 25670.787, 'text': 'If you want to implement all the methods, then just implement them and keep it as a normal class.', 'start': 25665.944, 'duration': 4.843}, {'end': 25672.307, 'text': "And that's what I've done here.", 'start': 25671.267, 'duration': 1.04}, {'end': 25675.489, 'text': "I've just created a normal class here and provided the implementation.", 'start': 25672.327, 'duration': 3.162}, {'end': 25679.407, 'text': 'And once you provide the implementation of both of the methods, the error is gone.', 'start': 25675.925, 'duration': 3.482}, {'end': 25687.75, 'text': "Similarly, I've also provided another child class because there can be multiple children of a particular parent.", 'start': 25679.867, 'duration': 7.883}, {'end': 25690.931, 'text': 'So rectangle also extends from the graphic object.', 'start': 25688.19, 'duration': 2.741}, {'end': 25695.013, 'text': 'And it also provides its own implementation of drawing and resize.', 'start': 25691.492, 'duration': 3.521}, {'end': 25702.682, 'text': 'Because generally, the way you will draw a rectangle and you resize a rectangle will be different than drawing or resizing a circle.', 'start': 25695.433, 'duration': 7.249}, {'end': 25706.404, 'text': "Here I'm not doing anything in the methods because this is just to show you the demonstration.", 'start': 25702.922, 'duration': 3.482}, {'end': 25717.271, 'text': "I'm just printing a sysout saying drawing a rectangle and resizing a rectangle and in the circle class drawing a circle and resizing a circle.", 'start': 25706.424, 'duration': 10.847}, {'end': 25723.975, 'text': 'So one abstract class is the parent class, which is the graphic object, and two children, circle and rectangle,', 'start': 25717.631, 'duration': 6.344}, {'end': 25730.341, 'text': 'both providing the implementation of the abstract methods which were declared in the base class.', 'start': 25723.975, 'duration': 6.366}], 'summary': 'Abstraction in programming simplifies user interaction and implementation through classes and methods.', 'duration': 387.907, 'max_score': 25342.434, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ25342434.jpg'}, {'end': 25437.213, 'src': 'embed', 'start': 25410.483, 'weight': 3, 'content': [{'end': 25415.246, 'text': 'Now, abstract is a keyword which can be used in front of a class or a method.', 'start': 25410.483, 'duration': 4.763}, {'end': 25420.389, 'text': 'When you use it in front of a class, the whole class becomes abstract.', 'start': 25415.586, 'duration': 4.803}, {'end': 25422.47, 'text': 'Abstract class is a type of class.', 'start': 25420.829, 'duration': 1.641}, {'end': 25425.491, 'text': 'So the class itself becomes an abstract class.', 'start': 25422.97, 'duration': 2.521}, {'end': 25432.512, 'text': 'One of the things to remember is that abstract class cannot be instantiated, but can be subclassed.', 'start': 25426.111, 'duration': 6.401}, {'end': 25437.213, 'text': 'Remember we talked about the concept of subclass and the parent class when we talked about inheritance.', 'start': 25432.852, 'duration': 4.361}], 'summary': "Using 'abstract' before a class makes it an abstract class, which cannot be instantiated but can be subclassed.", 'duration': 26.73, 'max_score': 25410.483, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ25410483.jpg'}, {'end': 25687.75, 'src': 'embed', 'start': 25654.358, 'weight': 4, 'content': [{'end': 25657.34, 'text': 'These are the two options which you will get to fix this particular error.', 'start': 25654.358, 'duration': 2.982}, {'end': 25665.444, 'text': 'So an abstract class can be extended by another abstract class if the child abstract class is not implementing all the methods of the parent.', 'start': 25657.74, 'duration': 7.704}, {'end': 25670.787, 'text': 'If you want to implement all the methods, then just implement them and keep it as a normal class.', 'start': 25665.944, 'duration': 4.843}, {'end': 25672.307, 'text': "And that's what I've done here.", 'start': 25671.267, 'duration': 1.04}, {'end': 25675.489, 'text': "I've just created a normal class here and provided the implementation.", 'start': 25672.327, 'duration': 3.162}, {'end': 25679.407, 'text': 'And once you provide the implementation of both of the methods, the error is gone.', 'start': 25675.925, 'duration': 3.482}, {'end': 25687.75, 'text': "Similarly, I've also provided another child class because there can be multiple children of a particular parent.", 'start': 25679.867, 'duration': 7.883}], 'summary': 'Options for fixing error: extend abstract class, implement all methods, provide implementation in normal class, error resolved', 'duration': 33.392, 'max_score': 25654.358, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ25654358.jpg'}], 'start': 23984.401, 'title': 'Java inheritance and abstraction', 'summary': 'Covers the understanding of inheritance, including the is-a relationship, parent-child class relationship, and hierarchical nature, along with encapsulation and abstraction in java. it includes basics, usage of keywords, access modifiers, encapsulation through private properties, encapsulation and abstraction implementation, instantiation of abstract classes, and limitations of multiple inheritance.', 'chapters': [{'end': 24239.382, 'start': 23984.401, 'title': 'Understanding inheritance in java', 'summary': 'Explains the concept of inheritance in java, emphasizing the is-a relationship, the parent-child class relationship, and the hierarchical nature of inheritance, using a bicycle example to illustrate the concept.', 'duration': 254.981, 'highlights': ["Inheritance is identified through the is-a relationship, such as 'car is a vehicle' or 'savings account is a type of account', indicating a relationship between different entities, guiding the usage of inheritance.", 'Inheritance involves a parent-child class relationship, where the child class inherits properties and behaviors from the parent or base class, extending the parent class to create a hierarchical structure.', 'The hierarchical nature of inheritance allows for multiple levels of children classes, forming an inheritance hierarchy that can be extended as deeply as required.', 'An example of a bicycle is used to demonstrate inheritance, showcasing how different types of bicycles share common properties while also having distinct features, highlighting the practical application of inheritance.']}, {'end': 24698.452, 'start': 24239.802, 'title': 'Java inheritance basics', 'summary': 'Explains the concept of inheritance in java, demonstrating how child classes inherit properties and methods from the base class, and the usage of the extends and super keywords, along with the impact of access modifiers such as protected, with examples and detailed explanations.', 'duration': 458.65, 'highlights': ['The chapter explains the concept of inheritance in Java, demonstrating how child classes inherit properties and methods from the base class.', 'The usage of the extends and super keywords is illustrated, showing how a child class can fulfill its responsibility to initialize the base class by taking all the arguments of the base class plus the child class in its constructor.', 'The impact of access modifiers such as protected is demonstrated, emphasizing the availability of protected properties in child classes and the impact of changing the access modifier from protected to private.']}, {'end': 25262.782, 'start': 24699.079, 'title': 'Java inheritance and encapsulation', 'summary': 'Covers the concepts of inheritance and encapsulation in java, including the implementation of encapsulation through private properties, public getters, and setters, with a focus on providing controlled access to class properties.', 'duration': 563.703, 'highlights': ['The concept of encapsulation in Java is explained through the use of private properties and public getters and setters.', 'The importance of encapsulation in protecting class properties and providing controlled access is emphasized, with examples of legitimate and illegitimate consumers of the class properties.', 'The process of creating public getter and setter methods is detailed, highlighting the naming convention and the use of these methods to provide controlled access to class properties.']}, {'end': 25573.385, 'start': 25262.782, 'title': 'Encapsulation and abstraction in java', 'summary': 'Covers the concept of encapsulation, providing an example of creating a perfect encapsulation in a class and then delves into the definition and implementation of abstraction in java using the abstract keyword, highlighting that an abstract class cannot be instantiated but can be subclassed and that an abstract method is only declared without an implementation, leaving the responsibility to provide a concrete implementation to the child classes.', 'duration': 310.603, 'highlights': ['The chapter covers the concept of encapsulation, providing an example of creating a perfect encapsulation in a class, and then delves into the definition and implementation of abstraction in Java using the abstract keyword.', 'The abstract keyword can be used in front of a class or a method, turning the whole class into an abstract class, which cannot be instantiated but can be subclassed, and declaring a method without an implementation, leaving the responsibility to provide a concrete implementation to the child classes.', 'An abstract class must have at least one abstract method, which is declared without an implementation using the abstract keyword, and it can also have concrete methods that can be implemented.', 'Abstraction involves hiding the internal details of an object from the outside world, providing a simple interface for interaction, and Java provides the concept implementation using the keyword abstract, which can be used in front of a class or a method.']}, {'end': 26137.656, 'start': 25573.866, 'title': 'Abstraction and inheritance in java', 'summary': 'Discusses the concept of abstraction in java, demonstrating the implementation of abstract classes, inheritance of methods in child classes, and the instantiation of abstract classes through inheritance. it also highlights the limitations of multiple inheritance in java and teases the upcoming topic of interfaces.', 'duration': 563.79, 'highlights': ['Java abstract classes must be extended by child classes to implement abstract methods; failure to do so results in a compilation error.', 'Inheritance in Java allows for the instantiation of child objects referencing the parent class, leading to the automatic invocation of the parent class constructor, even if not explicitly called.', 'Java does not support multiple inheritance with classes, but provides a workaround using interfaces, which will be discussed in the upcoming sessions.']}], 'duration': 2153.255, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ23984401.jpg', 'highlights': ['Inheritance involves a parent-child class relationship, extending the parent class to create a hierarchical structure.', 'The hierarchical nature of inheritance allows for multiple levels of children classes, forming an inheritance hierarchy.', 'The concept of encapsulation in Java is explained through the use of private properties and public getters and setters.', 'The abstract keyword can be used in front of a class or a method, turning the whole class into an abstract class.', 'Java abstract classes must be extended by child classes to implement abstract methods; failure to do so results in a compilation error.']}, {'end': 27234.816, 'segs': [{'end': 26168.568, 'src': 'embed', 'start': 26138.055, 'weight': 4, 'content': [{'end': 26143.859, 'text': 'The problem here is that all the car manufacturers are not working on a single contract.', 'start': 26138.055, 'duration': 5.804}, {'end': 26150.822, 'text': 'they are not respecting a single interface, which will create a poor user experience, because the users,', 'start': 26144.38, 'duration': 6.442}, {'end': 26156.504, 'text': 'whenever the users have to buy a new car or they have to switch from one manufacturer to other manufacturer,', 'start': 26150.822, 'duration': 5.682}, {'end': 26160.206, 'text': 'they are completely clueless as to how to drive that particular class,', 'start': 26156.504, 'duration': 3.702}, {'end': 26168.568, 'text': 'because the interface they were using in the previous car is completely different from the interface they are being shown in the other car,', 'start': 26160.206, 'duration': 8.362}], 'summary': 'Car manufacturers lack standardized interface, leading to poor user experience and confusion when switching cars.', 'duration': 30.513, 'max_score': 26138.055, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ26138055.jpg'}, {'end': 26271.2, 'src': 'embed', 'start': 26250.094, 'weight': 0, 'content': [{'end': 26260.25, 'text': 'But the basic idea is that when you create an interface in Java, you cannot write anything concrete in terms of the behavior of the interface.', 'start': 26250.094, 'duration': 10.156}, {'end': 26263.593, 'text': 'when i say behavior, always think of that as method.', 'start': 26260.25, 'duration': 3.343}, {'end': 26267.677, 'text': 'so you cannot define a concrete method in an interface.', 'start': 26263.593, 'duration': 4.084}, {'end': 26269.319, 'text': 'you can only declare methods.', 'start': 26267.677, 'duration': 1.642}, {'end': 26271.2, 'text': 'you can also declare constants.', 'start': 26269.319, 'duration': 1.881}], 'summary': 'In java, interfaces can only declare methods and constants, not define concrete methods.', 'duration': 21.106, 'max_score': 26250.094, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ26250094.jpg'}, {'end': 26518.826, 'src': 'embed', 'start': 26488.9, 'weight': 1, 'content': [{'end': 26497.663, 'text': 'after that, the moment you write this particular keyword here implements and that is how you will basically extend from the from the interface.', 'start': 26488.9, 'duration': 8.763}, {'end': 26500.617, 'text': 'you will use the implements bicycle keyword.', 'start': 26497.663, 'duration': 2.954}, {'end': 26503.798, 'text': 'here implements is the keyword and bicycle is the name of the interface.', 'start': 26500.617, 'duration': 3.181}, {'end': 26509.981, 'text': 'if you write this here, then java is going to force you to provide the implementation of these two methods.', 'start': 26503.798, 'duration': 6.183}, {'end': 26518.826, 'text': 'if i, if i do this, implements bicycle, and if i comment out these two methods, which is coming from the base class, it is going to give an error.', 'start': 26509.981, 'duration': 8.845}], 'summary': "In java, using the 'implements' keyword with an interface name forces implementation of its methods.", 'duration': 29.926, 'max_score': 26488.9, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ26488900.jpg'}, {'end': 26732.925, 'src': 'embed', 'start': 26706.584, 'weight': 2, 'content': [{'end': 26713.968, 'text': 'And in the next session we are going to have a look at the concept of multiple inheritance using interfaces.', 'start': 26706.584, 'duration': 7.384}, {'end': 26718.892, 'text': "let's get started with multiple inheritance in java using interfaces.", 'start': 26713.968, 'duration': 4.924}, {'end': 26719.773, 'text': 'if you remember,', 'start': 26718.892, 'duration': 0.881}, {'end': 26728.741, 'text': 'in the previous sessions i said that multiple inheritance is not possible in java and it is not possible because of the diamond problem,', 'start': 26719.773, 'duration': 8.968}, {'end': 26732.925, 'text': 'or simply put, a one child cannot have two parent classes.', 'start': 26728.741, 'duration': 4.184}], 'summary': 'The session discusses multiple inheritance using interfaces in java, addressing the diamond problem.', 'duration': 26.341, 'max_score': 26706.584, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ26706584.jpg'}, {'end': 27178.701, 'src': 'embed', 'start': 27151.523, 'weight': 3, 'content': [{'end': 27158.488, 'text': 'A child class will have only one concrete base class, but can have any number of interfaces being implemented from this particular class.', 'start': 27151.523, 'duration': 6.965}, {'end': 27159.809, 'text': "That's the basic property.", 'start': 27158.808, 'duration': 1.001}, {'end': 27170.076, 'text': 'And then in the main method, you can access any of the vehicle or two wheeler or bicycle interfaces methods and the classes methods as well,', 'start': 27160.251, 'duration': 9.825}, {'end': 27170.637, 'text': 'if you want to.', 'start': 27170.076, 'duration': 0.561}, {'end': 27178.701, 'text': 'So for example, if I want to just type this and if I just two dot here, I can access can drive as well.', 'start': 27170.877, 'duration': 7.824}], 'summary': 'A child class can implement multiple interfaces from a single base class, allowing access to various methods.', 'duration': 27.178, 'max_score': 27151.523, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ27151523.jpg'}], 'start': 26138.055, 'title': 'Java interfaces and inheritance', 'summary': 'Explains the concept of interface in java, highlighting key properties and restrictions, demonstrating the implementation through examples, discussing the use of interfaces and inheritance for applying methods in java classes, addressing the problem of multiple inheritance and its solution, and showcasing the implementation of multiple inheritance using interfaces in java.', 'chapters': [{'end': 26572.576, 'start': 26138.055, 'title': 'Interface in java', 'summary': 'Explains the concept of interface in java, emphasizing the need for a single contract for car manufacturers to ensure a consistent user experience, highlighting the key properties and restrictions of interfaces, and demonstrating the implementation of interfaces in java through an example.', 'duration': 434.521, 'highlights': ['Car manufacturers need a single contract for a consistent user interface, as the lack of a standard interface creates a poor user experience when switching between different cars.', 'Interfaces in Java define the specifications of how a class would act, can only contain constants, method declarations, and some default or static methods.', 'Interfaces are more restrictive than abstract classes, as they only allow the declaration of public static final variables and method declarations without concrete implementations.', "Java forces the implementation of interface methods in child classes, and the 'implements' keyword is used to extend from the interface.", "The 'override' annotation is used to indicate the method overriding from the base class, providing an implementation in the child class."]}, {'end': 26820.802, 'start': 26572.576, 'title': 'Java interfaces & inheritance', 'summary': 'Explains the implementation of apply break and speed up methods in a java class using interface and inheritance, and also discusses the problem of multiple inheritance in java due to the diamond problem and its solution using interfaces.', 'duration': 248.226, 'highlights': ['The implementation of apply break and speed up methods in a Java class using interface and inheritance', 'The problem of multiple inheritance in Java due to the diamond problem and its solution using interfaces']}, {'end': 27234.816, 'start': 26821.383, 'title': 'Java inheritance with interfaces', 'summary': 'Covers the implementation of multiple inheritance using interfaces in java, demonstrating how a child class can implement multiple interfaces but can only extend from one concrete base class, and the ability to access methods from both interfaces and classes in the main method.', 'duration': 413.433, 'highlights': ['A child class can implement multiple interfaces but can only extend from one concrete base class', 'Demonstration of accessing methods from both interfaces and classes in the main method', 'Illustration of applying brake and speeding up in the mountain bike class']}], 'duration': 1096.761, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ26138055.jpg', 'highlights': ['Interfaces in Java define the specifications of how a class would act, can only contain constants, method declarations, and some default or static methods.', "Java forces the implementation of interface methods in child classes, and the 'implements' keyword is used to extend from the interface.", 'The problem of multiple inheritance in Java due to the diamond problem and its solution using interfaces', 'A child class can implement multiple interfaces but can only extend from one concrete base class', 'Car manufacturers need a single contract for a consistent user interface, as the lack of a standard interface creates a poor user experience when switching between different cars.']}, {'end': 28441.146, 'segs': [{'end': 27271.024, 'src': 'embed', 'start': 27234.816, 'weight': 2, 'content': [{'end': 27236.277, 'text': 'Then I call mountain bike.', 'start': 27234.816, 'duration': 1.461}, {'end': 27244.152, 'text': 'dot can rotate two wheelers two wheels which is going to invoke the method which is defined in the two wheeler class,', 'start': 27236.71, 'duration': 7.442}, {'end': 27245.933, 'text': 'which is printing a simple sysout.', 'start': 27244.152, 'duration': 1.781}, {'end': 27247.614, 'text': 'so i get the same sysout here.', 'start': 27245.933, 'duration': 1.681}, {'end': 27252.795, 'text': 'this method is being invoked from the mountain bike object due to the concept of inheritance.', 'start': 27247.614, 'duration': 5.181}, {'end': 27258.652, 'text': 'similarly, when i say mountain bike dot can drive, The scan drive was declared in the interface vehicle.', 'start': 27252.795, 'duration': 5.857}, {'end': 27266.56, 'text': 'And then when Mountain Bike implemented this interface, Java forced it to provide a definition of this particular method.', 'start': 27258.952, 'duration': 7.608}, {'end': 27268.842, 'text': 'And this is a definition, which is again a sysout.', 'start': 27266.78, 'duration': 2.062}, {'end': 27271.024, 'text': 'And you can see that sysout being printed here.', 'start': 27269.162, 'duration': 1.862}], 'summary': 'Mountain bike invokes methods from two wheeler class and vehicle interface, illustrating inheritance and interface implementation in java.', 'duration': 36.208, 'max_score': 27234.816, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ27234816.jpg'}, {'end': 27696.208, 'src': 'embed', 'start': 27667.245, 'weight': 1, 'content': [{'end': 27670.208, 'text': 'This is the method signature, which is going to match the invocation.', 'start': 27667.245, 'duration': 2.963}, {'end': 27672.75, 'text': 'Java is going to do this matching automatically for you.', 'start': 27670.488, 'duration': 2.262}, {'end': 27678.314, 'text': 'And here, whatever logic you have written inside this particular method will get executed.', 'start': 27673.09, 'duration': 5.224}, {'end': 27679.535, 'text': 'So 10.5 into 20.5 returns 215.25.', 'start': 27678.334, 'duration': 1.201}, {'end': 27680.635, 'text': "And that's the output you get.", 'start': 27679.535, 'duration': 1.1}, {'end': 27691.545, 'text': 'so this is how you can use method overloading in java.', 'start': 27687.102, 'duration': 4.443}, {'end': 27696.208, 'text': 'this is a rather fairly simple example, but you can make it as complex as you want.', 'start': 27691.545, 'duration': 4.663}], 'summary': 'Java method overloading allows matching invocations, executing logic, and returning output, like 10.5 * 20.5 = 215.25.', 'duration': 28.963, 'max_score': 27667.245, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ27667245.jpg'}, {'end': 28153.781, 'src': 'embed', 'start': 28125.205, 'weight': 0, 'content': [{'end': 28129.587, 'text': 'But in case of base class, it was just setting the new value as the gear value.', 'start': 28125.205, 'duration': 4.382}, {'end': 28137.091, 'text': 'So for instance, if you supplied one here, the gear value becomes one, but here, if you supplied one, the gear value becomes three.', 'start': 28129.847, 'duration': 7.244}, {'end': 28141.413, 'text': 'Similarly, when you apply brake on the mountain bike class,', 'start': 28137.571, 'duration': 3.842}, {'end': 28148.418, 'text': 'whatever value you supply will be subtracted from the current speed and 10 would be subtracted even more.', 'start': 28141.413, 'duration': 7.005}, {'end': 28153.781, 'text': "so if the speed is, let's say, 50 and your decrement, you supply the decrement value as 10.", 'start': 28148.418, 'duration': 5.363}], 'summary': 'In the base class, setting gear value resulted in different outcomes. applying brake in the mountain bike class subtracted the supplied value and 10 more from the current speed.', 'duration': 28.576, 'max_score': 28125.205, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28125205.jpg'}, {'end': 28328.213, 'src': 'embed', 'start': 28304.032, 'weight': 4, 'content': [{'end': 28310.555, 'text': 'so here i have a bicycle reference, but the object is of mountain bike.', 'start': 28304.032, 'duration': 6.523}, {'end': 28311.476, 'text': 'remember this concept.', 'start': 28310.555, 'duration': 0.921}, {'end': 28315.418, 'text': 'this is this is called dynamic object binding concept or dynamic binding concept.', 'start': 28311.476, 'duration': 3.942}, {'end': 28318.349, 'text': 'Again, this might be asked in your interviews.', 'start': 28315.908, 'duration': 2.441}, {'end': 28322.63, 'text': "So here I'm initializing the mountain bike with a reference of bicycle.", 'start': 28318.789, 'duration': 3.841}, {'end': 28328.213, 'text': 'Remember, whatever is written on the right hand side will govern the variables and the methods usage.', 'start': 28322.851, 'duration': 5.362}], 'summary': 'Dynamic object binding concept: initializing mountain bike with bicycle reference.', 'duration': 24.181, 'max_score': 28304.032, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28304032.jpg'}], 'start': 27234.816, 'title': 'Java inheritance and method overloading', 'summary': 'Discusses inheritance, interfaces, method overloading, and method overriding in java. it covers the implementation of methods from interfaces, polymorphism, automatic matching of method signatures, and the differences between instance and static methods, cautioning against excessive method overloading and emphasizing dynamic binding concept in method overriding.', 'chapters': [{'end': 27271.024, 'start': 27234.816, 'title': 'Inheritance and interfaces in java', 'summary': "Discusses inheritance and interfaces in java, highlighting the invocation of methods from the two wheeler class and the implementation of methods from the interface vehicle, emphasizing the concept of inheritance and java's enforcement of method definition in interfaces.", 'duration': 36.208, 'highlights': ['The concept of inheritance is demonstrated through the invocation of methods from the two wheeler class and the mountain bike object, showcasing the relationship between classes and the ability to inherit methods. (Relevance: 5)', "The implementation of methods from the interface vehicle in the Mountain Bike class is emphasized, illustrating Java's enforcement of method definition in interfaces and the requirement for the Mountain Bike class to provide a definition for the declared method. (Relevance: 4)"]}, {'end': 27532.543, 'start': 27271.51, 'title': 'Java inheritance & method overloading', 'summary': 'Covers implementing multiple inheritance in java through interfaces, and discusses polymorphism and method overloading, which allows a method to take different forms by varying its arguments and return types.', 'duration': 261.033, 'highlights': ['The chapter covers implementing multiple inheritance in Java through interfaces.', 'Discusses polymorphism and method overloading in Java.', 'Method overloading allows a method to take different forms by varying its arguments and return types.']}, {'end': 27747.79, 'start': 27532.543, 'title': 'Java method overloading example', 'summary': 'Explains method overloading in java, demonstrating its automatic matching of method signatures based on the number and type of arguments supplied, with a caution against excessive use due to potential confusion and recommendations for better method naming practices.', 'duration': 215.247, 'highlights': ['Java automatically matches method signatures based on the number and type of arguments supplied, demonstrating this with examples of method overloading for integer and decimal values, resulting in clear outcomes such as 200, 6,000, and 215.25.', "Java's handling of overloaded methods leads to compilation errors if a matching method is not found, serving as a safeguard against invalid method invocations, ensuring code correctness and preventing runtime errors.", 'The chapter cautions against excessive use of method overloading, recommending explicit and understandable method names to enhance code readability and avoid confusion, especially when creating interfaces for third-party consumption.']}, {'end': 28035.464, 'start': 27747.79, 'title': 'Method overriding in java', 'summary': "Explains method overriding in java, highlighting the concept, its relation to inheritance, rules to follow, and differences between instance and static methods, emphasizing that it's not allowed to override a static method from the superclass in java.", 'duration': 287.674, 'highlights': ['Method overriding is used together with the concept of inheritance.', "It's not allowed to override a static method from the superclass in Java.", "The superclass's static method gets hidden if the subclass also defines the static method with the exact same signature."]}, {'end': 28441.146, 'start': 28035.724, 'title': 'Understanding method overriding in java', 'summary': 'Explains the concept of method overriding in java through the example of a bicycle and mountain bike classes, highlighting the differences in gear, speed, and braking logic between the parent and child classes, and demonstrates dynamic binding concept.', 'duration': 405.422, 'highlights': ['The mountain bike class overrides the gear, apply brake, and speed up methods from the base class, providing its own implementation for each, resulting in modified functionality.', 'Dynamic object binding is demonstrated by initializing the mountain bike with a reference of bicycle and accessing the gear and speed properties, showcasing inheritance phenomena.', 'The application of brakes and speeding up in the mountain bike class results in different outcomes compared to the bicycle class, showcasing the modified behavior through method overriding.']}], 'duration': 1206.33, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ27234816.jpg', 'highlights': ['The mountain bike class overrides the gear, apply brake, and speed up methods from the base class, providing its own implementation for each, resulting in modified functionality.', 'Java automatically matches method signatures based on the number and type of arguments supplied, demonstrating this with examples of method overloading for integer and decimal values, resulting in clear outcomes such as 200, 6,000, and 215.25.', 'The concept of inheritance is demonstrated through the invocation of methods from the two-wheeler class and the mountain bike object, showcasing the relationship between classes and the ability to inherit methods.', "The implementation of methods from the interface vehicle in the Mountain Bike class is emphasized, illustrating Java's enforcement of method definition in interfaces and the requirement for the Mountain Bike class to provide a definition for the declared method.", 'Dynamic object binding is demonstrated by initializing the mountain bike with a reference of bicycle and accessing the gear and speed properties, showcasing inheritance phenomena.']}, {'end': 29294.147, 'segs': [{'end': 28520.423, 'src': 'embed', 'start': 28494.963, 'weight': 2, 'content': [{'end': 28504.05, 'text': "Let's say you are building an employee management system for an organization and you want to maintain the employee numbers.", 'start': 28494.963, 'duration': 9.087}, {'end': 28507.213, 'text': 'For the first object, the employee number should be 1.', 'start': 28504.51, 'duration': 2.703}, {'end': 28509.975, 'text': 'For the second object, the employee number should be 2.', 'start': 28507.213, 'duration': 2.762}, {'end': 28512.637, 'text': 'For the third object, the employee number should be 3.', 'start': 28509.975, 'duration': 2.662}, {'end': 28513.457, 'text': 'So on so forth.', 'start': 28512.637, 'duration': 0.82}, {'end': 28520.423, 'text': 'So when you initialize all the employee objects, the last employee object has the final total employee count.', 'start': 28513.878, 'duration': 6.545}], 'summary': 'Building an employee management system with incrementing employee numbers.', 'duration': 25.46, 'max_score': 28494.963, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28494963.jpg'}, {'end': 28672.197, 'src': 'embed', 'start': 28643.979, 'weight': 1, 'content': [{'end': 28649.461, 'text': 'In those cases as well, you can use a particular member in that particular class and make that static.', 'start': 28643.979, 'duration': 5.482}, {'end': 28655.864, 'text': 'For example, in this case we have a bicycle class and we have a static variable which says number of bicycles.', 'start': 28649.781, 'duration': 6.083}, {'end': 28661.666, 'text': 'So every time you initialize the bicycle object, this number will be shared.', 'start': 28656.324, 'duration': 5.342}, {'end': 28665.895, 'text': 'And you can see, I mean, this is here, it is incrementing the number of bicycles.', 'start': 28662.153, 'duration': 3.742}, {'end': 28672.197, 'text': 'So every time you create the object, the ID becomes plus one to the previous count of the number of bicycles.', 'start': 28666.275, 'duration': 5.922}], 'summary': 'Using static variables in a class to track the number of bicycle objects created.', 'duration': 28.218, 'max_score': 28643.979, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28643979.jpg'}, {'end': 28703.375, 'src': 'embed', 'start': 28682.799, 'weight': 0, 'content': [{'end': 28692.426, 'text': 'So you can use the static keyword in front of a property of the class and make it a class level variable which will be tied to the class and not tied to the objects.', 'start': 28682.799, 'duration': 9.627}, {'end': 28695.489, 'text': 'You can also make the methods as static as well.', 'start': 28692.927, 'duration': 2.562}, {'end': 28698.651, 'text': 'And the same kind of rule will apply on the methods as well.', 'start': 28695.629, 'duration': 3.022}, {'end': 28703.375, 'text': 'that the methods will become will belong to the class instead of belonging to the objects.', 'start': 28698.651, 'duration': 4.724}], 'summary': 'Using the static keyword creates class-level variables and methods, not tied to objects.', 'duration': 20.576, 'max_score': 28682.799, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28682799.jpg'}, {'end': 28760.318, 'src': 'embed', 'start': 28719.093, 'weight': 4, 'content': [{'end': 28726.6, 'text': 'So you can just create that method as static, and any object which will call this method will get the latest count of the number of bicycles.', 'start': 28719.093, 'duration': 7.507}, {'end': 28734.047, 'text': 'You can also make these static variables as constants by putting the final modifier in front of it.', 'start': 28727.141, 'duration': 6.906}, {'end': 28740.213, 'text': 'So if a variable in a particular class is static and final both, then technically it becomes a constant.', 'start': 28734.352, 'duration': 5.861}, {'end': 28747.355, 'text': 'So these are some of the interesting use cases and constraints of the static methods and static variables.', 'start': 28740.593, 'duration': 6.762}, {'end': 28752.896, 'text': "There's also a thing called static block, which is just a code block, which you can write inside your class.", 'start': 28747.795, 'duration': 5.101}, {'end': 28755.177, 'text': 'And we will have a look at that example as well.', 'start': 28753.256, 'duration': 1.921}, {'end': 28760.318, 'text': "So let's shift to the IDE and let's have a look at how we can use this static keyword.", 'start': 28755.437, 'duration': 4.881}], 'summary': 'Static methods and variables can be made constant using final modifier.', 'duration': 41.225, 'max_score': 28719.093, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28719093.jpg'}, {'end': 28940.619, 'src': 'embed', 'start': 28911.433, 'weight': 3, 'content': [{'end': 28914.034, 'text': 'This is not a static way of accessing a member.', 'start': 28911.433, 'duration': 2.601}, {'end': 28922.178, 'text': 'So if you want to access a static member of a class, you should access it with the class name and not the object name.', 'start': 28914.154, 'duration': 8.024}, {'end': 28927.412, 'text': 'Why? Going back to my original definition that the static variables belong to class.', 'start': 28922.529, 'duration': 4.883}, {'end': 28929.393, 'text': 'They do not belong to object.', 'start': 28927.692, 'duration': 1.701}, {'end': 28935.636, 'text': "And that's why Java will warn you if you are not accessing the static variables via the class.", 'start': 28929.613, 'duration': 6.023}, {'end': 28938.478, 'text': 'Because they are supposed to be accessible via class.', 'start': 28935.857, 'duration': 2.621}, {'end': 28940.619, 'text': 'It will not give you a compilation error.', 'start': 28938.898, 'duration': 1.721}], 'summary': 'Access static class members using class name, not object name.', 'duration': 29.186, 'max_score': 28911.433, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28911433.jpg'}, {'end': 29067.989, 'src': 'embed', 'start': 29036.936, 'weight': 5, 'content': [{'end': 29040.678, 'text': 'The static methods will not be able to access the non-static variables.', 'start': 29036.936, 'duration': 3.742}, {'end': 29042.899, 'text': 'Count is a non-static variable.', 'start': 29041.298, 'duration': 1.601}, {'end': 29045.16, 'text': 'Count is a normal instance variable.', 'start': 29043.219, 'duration': 1.941}, {'end': 29051.464, 'text': 'So a normal instance variable, for that matter, name or age or address, nothing would be accessible here.', 'start': 29045.501, 'duration': 5.963}, {'end': 29054.702, 'text': "If I try to access, let's say I try to access name here.", 'start': 29051.88, 'duration': 2.822}, {'end': 29060.805, 'text': 'So if I just say sysout and I say name, it will also give me the same kind of error.', 'start': 29055.042, 'duration': 5.763}, {'end': 29067.989, 'text': 'If I go here, it gives me the exact same error because static method cannot access the non-static member variables of the class.', 'start': 29060.905, 'duration': 7.084}], 'summary': 'Static methods cannot access non-static variables. count is a non-static variable, and attempting to access non-static variables from within a static method will result in an error.', 'duration': 31.053, 'max_score': 29036.936, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29036936.jpg'}], 'start': 28441.146, 'title': 'Static keyword and variables in java', 'summary': 'Explains the static keyword, variables, and methods in java, illustrating their role in maintaining shared properties and common functionality among class instances, with practical examples and constraints. it also covers usage and limitations of static blocks, providing insights into unique identification of objects and accessing static variables via class name.', 'chapters': [{'end': 28682.361, 'start': 28441.146, 'title': 'Static keyword in java', 'summary': 'Explains the concept of the static keyword in java, demonstrating its use in maintaining shared properties across class instances and how it enables unique identification of objects, with practical examples and scenarios.', 'duration': 241.215, 'highlights': ['The static keyword in Java is used to define members that belong to the class, providing the same value across different objects, and enabling the sharing of a particular property amongst them.', 'Static variables can be used to uniquely identify objects, as demonstrated with the example of maintaining employee numbers in an organization, where each object needs to know the previous value to generate its unique number.', 'The example of the bicycle class illustrates the use of a static variable to maintain the count of bicycles, ensuring that each object created increments the count to generate its unique ID, similar to the scenario of employee numbers.']}, {'end': 29294.147, 'start': 28682.799, 'title': 'Static variables and methods in java', 'summary': 'Explains the concept of static variables and methods in java, highlighting use cases and constraints, such as sharing common functionality among objects, accessing static variables via class name, and the limitations of static methods in accessing non-static member variables. it also delves into the usage and limitations of static blocks, demonstrating their functionality through a code example.', 'duration': 611.348, 'highlights': ['Static Variables and Constants', 'Accessing Static Variables via Class Name', 'Limitations of Static Methods in Accessing Non-Static Member Variables', 'Usage and Limitations of Static Blocks']}], 'duration': 853.001, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ28441146.jpg', 'highlights': ['The static keyword in Java is used to define members that belong to the class, providing the same value across different objects, and enabling the sharing of a particular property amongst them.', 'The example of the bicycle class illustrates the use of a static variable to maintain the count of bicycles, ensuring that each object created increments the count to generate its unique ID, similar to the scenario of employee numbers.', 'Static variables can be used to uniquely identify objects, as demonstrated with the example of maintaining employee numbers in an organization, where each object needs to know the previous value to generate its unique number.', 'Accessing Static Variables via Class Name', 'Usage and Limitations of Static Blocks', 'Limitations of Static Methods in Accessing Non-Static Member Variables', 'Static Variables and Constants']}, {'end': 30678.08, 'segs': [{'end': 29414.822, 'src': 'embed', 'start': 29385.682, 'weight': 2, 'content': [{'end': 29389.504, 'text': 'Now, when we talk about nested classes, you will hear two different terms.', 'start': 29385.682, 'duration': 3.822}, {'end': 29398.869, 'text': 'Basically, nested classes are divided into two categories, which are static classes or static nested classes and non-static nested classes.', 'start': 29390.084, 'duration': 8.785}, {'end': 29403.492, 'text': 'Now, static nested classes are called simply static nested classes.', 'start': 29399.41, 'duration': 4.082}, {'end': 29409.057, 'text': 'And the non-static nested classes are called inner classes because they are non-static.', 'start': 29404.073, 'duration': 4.984}, {'end': 29410.819, 'text': 'They are just normal inner class.', 'start': 29409.217, 'duration': 1.602}, {'end': 29414.822, 'text': 'Exactly similar to the way we say a normal method and a static method.', 'start': 29411.339, 'duration': 3.483}], 'summary': 'Nested classes are divided into static and non-static categories, similar to normal and static methods.', 'duration': 29.14, 'max_score': 29385.682, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29385682.jpg'}, {'end': 29458.62, 'src': 'embed', 'start': 29429.954, 'weight': 8, 'content': [{'end': 29433.117, 'text': 'Now, there are some more drivers of why you would like to use it.', 'start': 29429.954, 'duration': 3.163}, {'end': 29441.711, 'text': 'One example is I gave you about the existence of an object within an object or, technically speaking, the existence of a class within a class,', 'start': 29433.607, 'duration': 8.104}, {'end': 29444.873, 'text': 'the whole house and kitchen analogy, which I just shared with you.', 'start': 29441.711, 'duration': 3.162}, {'end': 29451.316, 'text': 'But broadly, you will see three different reasons, these different reasons due to which you will be using nested classes.', 'start': 29445.173, 'duration': 6.143}, {'end': 29458.62, 'text': "First of all, it's a way to logically group all the related classes that are only used in one place.", 'start': 29451.797, 'duration': 6.823}], 'summary': 'Nested classes are used to logically group related classes in one place.', 'duration': 28.666, 'max_score': 29429.954, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29429954.jpg'}, {'end': 29531.584, 'src': 'embed', 'start': 29493.73, 'weight': 0, 'content': [{'end': 29501.995, 'text': 'or what you should expose and what you should not expose, because inner classes will also come with its own set of visibility constructs like private,', 'start': 29493.73, 'duration': 8.265}, {'end': 29502.955, 'text': 'protected, etc.', 'start': 29501.995, 'duration': 0.96}, {'end': 29512.101, 'text': 'So you get more fine grained control in terms of what you want to expose to the outside world collectively from the outer and the inner class.', 'start': 29503.235, 'duration': 8.866}, {'end': 29515.46, 'text': 'and it can lead to more readable and maintainable code.', 'start': 29512.759, 'duration': 2.701}, {'end': 29520.941, 'text': 'Though I would honestly say that this is debatable because in a lot of programming languages,', 'start': 29515.86, 'duration': 5.081}, {'end': 29524.902, 'text': 'static nested classes are not promoted because they drop readability.', 'start': 29520.941, 'duration': 3.961}, {'end': 29531.584, 'text': 'Imagine if you have 10 classes, if you have a single class and if you have a nested hierarchy of 10 classes.', 'start': 29525.302, 'duration': 6.282}], 'summary': 'Inner classes offer more control but may affect readability in nested hierarchy.', 'duration': 37.854, 'max_score': 29493.73, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29493730.jpg'}, {'end': 29696.363, 'src': 'embed', 'start': 29670.244, 'weight': 1, 'content': [{'end': 29675.027, 'text': 'We will see if we can access the static variables from the outside class or not.', 'start': 29670.244, 'duration': 4.783}, {'end': 29678.79, 'text': 'So that is what this system.out.println is doing.', 'start': 29675.548, 'duration': 3.242}, {'end': 29680.911, 'text': "I'm just accessing this directly.", 'start': 29679.15, 'duration': 1.761}, {'end': 29687.617, 'text': 'You can see, you can directly access the outer class static member variable inside the static nested inner class.', 'start': 29680.931, 'duration': 6.686}, {'end': 29696.363, 'text': 'then in the next statement i am accessing the outer private member, this one, so the outer private member, which is also static.', 'start': 29687.617, 'duration': 8.746}], 'summary': 'Demonstrating access of static variables in nested classes.', 'duration': 26.119, 'max_score': 29670.244, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29670244.jpg'}, {'end': 29952.083, 'src': 'embed', 'start': 29911.389, 'weight': 7, 'content': [{'end': 29919.011, 'text': "so that's all i want to cover in this particular session, where we talked about the nested classes concept, the static nested classes concepts,", 'start': 29911.389, 'duration': 7.622}, {'end': 29924.714, 'text': 'basically, and we also had a look at what the static nested class can access or cannot access.', 'start': 29919.011, 'duration': 5.703}, {'end': 29930.699, 'text': 'And we also saw how do we initialize an object of a static nested class.', 'start': 29925.174, 'duration': 5.525}, {'end': 29935.743, 'text': 'In the next session, we are going to talk about the second category of the nested classes,', 'start': 29931.119, 'duration': 4.624}, {'end': 29940.046, 'text': 'which is the normal inner classes or the non-static nested classes.', 'start': 29935.743, 'duration': 4.303}, {'end': 29943.009, 'text': "Let's get started with inner classes in Java.", 'start': 29940.367, 'duration': 2.642}, {'end': 29946.592, 'text': 'So in the previous session, we talked about the static nested classes.', 'start': 29943.289, 'duration': 3.303}, {'end': 29952.083, 'text': "And in today's session we are going to focus on the non-static nested classes.", 'start': 29947.112, 'duration': 4.971}], 'summary': 'Covered static nested classes, initialization, and next session on non-static nested classes in java.', 'duration': 40.694, 'max_score': 29911.389, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29911389.jpg'}, {'end': 30044.348, 'src': 'embed', 'start': 30017.696, 'weight': 11, 'content': [{'end': 30021.898, 'text': 'And let me comment this one out because I will cover this in a while.', 'start': 30017.696, 'duration': 4.202}, {'end': 30025.559, 'text': 'And let me fix an error here as well.', 'start': 30022.618, 'duration': 2.941}, {'end': 30027.099, 'text': 'So I will comment this as well.', 'start': 30025.879, 'duration': 1.22}, {'end': 30030.859, 'text': "Okay, so let's talk about the demo which I have prepared.", 'start': 30027.597, 'duration': 3.262}, {'end': 30034.361, 'text': "It's a very simplistic demo just to understand the concept.", 'start': 30030.979, 'duration': 3.382}, {'end': 30039.625, 'text': 'And please do practice all of these concepts in detail to get more confident about this.', 'start': 30034.742, 'duration': 4.883}, {'end': 30044.348, 'text': 'So I start defining a normal class, just naming it as outer class.', 'start': 30040.205, 'duration': 4.143}], 'summary': 'A demonstration of a simplistic demo for understanding the concept of defining a normal class.', 'duration': 26.652, 'max_score': 30017.696, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30017696.jpg'}, {'end': 30310.694, 'src': 'embed', 'start': 30283.464, 'weight': 4, 'content': [{'end': 30288.368, 'text': 'So this whole logic can be just embedded inside a particular method.', 'start': 30283.464, 'duration': 4.904}, {'end': 30292.272, 'text': 'And we call this type of class as method local inner classes.', 'start': 30288.628, 'duration': 3.644}, {'end': 30297.877, 'text': 'This is also a type of inner class, but this is just to show you that you can also create method local inner classes.', 'start': 30292.692, 'duration': 5.185}, {'end': 30299.891, 'text': "this is what i've done here.", 'start': 30298.55, 'duration': 1.341}, {'end': 30304.172, 'text': 'and if i, if i invoke this outer class method, what happens?', 'start': 30299.891, 'duration': 4.281}, {'end': 30305.292, 'text': "let's see that.", 'start': 30304.172, 'duration': 1.12}, {'end': 30310.694, 'text': 'so here i have written the code to simply initialize the outer class.', 'start': 30305.292, 'duration': 5.402}], 'summary': 'The transcript discusses embedding logic in a method and creating method local inner classes.', 'duration': 27.23, 'max_score': 30283.464, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30283464.jpg'}, {'end': 30427.188, 'src': 'embed', 'start': 30398.166, 'weight': 5, 'content': [{'end': 30405.411, 'text': 'but always first understand and discuss with your teammates as to if there is a way to avoid anonymous inner classes,', 'start': 30398.166, 'duration': 7.245}, {'end': 30407.072, 'text': 'because they are not very readable.', 'start': 30405.411, 'duration': 1.661}, {'end': 30409.934, 'text': 'But let me cover that as well as part of this curriculum.', 'start': 30407.232, 'duration': 2.702}, {'end': 30416.721, 'text': "So if you have to implement anonymous inner classes, let's first understand why do we need to implement anonymous inner classes.", 'start': 30410.276, 'duration': 6.445}, {'end': 30420.083, 'text': 'And I would like to do that with the help of a demonstration.', 'start': 30417.281, 'duration': 2.802}, {'end': 30427.188, 'text': 'So I have again created a simple interface of bicycle and I will create an implementation class called mountain bike.', 'start': 30420.503, 'duration': 6.685}], 'summary': 'Discuss with teammates to avoid anonymous inner classes, as they are not very readable. the transcript covers the need for implementing anonymous inner classes and includes a demonstration.', 'duration': 29.022, 'max_score': 30398.166, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30398166.jpg'}, {'end': 30516.854, 'src': 'embed', 'start': 30482.23, 'weight': 3, 'content': [{'end': 30485.431, 'text': 'You have already seen this when we were talking about interfaces session.', 'start': 30482.23, 'duration': 3.201}, {'end': 30493.714, 'text': "But what if you want to create an object of the bicycle class itself? You don't want to create a mountain bike class at all.", 'start': 30485.771, 'duration': 7.943}, {'end': 30499.309, 'text': 'Is there a way to avoid creating mountain bike class and still being able to write this logic?', 'start': 30494.167, 'duration': 5.142}, {'end': 30502.449, 'text': 'Yes, there is a way, and that is the anonymous inner way.', 'start': 30499.729, 'duration': 2.72}, {'end': 30508.351, 'text': 'So I can just say bicycle, bicycle equal to new bicycle.', 'start': 30502.81, 'duration': 5.541}, {'end': 30516.854, 'text': "If I say new bicycle, remember I'm not saying new mountain bike because mountain bike does not exist or I don't want to create mountain bike class.", 'start': 30508.751, 'duration': 8.103}], 'summary': 'You can create an object of the bicycle class using the anonymous inner way, avoiding the need to create a mountain bike class.', 'duration': 34.624, 'max_score': 30482.23, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30482230.jpg'}, {'end': 30602.682, 'src': 'embed', 'start': 30576.549, 'weight': 6, 'content': [{'end': 30582.653, 'text': 'It can be a simple use case, but try to create a child class or try to avoid writing anonymous inner classes if you can.', 'start': 30576.549, 'duration': 6.104}, {'end': 30585.415, 'text': 'If there is no way out, then this is the way you do it.', 'start': 30583.013, 'duration': 2.402}, {'end': 30590.693, 'text': "There's also a bit nicer way to do this using using lambda function for functional interfaces.", 'start': 30586.25, 'duration': 4.443}, {'end': 30597.859, 'text': 'But that is also something which will not improve the readability a lot, though it will make the code look smaller.', 'start': 30591.054, 'duration': 6.805}, {'end': 30602.682, 'text': 'So here you can write the exact logic which you want to write in can speed up and can apply break.', 'start': 30598.159, 'duration': 4.523}], 'summary': 'Recommend creating child class & avoiding anonymous inner classes. consider using lambda functions for functional interfaces for improved code readability.', 'duration': 26.133, 'max_score': 30576.549, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30576549.jpg'}], 'start': 29294.787, 'title': 'Nested and inner classes in java', 'summary': 'Covers the concept of nested and inner classes in java, including static and non-static nested classes, initialization of objects, accessibility to outer class members, and defining normal inner classes, method local inner classes, and anonymous inner classes. it emphasizes the reasons for using nested classes and discusses creating objects of interfaces using anonymous inner classes, along with drawbacks and alternative approaches.', 'chapters': [{'end': 29737.072, 'start': 29294.787, 'title': 'Nested classes in java', 'summary': 'Covers the concept of nested classes in java, explaining the need for nested classes, the types of nested classes (static and non-static), and the reasons for using nested classes, including logical grouping, encapsulation, and maintainable code; it also demonstrates a practical example of working with static nested classes.', 'duration': 442.285, 'highlights': ['Nested classes are used to logically group related classes that are only used in one place', 'Nested classes increase encapsulation and provide more fine-grained control over visibility constructs like private and protected', 'Static nested classes can lead to debatable improvements in readability and maintainability, especially in larger class hierarchies', 'Demonstration of accessing static variables from the outer class within a static nested inner class']}, {'end': 30039.625, 'start': 29737.272, 'title': 'Java inner and static nested classes', 'summary': 'Covers the concept of static and non-static nested classes in java, explaining how to initialize objects of static nested classes and the accessibility of static nested classes to outer class members. it also introduces the difference between static and non-static nested classes and emphasizes the need for practice to gain confidence in the concepts.', 'duration': 302.353, 'highlights': ['The chapter covers the concept of static and non-static nested classes in Java, explaining how to initialize objects of static nested classes and the accessibility of static nested classes to outer class members.', 'Emphasizes the need for practice to gain confidence in the concepts.', 'Introduction to the difference between static and non-static nested classes.']}, {'end': 30416.721, 'start': 30040.205, 'title': 'Java inner classes overview', 'summary': 'Explains how to define and initialize normal inner classes, method local inner classes, and anonymous inner classes in java, demonstrating the process and output of each type.', 'duration': 376.516, 'highlights': ['Method local inner class initialization and invocation', 'Normal inner class initialization and method invocation', 'Explanation of anonymous inner classes']}, {'end': 30678.08, 'start': 30417.281, 'title': 'Using anonymous inner classes in java', 'summary': 'Discusses creating an object of an interface using an anonymous inner class in java, emphasizing the drawbacks and recommending alternative approaches, with a comparison to using lambda functions for functional interfaces.', 'duration': 260.799, 'highlights': ['Creating an object of an interface using anonymous inner classes', 'Drawbacks of using anonymous inner classes', 'Comparison to using lambda functions for functional interfaces']}], 'duration': 1383.293, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ29294787.jpg', 'highlights': ['Nested classes increase encapsulation and provide more fine-grained control over visibility constructs like private and protected', 'Demonstration of accessing static variables from the outer class within a static nested inner class', 'Introduction to the difference between static and non-static nested classes', 'Creating an object of an interface using anonymous inner classes', 'Method local inner class initialization and invocation', 'Drawbacks of using anonymous inner classes', 'Comparison to using lambda functions for functional interfaces', 'Covers the concept of nested and inner classes in Java, including static and non-static nested classes, initialization of objects, accessibility to outer class members, and defining normal inner classes, method local inner classes, and anonymous inner classes', 'Emphasizes the reasons for using nested classes and discusses creating objects of interfaces using anonymous inner classes, along with drawbacks and alternative approaches', 'Static nested classes can lead to debatable improvements in readability and maintainability, especially in larger class hierarchies', 'The chapter covers the concept of static and non-static nested classes in Java, explaining how to initialize objects of static nested classes and the accessibility of static nested classes to outer class members', 'Emphasizes the need for practice to gain confidence in the concepts']}, {'end': 32725.813, 'segs': [{'end': 30703.144, 'src': 'embed', 'start': 30678.28, 'weight': 0, 'content': [{'end': 30684.402, 'text': "Yep So that's the basic construct of anonymous inner classes that you can use the interface instantiation.", 'start': 30678.28, 'duration': 6.122}, {'end': 30686.803, 'text': 'If you do not want to create a child class of it,', 'start': 30684.562, 'duration': 2.241}, {'end': 30696.319, 'text': 'just instantiate the interface and Java will automatically generate the concrete override implementation for all the methods which are declared in your interface,', 'start': 30686.803, 'duration': 9.516}, {'end': 30699.361, 'text': 'and then you can provide the implementation of those methods inline.', 'start': 30696.319, 'duration': 3.042}, {'end': 30702.003, 'text': "And that's all I want to cover for this particular session.", 'start': 30699.761, 'duration': 2.242}, {'end': 30703.144, 'text': 'So we cover a whole lot.', 'start': 30702.063, 'duration': 1.081}], 'summary': 'Anonymous inner classes allow interface instantiation, java generates method overrides, and inline method implementation.', 'duration': 24.864, 'max_score': 30678.28, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30678280.jpg'}, {'end': 30799.18, 'src': 'embed', 'start': 30773.173, 'weight': 1, 'content': [{'end': 30780.978, 'text': "And that's the concept basically which Java packages try to put you or give you to implement in your programming language and your project as well.", 'start': 30773.173, 'duration': 7.805}, {'end': 30786.362, 'text': "So it's a logical way of grouping related classes and types together.", 'start': 30781.318, 'duration': 5.044}, {'end': 30787.963, 'text': "That's what packages do.", 'start': 30786.682, 'duration': 1.281}, {'end': 30799.18, 'text': 'And if I take you back to the Eclipse IDE, before I go any further, you will see all these square looking objects, right? These all are packages.', 'start': 30788.476, 'duration': 10.704}], 'summary': 'Java packages group related classes and types in a logical way, as seen in eclipse ide.', 'duration': 26.007, 'max_score': 30773.173, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30773173.jpg'}, {'end': 31349.27, 'src': 'embed', 'start': 31322.314, 'weight': 3, 'content': [{'end': 31326.395, 'text': 'But when you use it for for loops, it will require you to write a lot of code.', 'start': 31322.314, 'duration': 4.081}, {'end': 31331.397, 'text': 'Recursion will reduce the number of lines you need to write and manage in your code.', 'start': 31326.756, 'duration': 4.641}, {'end': 31340.941, 'text': 'But on the other side, recursion can get a bit complex because it requires an advanced understanding of how methods actually work in Java.', 'start': 31331.657, 'duration': 9.284}, {'end': 31349.27, 'text': 'Before I go any further, understand that methods, whatever you define inside the method, that goes onto a stack.', 'start': 31342.048, 'duration': 7.222}], 'summary': 'Recursion reduces code lines, but needs advanced java understanding.', 'duration': 26.956, 'max_score': 31322.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ31322314.jpg'}, {'end': 31515.558, 'src': 'embed', 'start': 31492.446, 'weight': 4, 'content': [{'end': 31499.949, 'text': 'Now, the first thing which you need to do when you write a recursion function is to know the exit condition.', 'start': 31492.446, 'duration': 7.503}, {'end': 31504.011, 'text': 'That is probably the most important concept when you write recursion.', 'start': 31500.249, 'duration': 3.762}, {'end': 31506.692, 'text': 'You should know when to end the program.', 'start': 31504.291, 'duration': 2.401}, {'end': 31511.174, 'text': 'If you get it wrong, then your program will be stuck into an infinite loop.', 'start': 31506.992, 'duration': 4.182}, {'end': 31515.558, 'text': 'and it will only exit when there would be a stack overflow.', 'start': 31511.576, 'duration': 3.982}], 'summary': 'Recursion functions must have an exit condition to avoid infinite loops and stack overflow.', 'duration': 23.112, 'max_score': 31492.446, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ31492446.jpg'}, {'end': 32471.018, 'src': 'embed', 'start': 32446.794, 'weight': 5, 'content': [{'end': 32455.822, 'text': 'Remember that concept that in Java, every argument which you pass to a method is passed by value and not by reference in simple language.', 'start': 32446.794, 'duration': 9.028}, {'end': 32463.609, 'text': 'What does it mean is that when you pass this particular argument, a copy of this particular argument is a copy of this particular variable.', 'start': 32455.862, 'duration': 7.747}, {'end': 32466.357, 'text': 'is passed to the method argument.', 'start': 32463.996, 'duration': 2.361}, {'end': 32468.337, 'text': "it's not the exact same variable.", 'start': 32466.357, 'duration': 1.98}, {'end': 32471.018, 'text': 'we are not passing the same reference of i here.', 'start': 32468.337, 'duration': 2.681}], 'summary': 'In java, every method argument is passed by value, not by reference.', 'duration': 24.224, 'max_score': 32446.794, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ32446794.jpg'}], 'start': 30678.28, 'title': 'Java inner classes, packages, recursion, and method calling', 'summary': 'Covers java inner classes, packages, recursion, and method calling. it includes details on anonymous inner classes, instantiation, automatic generation of concrete override implementation for methods, introduction to packages, logical grouping of classes and types, creating packages, naming conventions, benefits of using packages, recursion basics, use cases, method calling, defining exit conditions, camel casing convention, use of arguments, return statements, and pass by value in java method calling.', 'chapters': [{'end': 30772.873, 'start': 30678.28, 'title': 'Java inner classes & packages', 'summary': 'Covers the concept of anonymous inner classes, including instantiation and automatic generation of concrete override implementation for methods, along with an introduction to the concept of packages in java, focusing on their definition and purpose.', 'duration': 94.593, 'highlights': ['The chapter covers the concept of anonymous inner classes, including instantiation and automatic generation of concrete override implementation for methods.', 'Introduction to the concept of packages in Java, focusing on their definition and purpose.', 'A package is basically a grouping of related types such as classes, interfaces, abstract classes, nested classes, etc.', 'The concept of packages is compared to how one arranges items in a house or office, emphasizing the idea of keeping similar items together.']}, {'end': 31251.919, 'start': 30773.173, 'title': 'Java packages overview', 'summary': 'Explains the concept of java packages, detailing the logical grouping of classes and types, the process of creating packages, naming conventions, and the benefits of using packages, emphasizing the importance of package naming for readability and maintainability, and the advantages of restricting class visibility within packages.', 'duration': 478.746, 'highlights': ['Packages provide a logical way of grouping related classes and types together, enhancing readability and maintainability.', 'Naming packages following the convention of reversing the domain name of the application, and ensuring that the package names reflect the specific functionality, improves readability and aids in understanding the code for future developers.', "Restricting the visibility of classes within a package by using access modifiers like 'package private' helps to avoid ambiguity and confusion in large projects with similar class names."]}, {'end': 31492.096, 'start': 31252.239, 'title': 'Recursion in java: basics and use cases', 'summary': 'Introduces the concept of recursion in java, emphasizing its use cases such as calculating factorials and fibonacci series, and highlights the trade-offs between recursion and for loops in terms of code complexity and efficiency.', 'duration': 239.857, 'highlights': ['Recursion reduces the number of lines needed and code management, but requires an advanced understanding of Java methods.', 'Recursion follows the stack insertion and removal concept, similar to method execution in Java.', 'Recursion can be used to calculate factorials and Fibonacci series by repeating specific operations on the sequence.']}, {'end': 32047.558, 'start': 31492.446, 'title': 'Recursion and method calling in java', 'summary': 'Explains the importance of defining an exit condition when writing a recursive function, using the example of calculating the factorial of a number, and then delves into the basics of method calling in java, emphasizing the syntax and access modifiers for defining methods.', 'duration': 555.112, 'highlights': ['The importance of defining an exit condition when writing a recursive function is emphasized, as failing to do so can lead to an infinite loop and eventually a stack overflow, causing the program to crash.', 'The explanation of the factorial calculation process using recursion, with a detailed breakdown of how the function calls are stacked and unpacked, leading to the final result of 120 for the factorial of 5, serves as a practical illustration of the recursive process.', 'The basics of method calling in Java are outlined, including the syntax for defining methods, the use of access modifiers, and the concept of void as the return type for methods that do not return a value, demonstrated within a simple class structure with properties, constructor, and methods.']}, {'end': 32725.813, 'start': 32047.958, 'title': 'Java methods and method calling', 'summary': 'Discusses the camel casing convention for method names, the use of arguments in methods, the importance of writing methods to avoid repetitive code, the significance of return statements, and the concept of pass by value in java method calling.', 'duration': 677.855, 'highlights': ['The concept of pass by value is explained, emphasizing that every argument passed to a method in Java is passed by value and not by reference.', 'The importance of writing methods to avoid repetitive code is emphasized, with an example of calculating interest rates at multiple places in an application and the benefit of creating a single method for reuse.', 'The use of return statements in Java methods is discussed, highlighting the requirement to match the return type and the data type of the returned value, with examples of compilation errors due to mismatched types.']}], 'duration': 2047.533, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ30678280.jpg', 'highlights': ['The chapter covers the concept of anonymous inner classes, including instantiation and automatic generation of concrete override implementation for methods.', 'Introduction to the concept of packages in Java, focusing on their definition and purpose.', 'Packages provide a logical way of grouping related classes and types together, enhancing readability and maintainability.', 'Recursion reduces the number of lines needed and code management, but requires an advanced understanding of Java methods.', 'The importance of defining an exit condition when writing a recursive function is emphasized, as failing to do so can lead to an infinite loop and eventually a stack overflow, causing the program to crash.', 'The concept of pass by value is explained, emphasizing that every argument passed to a method in Java is passed by value and not by reference.']}, {'end': 34359.672, 'segs': [{'end': 32749.337, 'src': 'embed', 'start': 32726.213, 'weight': 0, 'content': [{'end': 32733.58, 'text': "And if I run this program now, remember I'm calling a different method now, which is going to create a new object and then change the value.", 'start': 32726.213, 'duration': 7.367}, {'end': 32738.803, 'text': 'I do get the same effect, but now my previous object John is not touched at all.', 'start': 32733.996, 'duration': 4.807}, {'end': 32740.144, 'text': 'It is safe and sound.', 'start': 32739.003, 'duration': 1.141}, {'end': 32744.631, 'text': 'I can reuse this John object anywhere in my method in my application,', 'start': 32740.385, 'duration': 4.246}, {'end': 32749.337, 'text': 'and I can be assured that nothing is changing in terms of the state of the object.', 'start': 32744.631, 'duration': 4.706}], 'summary': 'Using a different method creates a new object, ensuring the original object remains unchanged.', 'duration': 23.124, 'max_score': 32726.213, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ32726213.jpg'}, {'end': 32857.525, 'src': 'embed', 'start': 32827.398, 'weight': 1, 'content': [{'end': 32830.981, 'text': 'And you see it has a long hierarchy of different classes here.', 'start': 32827.398, 'duration': 3.583}, {'end': 32834.203, 'text': 'This is also an inheritance hierarchy, just to give you context.', 'start': 32831.321, 'duration': 2.882}, {'end': 32838.82, 'text': 'And the whole exception framework hierarchy starts with a class called throwable.', 'start': 32834.718, 'duration': 4.102}, {'end': 32846.622, 'text': 'So throwable is the class which is the root or the parent class of handling all types of exceptions and errors.', 'start': 32839.339, 'duration': 7.283}, {'end': 32849.123, 'text': "And that's where the next differentiation comes.", 'start': 32847.182, 'duration': 1.941}, {'end': 32850.964, 'text': 'Exceptions and errors.', 'start': 32849.583, 'duration': 1.381}, {'end': 32853.644, 'text': 'Java treats these two things differently.', 'start': 32851.523, 'duration': 2.121}, {'end': 32857.525, 'text': 'And I will go in detail as to what is an exception and what is an error.', 'start': 32854.023, 'duration': 3.502}], 'summary': 'Java exception framework hierarchy starts with class throwable, differentiates exceptions and errors.', 'duration': 30.127, 'max_score': 32827.398, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ32827398.jpg'}, {'end': 33551.723, 'src': 'embed', 'start': 33524.353, 'weight': 2, 'content': [{'end': 33529.496, 'text': 'So this is a quick tour of different types of exception and including this exception hierarchy.', 'start': 33524.353, 'duration': 5.143}, {'end': 33534.318, 'text': "Let's get started with exception handling in Java using try and catch blocks.", 'start': 33529.836, 'duration': 4.482}, {'end': 33539.661, 'text': 'So in the previous session, we had a look at the scenarios where an exception can occur.', 'start': 33534.959, 'duration': 4.702}, {'end': 33547.26, 'text': "How do we see that there's a runtime exception or there's a checked exception or there's an unchecked exception or there is a custom exception.", 'start': 33540.216, 'duration': 7.044}, {'end': 33551.723, 'text': 'Now, we did not talk about how to handle those exceptions.', 'start': 33548, 'duration': 3.723}], 'summary': 'Overview of exception handling in java, covering types of exceptions and the need for handling them.', 'duration': 27.37, 'max_score': 33524.353, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ33524353.jpg'}, {'end': 33596.096, 'src': 'embed', 'start': 33563.25, 'weight': 3, 'content': [{'end': 33567.212, 'text': 'So try catch block is basically a bunch of syntax which you have to follow.', 'start': 33563.25, 'duration': 3.962}, {'end': 33576.568, 'text': 'to handle different types of exceptions in your programming code, and the syntax of the try catch block is pretty straightforward.', 'start': 33567.725, 'duration': 8.843}, {'end': 33586.092, 'text': 'you write try and you put curly braces and then you write whatever code which might throw an exception.', 'start': 33576.568, 'duration': 9.524}, {'end': 33596.096, 'text': "you don't know that, but it's always safer to enclose your code in a try catch block so that you know that if an exception occurs in the try block,", 'start': 33586.092, 'duration': 10.004}], 'summary': 'Try catch block handles exceptions in programming code with straightforward syntax.', 'duration': 32.846, 'max_score': 33563.25, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ33563250.jpg'}], 'start': 32726.213, 'title': 'Java exception handling', 'summary': 'Covers best practices for object mutation in java methods, the concept of exceptions in java, exception types and handling, and demonstrates nested try-catch structures, providing a comprehensive understanding of java exception handling and its practical application.', 'chapters': [{'end': 32768.42, 'start': 32726.213, 'title': 'Java method best practices', 'summary': 'Discusses the best practice of creating a new object when mutating or changing the state of an object in java methods, ensuring the original object remains unchanged and can be reused throughout the application.', 'duration': 42.207, 'highlights': ['Creating a new object inside a method when intending to mutate or change the state ensures the original object remains untouched and can be reused throughout the application.', 'Following this practice ensures safety and integrity of the original object, providing reassurance that the state of the object remains unchanged.', 'It is recommended to always create a new copy of the object inside a method when the intention is to mutate or change the state of the object.']}, {'end': 33098.884, 'start': 32768.58, 'title': 'Java exceptions overview', 'summary': 'Explains the concept of exceptions in java, including the need for exception handling, the hierarchy of the java exception framework, the differentiation between exceptions and errors, and provides an example of a runtime exception with detailed explanation and an exception stack trace.', 'duration': 330.304, 'highlights': ['Java exception framework hierarchy starts with a class called throwable, with a differentiation between exceptions and errors.', 'Different types of exceptions in Java include IO exceptions, SQL exceptions, class not found exceptions, and runtime exceptions like arithmetic number format.', 'Runtime exception example demonstrates the handling of a divide by zero scenario, showcasing the generation of a runtime exception and the corresponding exception stack trace.']}, {'end': 33904.449, 'start': 33099.163, 'title': 'Exception types and handling in java', 'summary': 'Covers the different types of exceptions in java, including examples of runtime exceptions, checked exceptions, and custom exceptions, and further explains the use of try-catch blocks and finally blocks for exception handling.', 'duration': 805.286, 'highlights': ['The chapter explains the different types of exceptions in Java, including runtime exceptions, checked exceptions, and custom exceptions.', 'The chapter details the use of try-catch blocks for exception handling in Java and highlights the importance of enclosing suspicious code within a try-catch block to handle exceptions.', 'The chapter explains the concept of finally blocks in exception handling, emphasizing their use for performing cleanup operations such as closing resources regardless of whether an exception occurs in the try block.']}, {'end': 34359.672, 'start': 33906.211, 'title': 'Nested try-catch demo', 'summary': 'Demonstrates a nested try-catch structure in java, showcasing the handling of index out of bound exceptions and re-throwing of exceptions in a complex hierarchy, with an emphasis on the importance of finally block execution, illustrated by a practical example.', 'duration': 453.461, 'highlights': ['The chapter demonstrates a nested try-catch structure in Java.', 'The example emphasizes the handling of index out of bound exceptions and re-throwing of exceptions.', 'The importance of finally block execution is illustrated through a practical example.']}], 'duration': 1633.459, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ32726213.jpg', 'highlights': ['Creating a new object inside a method ensures the original object remains untouched. (Relevance: 5)', 'Java exception framework hierarchy starts with a class called throwable. (Relevance: 4)', 'The chapter explains the different types of exceptions in Java. (Relevance: 3)', 'The chapter details the use of try-catch blocks for exception handling. (Relevance: 2)', 'The chapter demonstrates a nested try-catch structure in Java. (Relevance: 1)']}, {'end': 36345.799, 'segs': [{'end': 34529.464, 'src': 'embed', 'start': 34498.95, 'weight': 2, 'content': [{'end': 34501.311, 'text': "And that's where equals and hash code comes into picture.", 'start': 34498.95, 'duration': 2.361}, {'end': 34514.02, 'text': 'So the contract is that whenever you are creating your own custom objects and you have a need to perform equality on those objects,', 'start': 34502.037, 'duration': 11.983}, {'end': 34518.481, 'text': 'you must override the equals method in your own class.', 'start': 34514.02, 'duration': 4.461}, {'end': 34520.342, 'text': 'You have to override that.', 'start': 34519.241, 'duration': 1.101}, {'end': 34529.464, 'text': 'If you do not override that, then two student objects will be compared based on the reference and not based on the actual object values.', 'start': 34520.902, 'duration': 8.562}], 'summary': 'Override equals method for custom objects to ensure proper comparison.', 'duration': 30.514, 'max_score': 34498.95, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ34498950.jpg'}, {'end': 34646.848, 'src': 'embed', 'start': 34624.257, 'weight': 3, 'content': [{'end': 34631.698, 'text': 'The reason we get false is because the default implementation of equals is being run on comparing the student objects,', 'start': 34624.257, 'duration': 7.441}, {'end': 34635.859, 'text': 'because Java still does not know how to equate these two objects.', 'start': 34631.698, 'duration': 4.161}, {'end': 34640.1, 'text': 'Why you are getting false? Because these two are different references.', 'start': 34636.479, 'duration': 3.621}, {'end': 34644.741, 'text': 'Java created a new memory location somewhere and put this object.', 'start': 34640.64, 'duration': 4.101}, {'end': 34646.848, 'text': 'created a reference drawn to it.', 'start': 34645.367, 'duration': 1.481}], 'summary': "Java's default equals implementation compares objects, resulting in false due to different references.", 'duration': 22.591, 'max_score': 34624.257, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ34624257.jpg'}, {'end': 34887.421, 'src': 'embed', 'start': 34858.863, 'weight': 5, 'content': [{'end': 34861.245, 'text': "I'm going to say that those two objects are duplicate.", 'start': 34858.863, 'duration': 2.382}, {'end': 34868.53, 'text': "So roll number is the condition on which I'm defining uniqueness, equality, and duplicity.", 'start': 34861.685, 'duration': 6.845}, {'end': 34873.494, 'text': 'So I define this and say if the roll numbers are equal, then the object is equal.', 'start': 34869.471, 'duration': 4.023}, {'end': 34875.715, 'text': 'Objects are same basically or duplicate.', 'start': 34873.834, 'duration': 1.881}, {'end': 34880.357, 'text': 'And if the roll numbers are different, then these two are different objects.', 'start': 34876.356, 'duration': 4.001}, {'end': 34883.038, 'text': 'Good so far.', 'start': 34882.498, 'duration': 0.54}, {'end': 34884.579, 'text': 'Coming back to the main class.', 'start': 34883.419, 'duration': 1.16}, {'end': 34887.421, 'text': 'So now I have the same roll number here.', 'start': 34885.259, 'duration': 2.162}], 'summary': 'Defining object equality based on roll numbers for uniqueness and duplicity.', 'duration': 28.558, 'max_score': 34858.863, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ34858863.jpg'}, {'end': 34967.497, 'src': 'embed', 'start': 34941.957, 'weight': 0, 'content': [{'end': 34947.602, 'text': "Remember in the HashMap or let's say even HashSet, in the HashSet you have to maintain uniqueness.", 'start': 34941.957, 'duration': 5.645}, {'end': 34951.384, 'text': 'Now Java maintains uniqueness using both equals and hash code.', 'start': 34948.142, 'duration': 3.242}, {'end': 34958.91, 'text': "Hash code is nothing but a memory bucket in Java's memory where your object is stored.", 'start': 34952.345, 'duration': 6.565}, {'end': 34960.452, 'text': "It's basically a memory location.", 'start': 34959.01, 'duration': 1.442}, {'end': 34967.497, 'text': 'So every object has a hash code and that hash code is the actual memory footprint where the object is stored.', 'start': 34961.212, 'duration': 6.285}], 'summary': 'In java, hashmap and hashset maintain uniqueness using equals and hash code. hash code represents the memory location of an object.', 'duration': 25.54, 'max_score': 34941.957, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ34941957.jpg'}, {'end': 35718.293, 'src': 'heatmap', 'start': 35314.33, 'weight': 4, 'content': [{'end': 35319.152, 'text': 'And to do that, Java provides you with a method called collections.sort.', 'start': 35314.33, 'duration': 4.822}, {'end': 35324.374, 'text': 'You just supply your list or your collection inside the sort method.', 'start': 35319.852, 'duration': 4.522}, {'end': 35332.217, 'text': 'And all the elements or objects inside your collection will be sorted based on the natural sorting ordering.', 'start': 35325.034, 'duration': 7.183}, {'end': 35338.11, 'text': 'This holds true for built-in data types, But what if your list is of type student objects?', 'start': 35333.217, 'duration': 4.893}, {'end': 35343.334, 'text': 'Then again, the same constraint applies that Java does not know how to sort student objects.', 'start': 35338.711, 'duration': 4.623}, {'end': 35349.8, 'text': 'It knows how to sort strings and ints, and floats and doubles, because those are built-in data types,', 'start': 35344.015, 'duration': 5.785}, {'end': 35353.223, 'text': "but student is a custom type and Java doesn't know how to sort it.", 'start': 35349.8, 'duration': 3.423}, {'end': 35359.108, 'text': 'And to solve that problem, Java provides an interface called Comparable.', 'start': 35354.083, 'duration': 5.025}, {'end': 35371.968, 'text': 'So Comparable is the interface which you need to implement from your class whenever you have a need to sort your objects of your class type.', 'start': 35359.948, 'duration': 12.02}, {'end': 35375.43, 'text': 'So this is the interface which your class needs to implement.', 'start': 35372.748, 'duration': 2.682}, {'end': 35380.032, 'text': 'This interface provides a single method which says compareTo,', 'start': 35376.03, 'duration': 4.002}, {'end': 35386.096, 'text': 'and it provides the foreign object and then you need to compare this foreign object with your current object.', 'start': 35380.032, 'duration': 6.064}, {'end': 35391.879, 'text': "So let's go back to the Java class and understand how do we work with this comparable interface.", 'start': 35387.456, 'duration': 4.423}, {'end': 35397.445, 'text': 'So again, I have used the student class for the sake of continuity.', 'start': 35394.403, 'duration': 3.042}, {'end': 35400.846, 'text': 'And I have the same properties as role number, name, and age.', 'start': 35398.005, 'duration': 2.841}, {'end': 35406.309, 'text': 'But this time, I say implements comparable of type student.', 'start': 35401.286, 'duration': 5.023}, {'end': 35407.85, 'text': 'This is a generics type.', 'start': 35406.769, 'duration': 1.081}, {'end': 35412.452, 'text': 'We will be covering generics in a bit more detail in this whole series.', 'start': 35408.33, 'duration': 4.122}, {'end': 35418.715, 'text': 'But the basic idea is that to define that this comparable interface will only work for student types.', 'start': 35412.892, 'duration': 5.823}, {'end': 35424.118, 'text': 'To define the type in this particular construct, which we also call a generic type.', 'start': 35419.436, 'duration': 4.682}, {'end': 35434.07, 'text': 'So you do this, and the moment you do this, Java will force you to provide the implementation of the compareTo method, which I have provided here.', 'start': 35425.106, 'duration': 8.964}, {'end': 35438.432, 'text': 'So the way this implementation works is.', 'start': 35434.97, 'duration': 3.462}, {'end': 35444.855, 'text': 'you have a foreign object here, but this time this foreign object, since I have defined this as of type student.', 'start': 35438.432, 'duration': 6.423}, {'end': 35452.578, 'text': 'so the moment you do this, Java will ask you to override this method and, using Eclipse IDE, if you override this,', 'start': 35444.855, 'duration': 7.723}, {'end': 35455.395, 'text': 'then you will get this signature automatically.', 'start': 35453.294, 'duration': 2.101}, {'end': 35457.397, 'text': 'Let me show you how this works.', 'start': 35456.036, 'duration': 1.361}, {'end': 35460.438, 'text': 'So if you do this, you will get an error here.', 'start': 35458.417, 'duration': 2.021}, {'end': 35464.601, 'text': 'And if you click on this balloon, it will say add unimplemented methods.', 'start': 35460.679, 'duration': 3.922}, {'end': 35469.644, 'text': 'If you double click on this, you will see a comparative implementation here.', 'start': 35465.081, 'duration': 4.563}, {'end': 35473.166, 'text': 'And this is exactly the skeleton which you see here.', 'start': 35470.445, 'duration': 2.721}, {'end': 35476.989, 'text': "By default, it says return zero, but I'll just come back to that in a while.", 'start': 35473.687, 'duration': 3.302}, {'end': 35482.212, 'text': 'So this is how this method came up here.', 'start': 35479.911, 'duration': 2.301}, {'end': 35490.491, 'text': 'And once you have the signature available, then you need to provide your implementation on how do you want to sort the objects.', 'start': 35483.368, 'duration': 7.123}, {'end': 35494.113, 'text': 'Remember, you need to define your logic here.', 'start': 35491.612, 'duration': 2.501}, {'end': 35503.277, 'text': 'So again, I would like to sort my students based on the roll number, which is the natural sorting order for me for the student objects.', 'start': 35494.433, 'duration': 8.844}, {'end': 35511.341, 'text': 'So this is your custom sorting logic, which you can call as natural custom logic sorting order for your student objects.', 'start': 35503.677, 'duration': 7.664}, {'end': 35513.679, 'text': 'So I want to sort them based on roll number.', 'start': 35511.957, 'duration': 1.722}, {'end': 35515.8, 'text': "But you see, I've done a strange thing here.", 'start': 35514.219, 'duration': 1.581}, {'end': 35517.342, 'text': "I've done a minus here.", 'start': 35516.161, 'duration': 1.181}, {'end': 35523.587, 'text': "So what I'm doing is that the current object's roll number minus the foreign object's roll number.", 'start': 35517.882, 'duration': 5.705}, {'end': 35532.054, 'text': 'So if this value comes as a positive number, then this object is going to take priority.', 'start': 35524.368, 'duration': 7.686}, {'end': 35535.417, 'text': 'This is going to be sitting before the student.', 'start': 35532.575, 'duration': 2.842}, {'end': 35544.746, 'text': 'If this result returns in a negative value, then this object will come first and this will come second.', 'start': 35536.638, 'duration': 8.108}, {'end': 35549.628, 'text': 'So the student object will come first and this object, the current object will come second.', 'start': 35544.886, 'duration': 4.742}, {'end': 35557.07, 'text': 'And if this returns zero, then it means both of the objects deserve the same priority or the same order priority.', 'start': 35550.568, 'duration': 6.502}, {'end': 35560.571, 'text': 'And any one of them can come after the other.', 'start': 35557.51, 'duration': 3.061}, {'end': 35569.373, 'text': 'So the basic idea is that if this results in greater than zero, then the current object is going to take precedence.', 'start': 35561.171, 'duration': 8.202}, {'end': 35577.324, 'text': "If this is going to return in a negative value, then the foreign object which you're supplying here is going to take precedence.", 'start': 35570.521, 'duration': 6.803}, {'end': 35581.306, 'text': 'And if this returns in zero, then any one of them can take precedence.', 'start': 35577.984, 'duration': 3.322}, {'end': 35586.708, 'text': 'So you need to define your comparative logic in the comparative override implementation.', 'start': 35582.166, 'duration': 4.542}, {'end': 35590.87, 'text': "Once you have done that, let's understand this with the help of an example.", 'start': 35587.729, 'duration': 3.141}, {'end': 35595.392, 'text': "I've created a comparable demo class, which has a public static void main method.", 'start': 35591.45, 'duration': 3.942}, {'end': 35597.453, 'text': 'And I create an array list.', 'start': 35596.052, 'duration': 1.401}, {'end': 35599.894, 'text': 'And I create three different student objects.', 'start': 35598.073, 'duration': 1.821}, {'end': 35603.177, 'text': 'First student object is named as John.', 'start': 35600.956, 'duration': 2.221}, {'end': 35604.258, 'text': 'Second is Jane.', 'start': 35603.477, 'duration': 0.781}, {'end': 35605.158, 'text': 'And third is Tom.', 'start': 35604.418, 'duration': 0.74}, {'end': 35607.52, 'text': 'The first has a row number of three.', 'start': 35606.039, 'duration': 1.481}, {'end': 35610.781, 'text': 'So John has a row number of three.', 'start': 35608.92, 'duration': 1.861}, {'end': 35612.902, 'text': 'Jane has a row number of one.', 'start': 35611.562, 'duration': 1.34}, {'end': 35615.644, 'text': 'And Tom has a row number of two.', 'start': 35613.623, 'duration': 2.021}, {'end': 35621.987, 'text': 'So if my compare to logic runs perfectly, then Jane should be coming first.', 'start': 35616.404, 'duration': 5.583}, {'end': 35630.312, 'text': 'After I sort this collection, after I add these three elements into my list, and once I sort this collection, then Jane should come first.', 'start': 35622.368, 'duration': 7.944}, {'end': 35640.382, 'text': 'Tom should come second and John should come third based on my natural ordering custom logic, which I have implemented in the compared to method.', 'start': 35631.018, 'duration': 9.364}, {'end': 35642.183, 'text': "And that's what I'm doing here.", 'start': 35641.162, 'duration': 1.021}, {'end': 35649.425, 'text': "After I've sorted the list, I'm just printing the list by using the for each construct of the streams API.", 'start': 35643.103, 'duration': 6.322}, {'end': 35653.487, 'text': "I'm just printing the name to see which one comes first and which one comes second.", 'start': 35650.046, 'duration': 3.441}, {'end': 35655.588, 'text': "So let's run this program.", 'start': 35654.528, 'duration': 1.06}, {'end': 35660.394, 'text': 'And this is how it looks like.', 'start': 35659.133, 'duration': 1.261}, {'end': 35663.696, 'text': 'So Jane comes first because she had a role number one.', 'start': 35660.654, 'duration': 3.042}, {'end': 35668.899, 'text': 'Tom came second because he had a role number two.', 'start': 35665.397, 'duration': 3.502}, {'end': 35673.281, 'text': 'And John came third because his role number was three.', 'start': 35669.539, 'duration': 3.742}, {'end': 35681.246, 'text': "So no matter how many times you run this program, you're going to get the collection in the same sorted sequence.", 'start': 35675.222, 'duration': 6.024}, {'end': 35687.149, 'text': 'And this is happening because of the compared to implementation which you provided here.', 'start': 35681.866, 'duration': 5.283}, {'end': 35691.378, 'text': 'If you comment this implementation.', 'start': 35688.917, 'duration': 2.461}, {'end': 35697.282, 'text': "Let's see what happens and I remove this implements comparable as well from here.", 'start': 35693.42, 'duration': 3.862}, {'end': 35701.464, 'text': 'I just create a simple student class and now I try to run this sort.', 'start': 35698.082, 'duration': 3.382}, {'end': 35706.286, 'text': 'Now you see that you get an error here and if you hover over this balloon,', 'start': 35702.264, 'duration': 4.022}, {'end': 35713.13, 'text': 'it says that the method sort in the type collection is not applicable to the argument array list of student.', 'start': 35706.286, 'duration': 6.844}, {'end': 35718.293, 'text': 'Java does not know how to sort this, so it will force you to provide a sorted implementation.', 'start': 35713.771, 'duration': 4.522}], 'summary': 'Java provides collections.sort to sort objects based on natural ordering or custom logic. implementing comparable interface allows custom sorting of objects, demonstrated through a student class example, resulting in a sorted list based on roll numbers.', 'duration': 403.963, 'max_score': 35314.33, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ35314330.jpg'}, {'end': 35853.386, 'src': 'embed', 'start': 35821.314, 'weight': 1, 'content': [{'end': 35824.635, 'text': 'Comparator is again an interface, as you can see here in the signature.', 'start': 35821.314, 'duration': 3.321}, {'end': 35832.718, 'text': 'And this interface provides you the flexibility to define your own custom sorting logic multiple times.', 'start': 35825.436, 'duration': 7.282}, {'end': 35841.464, 'text': 'So you can create multiple comparator implementations and each comparator implementation will focus on a particular sorting order.', 'start': 35833.362, 'duration': 8.102}, {'end': 35844.705, 'text': "So that's the basic need of sorting.", 'start': 35842.424, 'duration': 2.281}, {'end': 35853.386, 'text': "So remember whenever you want to sort the object in an order other than natural ordering or you want to sort some object that don't implement comparable.", 'start': 35844.725, 'duration': 8.661}], 'summary': 'Comparator interface allows custom sorting logic, enabling multiple sorting orders.', 'duration': 32.072, 'max_score': 35821.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ35821314.jpg'}], 'start': 34359.672, 'title': 'Java object equality and sorting', 'summary': 'Covers the significance of equals and hash code methods in java for ensuring uniqueness in collections, emphasizes the need to override them, and explains the implementation of the comparable interface and custom sorting logic with comparators, with demonstrations on object equality and sorting based on roll number and age.', 'chapters': [{'end': 34669.502, 'start': 34359.672, 'title': 'Equals and hash code in java', 'summary': 'Covers the importance of equals and hash code methods in java, highlighting how they impact uniqueness in collections and the need to override them for custom objects, demonstrated through an example of comparing student objects.', 'duration': 309.83, 'highlights': ['The default implementation of equals method compares object references, leading to false comparison even for identical objects with same values.', 'The necessity to override equals method for custom objects to compare based on actual object values and not just references.', 'The significance of also overriding the hash code method when overriding equals, as it is used in certain collections.']}, {'end': 34911.529, 'start': 34669.662, 'title': 'Override hash code and equals for object equality', 'summary': 'Explains the importance of overriding the hash code and equals methods to ensure object equality, covering the comparison conditions and the logic for defining uniqueness based on the roll number, with an example demonstrating the comparison result, ultimately achieving equality by comparing the roll numbers.', 'duration': 241.867, 'highlights': ['The chapter emphasizes the need to override the hash code contract along with the equals method to ensure perfect equality, preventing the storage of duplicate objects in the database.', 'The detailed explanation covers the comparison conditions for object equality, including checking if the object references are the same, verifying the class type, and performing explicit casting for the actual comparison.', 'The logic for defining uniqueness based on the roll number is illustrated, where objects with the same roll number are considered equal, even if their other details differ, and a demonstration is provided to show the comparison result based on the roll number equality.']}, {'end': 35290.811, 'start': 34912.129, 'title': 'Importance of equals and hash code', 'summary': 'Explains the importance of implementing the equals and hash code methods in java classes to maintain uniqueness in collections like hash set and hash map, and emphasizes the need for consistency between the two methods to avoid unpredictable results.', 'duration': 378.682, 'highlights': ['Java uses both equals and hash code to maintain uniqueness in collections like hash set and hash map, where equals is used to check for duplicates and hash code points to the memory location of the object.', "It's essential to override both equals and hash code methods when dealing with hash set or hash map to ensure uniqueness and proper functionality of the collections.", 'Consistency between the parameters used in equals and hash code is crucial to avoid unexpected results, as using different properties for each method can lead to unpredictability in the behavior of the collections.', 'Incorrect implementation of equals and hash code methods or lack of symmetry between them can result in unpredictable outcomes when using hash set and hash map collections.', "An example of using 'return 1' in the hash code method results in all objects being stored at a single memory location, demonstrating the impact of hash code on the storage and retrieval of objects in the hash set."]}, {'end': 35482.212, 'start': 35291.271, 'title': 'Java comparable interface', 'summary': 'Explains the need for comparable interface in java to sort custom objects, such as student objects, and demonstrates the implementation of the compareto method through the student class.', 'duration': 190.941, 'highlights': ['Java provides a method called collections.sort to sort collections, and it sorts elements based on natural sorting ordering.', 'When dealing with custom types like student objects, Java does not know how to sort them, and to solve this problem, Java provides an interface called Comparable.', 'The Comparable interface needs to be implemented from the class whenever there is a need to sort objects of that class type, providing a single method called compareTo.']}, {'end': 36042.837, 'start': 35483.368, 'title': 'Custom sorting with comparator in java', 'summary': 'Discusses the implementation of custom sorting logic using comparators in java, showcasing the use of comparable interface for natural ordering and the creation of comparator implementations for multiple sorting requirements, with examples demonstrating sorting based on roll number and age.', 'duration': 559.469, 'highlights': ['The chapter discusses the implementation of custom sorting logic using comparators in Java, showcasing the use of comparable interface for natural ordering and the creation of comparator implementations for multiple sorting requirements, with examples demonstrating sorting based on roll number and age.', "The sorting logic for roll number is implemented as the current object's roll number minus the foreign object's roll number, with positive values indicating precedence, negative values indicating the foreign object's precedence, and zero indicating equal priority.", 'The chapter provides an example demonstrating the application of comparators for sorting based on age, with the comparator implementation defining the sorting logic based on the age of the student objects.']}, {'end': 36345.799, 'start': 36042.837, 'title': 'Custom sorting logic and comparator in java', 'summary': 'Introduces custom sorting logic and comparator in java, allowing users to define their own sorting order based on specific criteria and providing examples of ascending and descending order sorting based on custom logic and comparator.', 'duration': 302.962, 'highlights': ['Users can define custom sorting logic in Java by implementing a comparator to compare objects based on specific criteria.', 'The sorting order in Java can be controlled by defining custom logic, such as returning minus one for ascending order and plus one for descending order based on the comparison of object values.', 'The use of custom comparators in Java allows for more control over sorting, enabling the creation of multiple comparators based on different object properties.']}], 'duration': 1986.127, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ34359672.jpg', 'highlights': ['Java uses both equals and hash code to maintain uniqueness in collections like hash set and hash map, where equals is used to check for duplicates and hash code points to the memory location of the object.', 'The chapter discusses the implementation of custom sorting logic using comparators in Java, showcasing the use of comparable interface for natural ordering and the creation of comparator implementations for multiple sorting requirements, with examples demonstrating sorting based on roll number and age.', 'The necessity to override equals method for custom objects to compare based on actual object values and not just references.', 'The default implementation of equals method compares object references, leading to false comparison even for identical objects with same values.', 'Java provides a method called collections.sort to sort collections, and it sorts elements based on natural sorting ordering.', 'The logic for defining uniqueness based on the roll number is illustrated, where objects with the same roll number are considered equal, even if their other details differ, and a demonstration is provided to show the comparison result based on the roll number equality.']}, {'end': 38378.224, 'segs': [{'end': 36370.682, 'src': 'embed', 'start': 36346.219, 'weight': 4, 'content': [{'end': 36352.216, 'text': "Let's get started with walking through a particular project using all the concepts which we have learned so far.", 'start': 36346.219, 'duration': 5.997}, {'end': 36356.077, 'text': 'So in this session, we are going to focus on a particular project.', 'start': 36353.116, 'duration': 2.961}, {'end': 36360.558, 'text': 'And the project we are going to focus is about an ATM application.', 'start': 36356.917, 'duration': 3.641}, {'end': 36367.781, 'text': 'So you might have interacted with different ATM stores in your cities, where you go in, you insert your card,', 'start': 36361.379, 'duration': 6.402}, {'end': 36370.682, 'text': 'you enter your PIN and then you can view the balance.', 'start': 36367.781, 'duration': 2.901}], 'summary': 'Focus on walking through an atm application project.', 'duration': 24.463, 'max_score': 36346.219, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ36346219.jpg'}, {'end': 36442.335, 'src': 'embed', 'start': 36413.242, 'weight': 1, 'content': [{'end': 36415.703, 'text': 'So for example, we are using the IU exception.', 'start': 36413.242, 'duration': 2.461}, {'end': 36418.104, 'text': 'We are using the hash map class.', 'start': 36415.783, 'duration': 2.321}, {'end': 36422.825, 'text': 'We are also using the scanner class, which is used to take input from the command line.', 'start': 36418.144, 'duration': 4.681}, {'end': 36430.407, 'text': 'So this option menu class is extending the account class and I will come to the account class in a while,', 'start': 36424.205, 'duration': 6.202}, {'end': 36432.608, 'text': "but let's see what this option menu class is doing.", 'start': 36430.407, 'duration': 2.201}, {'end': 36442.335, 'text': 'This particular class is using a decimal format, money format class, which is to denote what kind of format of money you have.', 'start': 36433.632, 'duration': 8.703}], 'summary': 'Utilizing iu exception, hash map, and scanner class for an option menu that utilizes decimal and money format.', 'duration': 29.093, 'max_score': 36413.242, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ36413242.jpg'}, {'end': 36923.875, 'src': 'embed', 'start': 36889.665, 'weight': 2, 'content': [{'end': 36895.667, 'text': "so now let's look at some of the business functions of the account class how do you deposit, how do you view the balance,", 'start': 36889.665, 'duration': 6.002}, {'end': 36898.528, 'text': 'how do you withdraw the balance, etc.', 'start': 36895.667, 'duration': 2.861}, {'end': 36907.071, 'text': 'so you see these two methods, which are specifically when the customer is trying to withdraw the money from their account,', 'start': 36898.528, 'duration': 8.543}, {'end': 36911.553, 'text': 'and these methods are basically called internally by other methods.', 'start': 36907.071, 'duration': 4.482}, {'end': 36912.873, 'text': 'so we will come to that.', 'start': 36911.553, 'duration': 1.32}, {'end': 36923.875, 'text': "let's just understand that we have two methods for calculating the withdrawable amount or executing the withdrawal transaction for the checking account account and the savings account.", 'start': 36912.873, 'duration': 11.002}], 'summary': 'Account class has methods for depositing, viewing balance, and withdrawing funds.', 'duration': 34.21, 'max_score': 36889.665, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ36889665.jpg'}, {'end': 37488.695, 'src': 'embed', 'start': 37455.978, 'weight': 0, 'content': [{'end': 37461.723, 'text': 'And in the next session we are going to have a look at another interesting core java project.', 'start': 37455.978, 'duration': 5.745}, {'end': 37465.545, 'text': 'just to build our understanding more better about the core java concept,', 'start': 37461.723, 'duration': 3.822}, {'end': 37473.569, 'text': "let's get started with walking through a core java project using all the different oops concept we have learned so far.", 'start': 37465.545, 'duration': 8.024}, {'end': 37478.411, 'text': 'so in this example we are going to have a look at a calculator application,', 'start': 37473.569, 'duration': 4.842}, {'end': 37488.695, 'text': 'and this calculator application supports primarily four different operations like addition, subtraction, multiplication and division.', 'start': 37478.411, 'duration': 10.284}], 'summary': 'Exploring a core java project for a calculator app with support for addition, subtraction, multiplication, and division.', 'duration': 32.717, 'max_score': 37455.978, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ37455978.jpg'}, {'end': 38282.049, 'src': 'embed', 'start': 38241.474, 'weight': 3, 'content': [{'end': 38242.295, 'text': 'in fact, queues.', 'start': 38241.474, 'duration': 0.821}, {'end': 38251.899, 'text': 'And once we have those queues built up, then we pick up the first number and we keep running this loop till the numbers queue is not empty.', 'start': 38243.135, 'duration': 8.764}, {'end': 38254.357, 'text': 'inside the while loop.', 'start': 38252.816, 'duration': 1.541}, {'end': 38259.139, 'text': 'at each step we pick up the first expression or the operator.', 'start': 38254.357, 'duration': 4.782}, {'end': 38266.862, 'text': 'we check what is the operator, whether it is an addition, subtraction, multiplication or division operator, and whatever kind of operator we have.', 'start': 38259.139, 'duration': 7.723}, {'end': 38282.049, 'text': 'we initialize the corresponding class of it and then we fetch the next value in the numbers queue and then we call the get result based on the expression And whatever result we get from the get result,', 'start': 38266.862, 'duration': 15.187}], 'summary': 'Processing queues with different operators to get results.', 'duration': 40.575, 'max_score': 38241.474, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ38241474.jpg'}], 'start': 36346.219, 'title': 'Atm and calculator applications in java', 'summary': 'Covers building an atm application using java and oops concepts, demonstrating iu exception, hash map class, and scanner class, and also building a calculator application utilizing classes, objects, methods, and interfaces, supporting four operations and handling user input.', 'chapters': [{'end': 36432.608, 'start': 36346.219, 'title': 'Atm application using java and oops concepts', 'summary': 'Focuses on building an atm application using java and oops concepts, demonstrating the use of iu exception, hash map class, and scanner class to create an options menu and extend the account class.', 'duration': 86.389, 'highlights': ['The chapter emphasizes building an ATM application using Java and OOPs concepts, providing a practical demonstration of using IU exception, hash map class, and scanner class to create an options menu and extend the account class.', 'The project revolves around an ATM application, simulating common functions such as checking balance, withdrawing, and depositing money, aiming to showcase the implementation of oops concepts in a Java application.', 'The session aims to demonstrate the practical use of various Java and OOPs concepts to build a simple or complex ATM application, offering insights into applying learned concepts to real-world scenarios.']}, {'end': 36863.99, 'start': 36433.632, 'title': 'Atm application design', 'summary': 'Covers the design of an atm application, including the creation of a money format class, hash map for account number to pin mapping, options for account type selection, and methods for handling customer interactions and account operations.', 'duration': 430.358, 'highlights': ['Creation of money format class and hash map for account number to pin mapping', 'Customer interaction and input validation', 'Options for account type selection and corresponding functionality']}, {'end': 37414.22, 'start': 36864.747, 'title': 'Atm application overview', 'summary': 'Discusses the implementation of business functions like deposit, withdrawal, and balance checking in the account class, as well as the user interaction flow in the atm application, demonstrating key functionalities and error handling.', 'duration': 549.473, 'highlights': ['The chapter discusses the implementation of business functions like deposit, withdrawal, and balance checking in the account class', 'The user interaction flow in the ATM application is demonstrated, including functionalities and error handling', 'Several methods are defined for calculating deposit and withdrawal for both checking and savings accounts']}, {'end': 37953.065, 'start': 37415.02, 'title': 'Building a calculator application', 'summary': 'Covers building a calculator application using object-oriented concepts in java, including creating error conditions, utilizing classes, objects, methods, and interfaces, and implementing dynamic binding, supporting four operations and handling user input.', 'duration': 538.045, 'highlights': ['The chapter covers building a calculator application using object-oriented concepts in Java, including creating error conditions, utilizing classes, objects, methods, and interfaces, and implementing dynamic binding, supporting four operations and handling user input.', 'The chapter demonstrates the use of classes, objects, methods, setters, getters, switch case, and error conditions to build the application with the correct business logic.', 'The chapter explains the implementation of the operate interface, which has a single method called get results accepting a variable argument array, and the creation of classes such as Add, Subtract, Multiply, and Divide, each implementing the operate interface with specific logic for the respective operation.', 'The chapter also demonstrates the use of dynamic binding, where an object is assigned to an interface type based on the expression, and the utilization of error conditions to handle bugs in the application.', 'The chapter highlights the utilization of the scanner class to take inputs from the command line and the use of methods like split to divide the input expression into numbers and operators, and the conversion of arrays into queues for further processing.']}, {'end': 38378.224, 'start': 37953.065, 'title': 'Building a cli calculator in java', 'summary': 'Explains the process of building a cli calculator in java, using queues and switch cases to evaluate an arithmetic expression, resulting in the final value of 13.5, demonstrating the core java concepts.', 'duration': 425.159, 'highlights': ['The program uses queues and switch cases to evaluate an arithmetic expression', 'The final result of the expression is 13.5', 'The program demonstrates the core Java concepts']}], 'duration': 2032.005, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CFD9EFcNZTQ/pics/CFD9EFcNZTQ36346219.jpg', 'highlights': ['The chapter covers building a calculator application using object-oriented concepts in Java, including creating error conditions, utilizing classes, objects, methods, and interfaces, and implementing dynamic binding, supporting four operations and handling user input.', 'The chapter emphasizes building an ATM application using Java and OOPs concepts, providing a practical demonstration of using IU exception, hash map class, and scanner class to create an options menu and extend the account class.', 'The chapter discusses the implementation of business functions like deposit, withdrawal, and balance checking in the account class.', 'The program uses queues and switch cases to evaluate an arithmetic expression.', 'The session aims to demonstrate the practical use of various Java and OOPs concepts to build a simple or complex ATM application, offering insights into applying learned concepts to real-world scenarios.']}], 'highlights': ['Java is a platform-independent language, enabling programs to run on any platform once compiled, and it enforces strong type checking to ensure data type integrity. (Relevance: 10)', "Java's versatility allows it to be used in various applications such as web, mobile, desktop, and command line applications, as well as in complex applications like gaming, microservices, and distributed computing. (Relevance: 9)", 'Detailed explanation of primitive data types in Java, including the range and use cases of byte, short, int, long, float, double, boolean, and char data types. (Relevance: 8)', 'The chapter covers tokens in Java, including keywords, identifiers, constants, special symbols, and operators. (Relevance: 7)', 'Classes serve as blueprints for objects in Java, defining the specifications and skeleton of the object, and are essential for creating instances of objects for specific functionalities, such as business logic for e-commerce operations. (Relevance: 6)', 'The chapter primarily focuses on a detailed exploration of arithmetic, assignment, and unary operators in Java, showcasing various operations such as addition, subtraction, multiplication, division, and modulus, with corresponding demonstrations in a Java program. (Relevance: 5)', 'Switch statements are effective for handling multiple conditions and constant values. (Relevance: 4)', 'The for loop in Java provides a sophisticated and concise way to write loops by combining the initialization, condition, and increment or decrement values in a single line, compared to using multiple lines in a while loop. (Relevance: 3)', 'The chapter emphasized the importance of avoiding killing a program when writing Java code, a common mistake made by beginner programmers. (Relevance: 2)', 'The concept of streams in Java 8 promotes functional programming paradigm, reducing code from 10 to 1 line. (Relevance: 1)']}