├── README.md ├── Sprint-1 ├── .gitignore ├── Assignment_1 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ ├── Demo.class │ │ │ │ ├── Demo1.class │ │ │ │ ├── Demo2.class │ │ │ │ └── Interface1.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ └── Interface1.java │ │ └── module-info.java ├── Assignment_2 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ ├── Demo.class │ │ │ │ ├── FunctionalIntr.class │ │ │ │ ├── Marker.class │ │ │ │ └── Normal.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ └── Demo.java │ │ └── module-info.java ├── Assignment_3 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ ├── Day.class │ │ │ │ ├── Demo$1.class │ │ │ │ ├── Demo$2.class │ │ │ │ ├── Demo.class │ │ │ │ ├── Demo2.class │ │ │ │ └── Greeting.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ ├── Demo.java │ │ │ └── Demo2.java │ │ └── module-info.java ├── Assignment_4 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ ├── Demo.class │ │ │ │ └── Student.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ ├── Demo.java │ │ │ └── Student.java │ │ └── module-info.java └── Assignment_5 │ ├── .classpath │ ├── .project │ ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs │ ├── bin │ └── com │ │ └── masai │ │ ├── Student.class │ │ └── main.class │ └── src │ └── com │ └── masai │ ├── Student.java │ └── main.java ├── Sprint-2 ├── .gitignore ├── Inbuild_Functional_Interfaces_2 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ └── Demo.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ └── Demo.java │ │ └── module-info.java ├── Map_Sorting_3 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ ├── Demo.class │ │ │ │ └── MapSorting.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ └── Demo.java │ │ └── module-info.java ├── Method_Refrences_1 │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ ├── com │ │ │ └── masai │ │ │ │ ├── Demo.class │ │ │ │ ├── InterDemo.class │ │ │ │ ├── InterDemo2.class │ │ │ │ └── InterDemo3.class │ │ └── module-info.class │ └── src │ │ ├── com │ │ └── masai │ │ │ └── Demo.java │ │ └── module-info.java └── Runnable_Callable_5 │ ├── .classpath │ ├── .project │ ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs │ ├── bin │ ├── com │ │ └── masai │ │ │ ├── Demo$1.class │ │ │ ├── Demo.class │ │ │ └── run1.class │ └── module-info.class │ └── src │ ├── com │ └── masai │ │ └── Demo.java │ └── module-info.java └── Sprint-3 ├── .gitignore ├── ByteStream_CharacterStream_1 ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── com │ │ └── masai │ │ │ └── Demo.class │ └── module-info.class └── src │ ├── com │ └── masai │ │ └── Demo.java │ └── module-info.java ├── Serialization_DeSerialzation ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── StudentData ├── bin │ ├── com │ │ └── masai │ │ │ ├── Class.class │ │ │ ├── Demo.class │ │ │ └── Student.class │ └── module-info.class └── src │ ├── com │ └── masai │ │ ├── Class.java │ │ ├── Demo.java │ │ └── Student.java │ └── module-info.java └── Thread_And_Runnable_Example_2 ├── .classpath ├── .project ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs ├── bin ├── com │ └── masai │ │ ├── Demo.class │ │ ├── Player.class │ │ ├── com.class │ │ └── run1.class └── module-info.class └── src ├── com └── masai │ ├── Demo.java │ ├── Player.java │ └── com.java └── module-info.java /README.md: -------------------------------------------------------------------------------- 1 | # Video Assignments Topics 2 | 3 | Welcome to my GitHub repository! This repository contains three projects that I have created as part of the Zoom Marathon Challenge. 🏃‍♂️🎥 The challenge required us to record 5-minute videos explaining various topics. To make the explanations more interactive and engaging, I decided to create projects demonstrating these topics. Let's explore the projects from sprint-1 to sprint-3: 4 | 5 | ![image](https://github.com/Shubh2-0/Video_Assignments_Topics/assets/112773220/957872c0-0654-433e-9a77-d553286129c6) 6 | 7 | 8 | 9 | ## Sprint-1 🏃‍♀️ 10 | 11 | In the sprint-1 project, I focused on explaining the difference between the `equals()` and `hashCode()` methods in Java. Understanding these methods is crucial for proper implementation of object equality and usage in collections like sets and maps. The project covered the importance of overriding the `equals()` and `hashCode()` methods and provided code examples to illustrate the concepts. 🤝🔍 12 | 13 | ## Sprint-2 🚀 14 | 15 | The sprint-2 project delved into advanced topics related to software development and programming paradigms. It covered topics such as functional interfaces, map sorting, method references, and the differences between `Runnable` and `Callable` interfaces. Each topic was explained with code examples and demonstrations to enhance the understanding of these concepts. 🧩💡 16 | 17 | ## Sprint-3 🌟 18 | 19 | In the sprint-3 project, I explored cutting-edge technologies and emerging trends in the field of computer science. The topics covered included byte streams and character streams, serialization and deserialization, and thread and runnable examples. The project provided insights into these topics and offered practical examples and explanations to facilitate learning and exploration. 🌐📡💻 20 | 21 | By creating these projects, I aimed to provide a comprehensive resource for the Zoom Marathon Challenge, enabling participants to gain a deeper understanding of the topics through practical demonstrations. 🎯📚 22 | 23 | Feel free to explore each project's directory to access the code, videos, and documentation related to each topic. You can clone this repository to your local machine and start learning and exploring these exciting subjects! 📥🔬 24 | 25 | ## 🎥 Happy learning and exploring in the Zoom Marathon Challenge! 🚀🌟 26 | -------------------------------------------------------------------------------- /Sprint-1/.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Assignment_1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_1/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/bin/com/masai/Demo1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_1/bin/com/masai/Demo1.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/bin/com/masai/Demo2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_1/bin/com/masai/Demo2.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/bin/com/masai/Interface1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_1/bin/com/masai/Interface1.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_1/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/src/com/masai/Interface1.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | public interface Interface1 { 4 | 5 | void method1(); 6 | 7 | static void method2() { 8 | 9 | System.out.println("Static method of interface"); 10 | 11 | } 12 | 13 | 14 | } 15 | 16 | 17 | abstract class Demo { 18 | 19 | 20 | 21 | } 22 | 23 | class Demo1 extends Demo{ 24 | 25 | 26 | } 27 | 28 | class Demo2 extends Demo{ 29 | 30 | 31 | public static void main(String[] args) { 32 | 33 | 34 | Demo d = new Demo1(); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /Sprint-1/Assignment_1/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Assignment_1 { 9 | } -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Assignment_2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_2/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/bin/com/masai/FunctionalIntr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_2/bin/com/masai/FunctionalIntr.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/bin/com/masai/Marker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_2/bin/com/masai/Marker.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/bin/com/masai/Normal.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_2/bin/com/masai/Normal.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_2/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.function.Consumer; 4 | import java.util.function.Function; 5 | import java.util.function.Predicate; 6 | import java.util.function.Supplier; 7 | 8 | //MARKER INTERFACE - NO ABSTRACT METHODS 9 | interface Marker{ 10 | 11 | static void methodMarker() { 12 | System.out.println("Marker Interface Method"); 13 | } 14 | 15 | } 16 | 17 | //NORMAL INTERFACE 18 | interface Normal{ 19 | 20 | void method1(); 21 | void method2(); 22 | 23 | } 24 | 25 | //FUNCTIONAL INTERFACE 26 | 27 | @FunctionalInterface 28 | interface FunctionalIntr{ 29 | 30 | void methodDemo(); 31 | 32 | static void staticDemo() { 33 | System.out.println("Static method of functional interface"); 34 | } 35 | 36 | 37 | static void staticDemo2() { 38 | System.out.println("Static method 2 of functional interface"); 39 | } 40 | 41 | static void staticDemo3() { 42 | System.out.println("Static method 3 of functional interface"); 43 | } 44 | 45 | String toString(); 46 | 47 | } 48 | 49 | 50 | public class Demo { 51 | 52 | public static void methodMain() { 53 | System.out.println("static-Method references"); 54 | } 55 | 56 | public void methodMain2() { 57 | System.out.println("Non-static Method references"); 58 | } 59 | 60 | public static void main(String[] args) { 61 | 62 | FunctionalIntr i1 = () ->{ 63 | 64 | System.out.println("Abstract method of functionalIntr interface"); 65 | }; 66 | 67 | Demo d1 = new Demo(); 68 | 69 | FunctionalIntr i3 = d1::methodMain2; 70 | 71 | i3.methodDemo(); 72 | 73 | FunctionalIntr i2 = Demo::methodMain; 74 | 75 | i2.methodDemo(); 76 | 77 | 78 | i1.methodDemo(); 79 | 80 | Predicate check = e -> e%2==0; 81 | 82 | System.out.println( check.test(3)); 83 | System.out.println( check.test(4)); 84 | 85 | Consumer print = e -> System.out.println(e); 86 | 87 | print.accept(4); 88 | 89 | 90 | Supplier number = () -> 5*10; 91 | System.out.println(number.get()); 92 | 93 | 94 | Function f = Integer::parseInt; 95 | 96 | System.out.println(f.apply("356") + 100); 97 | 98 | 99 | 100 | 101 | } 102 | 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_2/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Assignment_2 { 9 | } -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Assignment_3 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/com/masai/Day.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/com/masai/Day.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/com/masai/Demo$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/com/masai/Demo$1.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/com/masai/Demo$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/com/masai/Demo$2.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/com/masai/Demo2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/com/masai/Demo2.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/com/masai/Greeting.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/com/masai/Greeting.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_3/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.time.LocalDate; 4 | 5 | 6 | //FUNCTIONAL INTERFACE 7 | @FunctionalInterface 8 | interface Day{ 9 | 10 | LocalDate toDay(); 11 | 12 | } 13 | //NORMAL INTERFACE 14 | interface Greeting{ 15 | 16 | String morning(); 17 | String night(); 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | public class Demo { 26 | 27 | 28 | public static void main(String[] args) { 29 | 30 | 31 | // LAMBDA EXPRESSION 32 | Day d = () -> LocalDate.now(); 33 | System.out.println(d.toDay()); 34 | 35 | Day d2 = new Day() { 36 | 37 | @Override 38 | public LocalDate toDay() { 39 | 40 | return LocalDate.now(); 41 | } 42 | }; 43 | 44 | System.out.println(d2.toDay()); 45 | 46 | 47 | Greeting g1 = new Greeting() { 48 | 49 | @Override 50 | public String night() { 51 | return "Good Night"; 52 | } 53 | 54 | @Override 55 | public String morning() { 56 | // TODO Auto-generated method stub 57 | return "Good Morning"; 58 | } 59 | }; 60 | 61 | System.out.println(g1.night()); 62 | System.out.println(g1.morning()); 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | } 71 | 72 | 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/src/com/masai/Demo2.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | class Demo2{ 4 | 5 | public static void main(String[] args) { 6 | 7 | System.out.println("Main2X"); 8 | 9 | 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /Sprint-1/Assignment_3/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Assignment_3 { 9 | } -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Assignment_4 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_4/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/bin/com/masai/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_4/bin/com/masai/Student.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_4/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.HashMap; 4 | import java.util.HashSet; 5 | 6 | public class Demo { 7 | 8 | public static void main(String[] args) { 9 | 10 | // HashSet set = new HashSet<>(); 11 | // set.add(1); 12 | // set.add(3); 13 | // set.add(64); 14 | // set.add(72); 15 | // set.add(81); 16 | // set.add(92); 17 | // set.add(4); 18 | // set.add(6); 19 | // set.add(7); 20 | // set.add(8); 21 | // set.add(9); 22 | // 23 | // System.out.println(set); 24 | // 25 | // set.add(7); 26 | // set.add(8); 27 | // 28 | // System.out.println(set); 29 | // 30 | // HashSet set2 = new HashSet<>(); 31 | // 32 | // set2.add( new Student(1, "abc", 21, "jaipur")); 33 | // set2.add( new Student(2, "pqr", 24, "jaipur")); 34 | // set2.add( new Student(3, "ghu", 22, "jaipur")); 35 | // set2.add( new Student(4, "lio", 26, "jaipur")); 36 | // set2.add( new Student(5, "avg", 28, "jaipur")); 37 | // 38 | // set2.add( new Student(5, "avg", 28, "jaipur")); 39 | // 40 | // 41 | // set2.forEach(e -> System.out.println(e)); 42 | // 43 | // 44 | // 45 | // 46 | // HashMap map = new HashMap<>(); 47 | // 48 | // map.put(1, "abc"); 49 | // map.put(2, "pqr"); 50 | // map.put(3, "rst"); 51 | // map.put(4, "crt"); 52 | // map.put(5, "iop"); 53 | // map.put(6, "art"); 54 | // System.out.println(map); 55 | // 56 | // map.put(6, "ban"); 57 | // map.put(9, "abc"); 58 | // System.out.println(map); 59 | 60 | HashMap map2 = new HashMap<>(); 61 | map2.put(new Student(5, "abc", 21, "jaipur"), 359); 62 | map2.put(new Student(2, "pqr", 25, "jaipur"), 219); 63 | map2.put(new Student(6, "stu", 23, "jaipur"), 459); 64 | map2.put(new Student(9, "ban", 22, "jaipur"), 289); 65 | 66 | 67 | 68 | map2.forEach( (e,e2) -> System.out.println("Key : "+e+" "+"Value : "+e2)); 69 | 70 | System.out.println("===================================="); 71 | map2.put(new Student(9, "ban", 2, "jaipur"), 509); 72 | 73 | map2.forEach( (e,e2) -> System.out.println("Key : "+e+" "+"Value : "+e2)); 74 | 75 | 76 | 77 | 78 | 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/src/com/masai/Student.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.Objects; 4 | 5 | public class Student { 6 | 7 | int id; 8 | String name; 9 | int age; 10 | String city; 11 | 12 | public Student(int id, String name, int age, String city) { 13 | super(); 14 | this.id = id; 15 | this.name = name; 16 | this.age = age; 17 | this.city = city; 18 | } 19 | 20 | @Override 21 | public String toString() { 22 | return "Student [id=" + id + ", name=" + name + ", age=" + age + ", city=" + city + "]"; 23 | } 24 | 25 | @Override 26 | public int hashCode() { 27 | return Objects.hash(id); 28 | } 29 | 30 | @Override 31 | public boolean equals(Object obj) { 32 | if (this == obj) 33 | return true; 34 | if (obj == null) 35 | return false; 36 | if (getClass() != obj.getClass()) 37 | return false; 38 | Student other = (Student) obj; 39 | return this.id == other.id; 40 | 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_4/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Assignment_4 { 9 | } -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Assignment_5 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/bin/com/masai/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_5/bin/com/masai/Student.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/bin/com/masai/main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-1/Assignment_5/bin/com/masai/main.class -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/src/com/masai/Student.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.Objects; 4 | 5 | public class Student { 6 | 7 | int id; 8 | String name; 9 | int age; 10 | String city; 11 | int marks; 12 | 13 | public Student(int id, String name, int age, String city, int marks) { 14 | super(); 15 | this.id = id; 16 | this.name = name; 17 | this.age = age; 18 | this.city = city; 19 | this.marks = marks; 20 | } 21 | 22 | @Override 23 | public int hashCode() { 24 | return Objects.hash(age, city, id, marks, name); 25 | } 26 | 27 | @Override 28 | public boolean equals(Object obj) { 29 | if (this == obj) 30 | return true; 31 | if (obj == null) 32 | return false; 33 | if (getClass() != obj.getClass()) 34 | return false; 35 | 36 | Student other = (Student) obj; 37 | return age == other.age && Objects.equals(city, other.city) && id == other.id && marks == other.marks 38 | && Objects.equals(name, other.name); 39 | } 40 | 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Sprint-1/Assignment_5/src/com/masai/main.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | public class main { 4 | 5 | public static void main(String[] args) { 6 | 7 | 8 | Student st1 = new Student(1, "Harsh", 23, "Banglore", 340); 9 | Student st2 = new Student(2, "pankaj", 25, "Jaipur", 540); 10 | Student st3 = new Student(6, "pankaj", 25, "Indore", 50); 11 | 12 | 13 | System.out.println(st1.equals(st2)); 14 | System.out.println(st1.hashCode() == st2.hashCode()); 15 | 16 | System.out.println(st2.equals(st3)); 17 | 18 | // System.out.println(st2.hashCode() == st3.hashCode()); 19 | // System.out.println(st3.hashCode()); 20 | // System.out.println(st2.hashCode()); 21 | 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Sprint-2/.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Inbuild_Functional_Interfaces_2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Inbuild_Functional_Interfaces_2/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Inbuild_Functional_Interfaces_2/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.function.Consumer; 4 | import java.util.function.Function; 5 | import java.util.function.Predicate; 6 | import java.util.function.Supplier; 7 | 8 | public class Demo { 9 | 10 | public static void method1(String name) { 11 | System.out.println("Hello "+name); 12 | } 13 | 14 | public static void main(String[] args) { 15 | 16 | Predicate p1 = e -> e%2==0; 17 | 18 | System.out.println(p1.test(3)); 19 | System.out.println(p1.test(4)); 20 | 21 | Consumer c1 = Demo::method1; 22 | 23 | c1.accept("Shubham"); 24 | 25 | 26 | Supplier s1 = () -> (int)Math.floor(Math.random()*60); 27 | 28 | System.out.println(s1.get()); 29 | 30 | 31 | Function f1 = Integer::parseInt; 32 | 33 | System.out.println(f1.apply("34")+10); 34 | 35 | 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Sprint-2/Inbuild_Functional_Interfaces_2/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Topic2_Inbuild_Functional_Interfaces { 9 | } -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Map_Sorting_3 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Map_Sorting_3/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/bin/com/masai/MapSorting.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Map_Sorting_3/bin/com/masai/MapSorting.class -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Map_Sorting_3/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collections; 5 | import java.util.HashMap; 6 | import java.util.LinkedHashMap; 7 | import java.util.Map; 8 | import java.util.TreeMap; 9 | 10 | @FunctionalInterface 11 | interface MapSorting{ 12 | 13 | Map sortingMap(Map map); 14 | 15 | } 16 | 17 | public class Demo { 18 | 19 | public static void main(String[] args) { 20 | 21 | Map map = new HashMap<>(); 22 | 23 | map.put("A", 7); 24 | map.put("C", 28); 25 | map.put("O", 21); 26 | map.put("G", 17); 27 | map.put("L", 2); 28 | map.put("W", 8); 29 | map.put("Q", 26); 30 | map.put("U", 5); 31 | map.put("I", 31); 32 | map.put("X", 29); 33 | System.out.println(map); 34 | System.out.println("\n\n\n=======================================\n\n\n"); 35 | 36 | 37 | // ascending order 38 | MapSorting sort = m ->{ 39 | Map ans = new LinkedHashMap<>(); 40 | 41 | ArrayList> list = new ArrayList<>(m.entrySet()); 42 | 43 | Collections.sort(list , (o1,o2) -> o1.getValue().compareTo(o2.getValue())); 44 | 45 | list.forEach( e -> { 46 | 47 | ans.put(e.getKey(), e.getValue()); 48 | 49 | }); 50 | 51 | 52 | 53 | return ans; 54 | }; 55 | 56 | 57 | 58 | // descending order 59 | MapSorting sort1 = m ->{ 60 | Map ans = new LinkedHashMap<>(); 61 | 62 | ArrayList> list = new ArrayList<>(m.entrySet()); 63 | 64 | Collections.sort(list , (o1,o2) -> o2.getValue().compareTo(o1.getValue())); 65 | 66 | list.forEach( e -> { 67 | 68 | ans.put(e.getKey(), e.getValue()); 69 | 70 | }); 71 | 72 | 73 | 74 | return ans; 75 | }; 76 | 77 | 78 | System.out.println("MAP SORTING IN ASCENDING ORDER OF TIER VALUE"); 79 | map = sort.sortingMap(map); 80 | System.out.println(map); 81 | System.out.println("\n\n\n=======================================\n\n\n"); 82 | System.out.println("MAP SORTING IN DESCENDING ORDER OF TIER VALUE"); 83 | map = sort1.sortingMap(map); 84 | System.out.println(map); 85 | 86 | 87 | TreeMap m = new TreeMap<>((s1,s2) -> s2.compareTo(s1) ); 88 | 89 | 90 | 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /Sprint-2/Map_Sorting_3/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Map_Sorting_3 { 9 | } -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Method_Refrences_1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Method_Refrences_1/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/bin/com/masai/InterDemo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Method_Refrences_1/bin/com/masai/InterDemo.class -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/bin/com/masai/InterDemo2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Method_Refrences_1/bin/com/masai/InterDemo2.class -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/bin/com/masai/InterDemo3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Method_Refrences_1/bin/com/masai/InterDemo3.class -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Method_Refrences_1/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.time.LocalDate; 4 | 5 | @FunctionalInterface 6 | interface InterDemo{ 7 | void Hello(); 8 | } 9 | @FunctionalInterface 10 | interface InterDemo2{ 11 | 12 | void greeting(String name); 13 | 14 | } 15 | 16 | @FunctionalInterface 17 | interface InterDemo3{ 18 | 19 | Demo giveDemo(); 20 | 21 | } 22 | 23 | 24 | public class Demo { 25 | 26 | static LocalDate date = LocalDate.now(); 27 | 28 | 29 | public static LocalDate getDate() { 30 | return date; 31 | } 32 | 33 | public static void setDate(LocalDate date) { 34 | Demo.date = date; 35 | } 36 | 37 | public void greet(String name) { 38 | System.out.println("Hello "+name); 39 | } 40 | 41 | public static void sayHello() { 42 | System.out.println("Hello"); 43 | } 44 | 45 | 46 | public static void main(String[] args) { 47 | 48 | 49 | InterDemo3 i3 = Demo::new; 50 | 51 | Demo d2 = i3.giveDemo(); 52 | 53 | 54 | 55 | 56 | System.out.println(d2.getDate()); 57 | 58 | System.out.println(); 59 | 60 | 61 | 62 | 63 | Demo d = new Demo(); 64 | InterDemo2 i2 = d::greet; 65 | InterDemo i1 = Demo::sayHello; 66 | 67 | 68 | i1.Hello(); 69 | i2.greeting("Masai School"); 70 | 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Sprint-2/Method_Refrences_1/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Method_Refrences { 9 | } -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Runnable_Callable_5 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/bin/com/masai/Demo$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Runnable_Callable_5/bin/com/masai/Demo$1.class -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Runnable_Callable_5/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/bin/com/masai/run1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Runnable_Callable_5/bin/com/masai/run1.class -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-2/Runnable_Callable_5/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.concurrent.Callable; 4 | import java.util.concurrent.ExecutionException; 5 | import java.util.concurrent.ExecutorCompletionService; 6 | import java.util.concurrent.ExecutorService; 7 | import java.util.concurrent.Executors; 8 | import java.util.concurrent.Future; 9 | 10 | class run1 implements Runnable{ 11 | 12 | @Override 13 | public void run() { 14 | 15 | System.out.println("inside class which is implemented runnable interface"); 16 | 17 | } 18 | 19 | } 20 | 21 | 22 | public class Demo { 23 | 24 | public static void main(String[] args) throws InterruptedException, ExecutionException { 25 | 26 | Runnable run2 = () -> System.out.println("inside a variable of runnable interface..."); 27 | 28 | run1 r = new run1(); 29 | 30 | Thread t2 = new Thread(run2); 31 | Thread t1 = new Thread(r); 32 | 33 | t1.start(); 34 | t2.start(); 35 | 36 | 37 | Callable c1 = new Callable() { 38 | 39 | @Override 40 | public String call() throws Exception { 41 | 42 | return "inside call method of callable interface"; 43 | } 44 | 45 | 46 | }; 47 | 48 | ExecutorService ser = Executors.newFixedThreadPool(4); 49 | 50 | Future ans = ser.submit(c1); 51 | 52 | System.out.println(ans.get()); 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /Sprint-2/Runnable_Callable_5/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Runnable_Callable { 9 | } -------------------------------------------------------------------------------- /Sprint-3/.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ByteStream_CharacterStream_1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/ByteStream_CharacterStream_1/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/ByteStream_CharacterStream_1/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | public class Demo { 4 | 5 | /* 6 | * BYTE STREAM 7 | | 8 | +-- FilterInputStream 9 | | | 10 | | +-- BufferedInputStream 11 | | +-- DataInputStream 12 | | +-- PushbackInputStream 13 | | 14 | +-- ByteArrayInputStream 15 | +-- FileInputStream 16 | +-- ObjectInputStream 17 | 18 | OutputStream 19 | | 20 | +-- FilterOutputStream 21 | | | 22 | | +-- BufferedOutputStream 23 | | +-- DataOutputStream 24 | | +-- PrintStream 25 | | 26 | +-- ByteArrayOutputStream 27 | +-- FileOutputStream 28 | +-- ObjectOutputStream 29 | 30 | 31 | 32 | 33 | 34 | Here is a class hierarchy for character stream: 35 | 36 | Reader 37 | | 38 | +-- BufferedReader 39 | | | 40 | | +-- LineNumberReader 41 | | 42 | +-- CharArrayReader 43 | +-- InputStreamReader 44 | | 45 | +-- FileReader 46 | 47 | Writer 48 | | 49 | +-- BufferedWriter 50 | | 51 | +-- CharArrayWriter 52 | | 53 | +-- OutputStreamWriter 54 | | 55 | +-- FileWriter 56 | 57 | 58 | 59 | 60 | 61 | 62 | */ 63 | } 64 | -------------------------------------------------------------------------------- /Sprint-3/ByteStream_CharacterStream_1/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module ByteStream_CharacterStream_1 { 9 | } -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Serialization_DeSerialzation 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/StudentData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Serialization_DeSerialzation/StudentData -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/bin/com/masai/Class.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Serialization_DeSerialzation/bin/com/masai/Class.class -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Serialization_DeSerialzation/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/bin/com/masai/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Serialization_DeSerialzation/bin/com/masai/Student.class -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Serialization_DeSerialzation/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/src/com/masai/Class.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | 4 | import java.io.FileOutputStream; 5 | import java.io.IOException; 6 | import java.io.ObjectOutputStream; 7 | import java.util.ArrayList; 8 | 9 | 10 | public class Class { 11 | 12 | public static void main(String[] args) throws IOException { 13 | 14 | 15 | ArrayList list = new ArrayList<>(); 16 | 17 | list.add( new Student(1, "Omkar", 23, "Banglore")); 18 | list.add( new Student(2, "Shivay", 21, "Banglore")); 19 | list.add( new Student(3, "Deva", 26, "Banglore")); 20 | list.add( new Student(4, "Arjun", 28, "Banglore")); 21 | list.add( new Student(5, "Karan", 19, "Banglore")); 22 | 23 | 24 | // list.forEach(e -> System.out.println(e)); 25 | 26 | FileOutputStream fos = new FileOutputStream("StudentData"); 27 | ObjectOutputStream oos = new ObjectOutputStream(fos); 28 | 29 | oos.writeObject(list); 30 | 31 | 32 | fos.close(); 33 | oos.close(); 34 | 35 | System.out.println("Serialization completed"); 36 | 37 | 38 | 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.io.FileInputStream; 4 | import java.io.IOException; 5 | import java.io.ObjectInputStream; 6 | import java.util.ArrayList; 7 | 8 | public class Demo { 9 | 10 | public static void main(String[] args) throws IOException, ClassNotFoundException { 11 | 12 | FileInputStream fis = new FileInputStream("StudentData"); 13 | ObjectInputStream ois = new ObjectInputStream(fis); 14 | 15 | 16 | 17 | ArrayList data = (ArrayList) ois.readObject(); 18 | 19 | 20 | fis.close(); 21 | ois.close(); 22 | 23 | 24 | 25 | 26 | 27 | data.forEach(e -> System.out.println(e)); 28 | 29 | 30 | 31 | 32 | 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/src/com/masai/Student.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Student implements Serializable { 6 | 7 | /** 8 | * 9 | */ 10 | private static final long serialVersionUID = 1L; 11 | int id; 12 | String name; 13 | int age; 14 | String city; 15 | 16 | public Student(int id, String name, int age, String city) { 17 | this.id = id; 18 | this.name = name; 19 | this.age = age; 20 | this.city = city; 21 | } 22 | 23 | public int getId() { 24 | return id; 25 | } 26 | 27 | public void setId(int id) { 28 | this.id = id; 29 | } 30 | 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | public void setName(String name) { 36 | this.name = name; 37 | } 38 | 39 | public int getAge() { 40 | return age; 41 | } 42 | 43 | public void setAge(int age) { 44 | this.age = age; 45 | } 46 | 47 | public String getCity() { 48 | return city; 49 | } 50 | 51 | public void setCity(String city) { 52 | this.city = city; 53 | } 54 | 55 | @Override 56 | public String toString() { 57 | return "Id : " + id + " \t Name : " + name + " \t Age : " + age + " \t City : " + city; 58 | } 59 | 60 | 61 | 62 | 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /Sprint-3/Serialization_DeSerialzation/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Serialization_DeSerialzation { 9 | } -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Thread_And_Runnable_Example_2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=17 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=17 15 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/Demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/Demo.class -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/Player.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/Player.class -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/com.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/com.class -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/run1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Thread_And_Runnable_Example_2/bin/com/masai/run1.class -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubh2-0/Video_Assignments_Topics/623eb1cb1252975187aad4c107dc01c0a158e386/Sprint-3/Thread_And_Runnable_Example_2/bin/module-info.class -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/src/com/masai/Demo.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | 4 | class run1 implements Runnable{ 5 | 6 | @Override 7 | public void run() { 8 | 9 | for(int i=1;i<11;i++) 10 | System.out.print(i+" "); 11 | 12 | } 13 | 14 | } 15 | 16 | 17 | 18 | public class Demo { 19 | 20 | 21 | public static void main(String[] args) throws InterruptedException { 22 | 23 | Runnable r2 = () -> { 24 | 25 | for(int i=10;i>=1;i--) 26 | System.out.print(i+" "); 27 | 28 | 29 | }; 30 | 31 | 32 | run1 r1 = new run1(); 33 | 34 | 35 | Thread t1 = new Thread(r1); 36 | Thread t2 = new Thread(r2); 37 | 38 | t1.start(); 39 | t1.join(); 40 | t2.start(); 41 | 42 | 43 | 44 | 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/src/com/masai/Player.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | public class Player { 4 | 5 | String name; 6 | int score; 7 | public Player(String name, int score) { 8 | super(); 9 | this.name = name; 10 | this.score = score; 11 | } 12 | @Override 13 | public String toString() { 14 | return "Player [name=" + name + ", score=" + score + "]"; 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/src/com/masai/com.java: -------------------------------------------------------------------------------- 1 | package com.masai; 2 | 3 | import java.util.Comparator; 4 | 5 | public class com implements Comparator{ 6 | 7 | @Override 8 | public int compare(Player o1, Player o2) { 9 | 10 | if(o1.score > o2.score) return 1; 11 | 12 | else if(o1.score < o2.score) return -1; 13 | 14 | else { 15 | return o2.name.compareTo(o1.name); 16 | } 17 | 18 | 19 | } 20 | 21 | 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Sprint-3/Thread_And_Runnable_Example_2/src/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author shubh 6 | * 7 | */ 8 | module Thread_And_Runnable_Example { 9 | } --------------------------------------------------------------------------------