diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e78e82c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+target/
+*.iml
+*.class
+out/
+.idea/
diff --git a/10 - Exception Handling/10.2 - Practical 1 (Unchecked Exceptions)/src/Main.java b/10 - Exception Handling/10.2 - Practical 1 (Unchecked Exceptions)/src/Test.java
similarity index 95%
rename from 10 - Exception Handling/10.2 - Practical 1 (Unchecked Exceptions)/src/Main.java
rename to 10 - Exception Handling/10.2 - Practical 1 (Unchecked Exceptions)/src/Test.java
index c374818..7c2d2c2 100644
--- a/10 - Exception Handling/10.2 - Practical 1 (Unchecked Exceptions)/src/Main.java
+++ b/10 - Exception Handling/10.2 - Practical 1 (Unchecked Exceptions)/src/Test.java
@@ -1,4 +1,4 @@
-class Main
+class Test
{
public static void main(String[] args) {
int i,j,k=0;
@@ -13,4 +13,4 @@ public static void main(String[] args) {
}
System.out.println(k);
}
-}
\ No newline at end of file
+}
diff --git a/10 - Exception Handling/10.3 - Practical 2 (Multiple Catch)/src/Main.java b/10 - Exception Handling/10.3 - Practical 2 (Multiple Catch)/src/Test.java
similarity index 98%
rename from 10 - Exception Handling/10.3 - Practical 2 (Multiple Catch)/src/Main.java
rename to 10 - Exception Handling/10.3 - Practical 2 (Multiple Catch)/src/Test.java
index d4cdff3..8020d51 100644
--- a/10 - Exception Handling/10.3 - Practical 2 (Multiple Catch)/src/Main.java
+++ b/10 - Exception Handling/10.3 - Practical 2 (Multiple Catch)/src/Test.java
@@ -1,6 +1,6 @@
// Multiple statements can be there for single try
-class Main
+class Test
{
public static void main(String[] args) {
int i,j,k=0;
@@ -26,4 +26,4 @@ public static void main(String[] args) {
}
System.out.println(k);
}
-}
\ No newline at end of file
+}
diff --git a/10 - Exception Handling/10.4 - Practical 3 (Checked Exceptions)/src/Main.java b/10 - Exception Handling/10.4 - Practical 3 (Checked Exceptions)/src/Test.java
similarity index 98%
rename from 10 - Exception Handling/10.4 - Practical 3 (Checked Exceptions)/src/Main.java
rename to 10 - Exception Handling/10.4 - Practical 3 (Checked Exceptions)/src/Test.java
index 42a7d41..71b5c4e 100644
--- a/10 - Exception Handling/10.4 - Practical 3 (Checked Exceptions)/src/Main.java
+++ b/10 - Exception Handling/10.4 - Practical 3 (Checked Exceptions)/src/Test.java
@@ -3,7 +3,7 @@
import java.io.*;
-class Main
+class Test
{
public static void main(String[] args) {
int i,j=1,k=0;
@@ -27,4 +27,4 @@ public static void main(String[] args) {
}
System.out.println(k);
}
-}
\ No newline at end of file
+}
diff --git a/10 - Exception Handling/10.5 - Practical 4 (Finally block)/src/Main.java b/10 - Exception Handling/10.5 - Practical 4 (Finally block)/src/Test.java
similarity index 98%
rename from 10 - Exception Handling/10.5 - Practical 4 (Finally block)/src/Main.java
rename to 10 - Exception Handling/10.5 - Practical 4 (Finally block)/src/Test.java
index 1be89d3..b23b5f9 100644
--- a/10 - Exception Handling/10.5 - Practical 4 (Finally block)/src/Main.java
+++ b/10 - Exception Handling/10.5 - Practical 4 (Finally block)/src/Test.java
@@ -2,7 +2,7 @@
import java.io.*;
-class Main
+class Test
{
public static void main(String[] args) {
int i,j=1,k=0;
@@ -30,4 +30,4 @@ public static void main(String[] args) {
}
System.out.println(k);
}
-}
\ No newline at end of file
+}
diff --git a/11 - Object Cloning + Serialization/11.1 - 11.3 - Object Cloning/src/Main.java b/11 - Object Cloning + Serialization/11.1 - 11.3 - Object Cloning/src/Test.java
similarity index 99%
rename from 11 - Object Cloning + Serialization/11.1 - 11.3 - Object Cloning/src/Main.java
rename to 11 - Object Cloning + Serialization/11.1 - 11.3 - Object Cloning/src/Test.java
index fefd85a..60ee846 100644
--- a/11 - Object Cloning + Serialization/11.1 - 11.3 - Object Cloning/src/Main.java
+++ b/11 - Object Cloning + Serialization/11.1 - 11.3 - Object Cloning/src/Test.java
@@ -12,7 +12,7 @@
*
By storing the current object in a file and then reading it back
*
*/
-public class Main {
+public class Test {
public static void main(String[] args) throws CloneNotSupportedException {
A obj1 = new A();
obj1.i = 5;
diff --git a/12 - File Handling + Serializable/12.1 - File Handling Example/12.1 - File Handling Example.iml b/12 - File Handling + Serializable/12.1 - File Handling Example/12.1 - File Handling Example.iml
index ba272f2..c90834f 100644
--- a/12 - File Handling + Serializable/12.1 - File Handling Example/12.1 - File Handling Example.iml
+++ b/12 - File Handling + Serializable/12.1 - File Handling Example/12.1 - File Handling Example.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/12 - File Handling + Serializable/12.1 - File Handling Example/src/Main.java b/12 - File Handling + Serializable/12.1 - File Handling Example/src/Test.java
similarity index 97%
rename from 12 - File Handling + Serializable/12.1 - File Handling Example/src/Main.java
rename to 12 - File Handling + Serializable/12.1 - File Handling Example/src/Test.java
index 7377862..f2db69f 100644
--- a/12 - File Handling + Serializable/12.1 - File Handling Example/src/Main.java
+++ b/12 - File Handling + Serializable/12.1 - File Handling Example/src/Test.java
@@ -5,7 +5,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
-public class Main {
+public class Test {
private static final File FILE = new File("12 - File Handling + Serializable/12.1 - File Handling Example/src/demo.txt");
public static void main(String[] args) throws IOException {
diff --git a/12 - File Handling + Serializable/12.2 - Properties file/src/Main.java b/12 - File Handling + Serializable/12.2 - Properties file/src/Test.java
similarity index 98%
rename from 12 - File Handling + Serializable/12.2 - Properties file/src/Main.java
rename to 12 - File Handling + Serializable/12.2 - Properties file/src/Test.java
index 4566fb8..109fe07 100644
--- a/12 - File Handling + Serializable/12.2 - Properties file/src/Main.java
+++ b/12 - File Handling + Serializable/12.2 - Properties file/src/Test.java
@@ -10,7 +10,7 @@
* {@code Properties} file: is used to store configuration
*/
-public class Main {
+public class Test {
private static final File PROPERTIES_FILE = new File("12 - File Handling + Serializable/12.2 - Properties file/src/config.properties");
diff --git a/12 - File Handling + Serializable/12.3 - Object Serialization/src/Main.java b/12 - File Handling + Serializable/12.3 - Object Serialization/src/Test.java
similarity index 98%
rename from 12 - File Handling + Serializable/12.3 - Object Serialization/src/Main.java
rename to 12 - File Handling + Serializable/12.3 - Object Serialization/src/Test.java
index 77ef9de..59fc740 100644
--- a/12 - File Handling + Serializable/12.3 - Object Serialization/src/Main.java
+++ b/12 - File Handling + Serializable/12.3 - Object Serialization/src/Test.java
@@ -14,7 +14,7 @@
import java.io.ObjectOutputStream;
import java.io.Serializable;
-public class Main {
+public class Test {
private static final File FILE = new File("12 - File Handling + Serializable/12.3 - Object Serialization/src/obj.txt");
@@ -36,4 +36,4 @@ public static void main(String[] args) throws IOException, ClassNotFoundExceptio
class Save implements Serializable {
int i;
-}
\ No newline at end of file
+}
diff --git a/12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/Main.java b/12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/Test.java
similarity index 99%
rename from 12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/Main.java
rename to 12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/Test.java
index 0abd648..ba2173d 100644
--- a/12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/Main.java
+++ b/12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/Test.java
@@ -17,7 +17,7 @@
*
*/
-public class Main {
+public class Test {
private static final File XML_FILE = new File("12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/obj.txt");
public static void main(String[] args) throws FileNotFoundException {
diff --git a/12 - File Handling + Serializable/12.5 - Deserialization using XMLDecoder/src/Main.java b/12 - File Handling + Serializable/12.5 - Deserialization using XMLDecoder/src/Test.java
similarity index 98%
rename from 12 - File Handling + Serializable/12.5 - Deserialization using XMLDecoder/src/Main.java
rename to 12 - File Handling + Serializable/12.5 - Deserialization using XMLDecoder/src/Test.java
index 67591f9..a98146e 100644
--- a/12 - File Handling + Serializable/12.5 - Deserialization using XMLDecoder/src/Main.java
+++ b/12 - File Handling + Serializable/12.5 - Deserialization using XMLDecoder/src/Test.java
@@ -6,7 +6,7 @@
import java.io.Serializable;
import java.util.List;
-public class Main {
+public class Test {
private static final File XML_FILE = new File("12 - File Handling + Serializable/12.4 - Serialization using XMLEncoder/src/obj.txt");
public static void main(String[] args) throws FileNotFoundException {
@@ -66,4 +66,4 @@ public void setSname(String sname) {
public String toString() {
return "Student{" + "rollNo=" + rollNo + ", sname=" + sname + '}';
}
-}
\ No newline at end of file
+}
diff --git a/12 - File Handling + Serializable/12.6 - Call private method by ReflectionAPI/src/Main.java b/12 - File Handling + Serializable/12.6 - Call private method by ReflectionAPI/src/Test.java
similarity index 83%
rename from 12 - File Handling + Serializable/12.6 - Call private method by ReflectionAPI/src/Main.java
rename to 12 - File Handling + Serializable/12.6 - Call private method by ReflectionAPI/src/Test.java
index 9884e50..653444c 100644
--- a/12 - File Handling + Serializable/12.6 - Call private method by ReflectionAPI/src/Main.java
+++ b/12 - File Handling + Serializable/12.6 - Call private method by ReflectionAPI/src/Test.java
@@ -6,11 +6,11 @@
* Normally used for debugging purpose for testing methods.
*/
-public class Main {
+public class Test {
public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException,
InstantiationException, NoSuchMethodException, InvocationTargetException {
- Class c = Class.forName("Test");
- Test t = (Test)c.newInstance();
+ Class c = Class.forName("TestClass");
+ TestClass t = (TestClass)c.newInstance();
Method m = c.getDeclaredMethod("show", null);
m.setAccessible(true);
@@ -18,7 +18,7 @@ public static void main(String[] args) throws ClassNotFoundException, IllegalAcc
}
}
-class Test {
+class TestClass {
// private method: Can't be called from outside the class
private void show() {
System.out.println("In show");
diff --git a/12 - File Handling + Serializable/12.7 - More methods of class Class/src/Main.java b/12 - File Handling + Serializable/12.7 - More methods of class Class/src/Test.java
similarity index 92%
rename from 12 - File Handling + Serializable/12.7 - More methods of class Class/src/Main.java
rename to 12 - File Handling + Serializable/12.7 - More methods of class Class/src/Test.java
index cb6d9d7..51d2a46 100644
--- a/12 - File Handling + Serializable/12.7 - More methods of class Class/src/Main.java
+++ b/12 - File Handling + Serializable/12.7 - More methods of class Class/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) throws ClassNotFoundException {
Class c = Class.forName("A");
System.out.println(c.isInterface());
@@ -8,4 +8,4 @@ public static void main(String[] args) throws ClassNotFoundException {
}
class A {
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.2 - Using Thread Class/13.2 - Using Thread Class.iml b/13 - Multithreading/13.2 - Using Thread Class/13.2 - Using Thread Class.iml
index b4eeccb..c90834f 100644
--- a/13 - Multithreading/13.2 - Using Thread Class/13.2 - Using Thread Class.iml
+++ b/13 - Multithreading/13.2 - Using Thread Class/13.2 - Using Thread Class.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/13 - Multithreading/13.2 - Using Thread Class/src/Main.java b/13 - Multithreading/13.2 - Using Thread Class/src/Test.java
similarity index 99%
rename from 13 - Multithreading/13.2 - Using Thread Class/src/Main.java
rename to 13 - Multithreading/13.2 - Using Thread Class/src/Test.java
index 5f8d097..996eb41 100644
--- a/13 - Multithreading/13.2 - Using Thread Class/src/Main.java
+++ b/13 - Multithreading/13.2 - Using Thread Class/src/Test.java
@@ -14,7 +14,7 @@
- But since runnable interface is functional interface, this can be achieved using lambda expressions also
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
Hi obj1 = new Hi();
Hello obj2 = new Hello();
@@ -58,4 +58,4 @@ public void run() {
try { Thread.sleep(1000); } catch (InterruptedException ignored) {}
}
}
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.3 - Using Runnable Interface/13.3 - Using Runnable Interface.iml b/13 - Multithreading/13.3 - Using Runnable Interface/13.3 - Using Runnable Interface.iml
index 983633e..c90834f 100644
--- a/13 - Multithreading/13.3 - Using Runnable Interface/13.3 - Using Runnable Interface.iml
+++ b/13 - Multithreading/13.3 - Using Runnable Interface/13.3 - Using Runnable Interface.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/13 - Multithreading/13.3 - Using Runnable Interface/src/Main.java b/13 - Multithreading/13.3 - Using Runnable Interface/src/Test.java
similarity index 98%
rename from 13 - Multithreading/13.3 - Using Runnable Interface/src/Main.java
rename to 13 - Multithreading/13.3 - Using Runnable Interface/src/Test.java
index 3d97f60..995bd68 100644
--- a/13 - Multithreading/13.3 - Using Runnable Interface/src/Main.java
+++ b/13 - Multithreading/13.3 - Using Runnable Interface/src/Test.java
@@ -14,7 +14,7 @@
- But since runnable interface is functional interface, this can be achieved using lambda expressions also
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
Hi obj1 = new Hi();
Hello obj2 = new Hello();
@@ -49,4 +49,4 @@ public void run() {
try { Thread.sleep(500); } catch (InterruptedException ignored) {}
}
}
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.4 - Using lambda expressions/src/Main.java b/13 - Multithreading/13.4 - Using lambda expressions/src/Test.java
similarity index 99%
rename from 13 - Multithreading/13.4 - Using lambda expressions/src/Main.java
rename to 13 - Multithreading/13.4 - Using lambda expressions/src/Test.java
index 61cf488..f57f888 100644
--- a/13 - Multithreading/13.4 - Using lambda expressions/src/Main.java
+++ b/13 - Multithreading/13.4 - Using lambda expressions/src/Test.java
@@ -18,7 +18,7 @@
- for making code more efficient
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
/*
1) Using anonymous class:
@@ -76,4 +76,4 @@ public void run() {
try { Thread.sleep(10); } catch (InterruptedException ignored) {}
t2.start();
}
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.5 - Thread Priority/src/Main.java b/13 - Multithreading/13.5 - Thread Priority/src/Test.java
similarity index 85%
rename from 13 - Multithreading/13.5 - Thread Priority/src/Main.java
rename to 13 - Multithreading/13.5 - Thread Priority/src/Test.java
index e9ca049..8ee82f0 100644
--- a/13 - Multithreading/13.5 - Thread Priority/src/Main.java
+++ b/13 - Multithreading/13.5 - Thread Priority/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) throws InterruptedException {
Thread t1 = new Thread(() -> {
for(int i=0;i<5;i++) {
@@ -28,10 +28,10 @@ public static void main(String[] args) throws InterruptedException {
System.out.println("BYEEE IN BETWEEN"); // This won't be printed at the end because Main thread is idle and will execute this before only.
System.out.println("Is t1 alive: " + t1.isAlive());
- t1.join(); // will wait for t1 to complete execution and join main thread
- t2.join(); // will wait for t2 to complete execution and join main thread
+ t1.join(); // will wait for t1 to complete execution and join main thread
+ t2.join(); // will wait for t2 to complete execution and join main thread
System.out.println("BYEE AT THE END");
System.out.println("Is t1 alive: " + t1.isAlive());
}
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.5 - join and isAlive/src/Main.java b/13 - Multithreading/13.5 - join and isAlive/src/Test.java
similarity index 98%
rename from 13 - Multithreading/13.5 - join and isAlive/src/Main.java
rename to 13 - Multithreading/13.5 - join and isAlive/src/Test.java
index af11356..2b62838 100644
--- a/13 - Multithreading/13.5 - join and isAlive/src/Main.java
+++ b/13 - Multithreading/13.5 - join and isAlive/src/Test.java
@@ -1,7 +1,7 @@
// join method: will wait for the thread to complete execution and join parent thread
// isAlive method: returns true if thread is alive
-public class Main {
+public class Test {
public static void main(String[] args) throws InterruptedException {
Thread t1 = new Thread(() -> {
for(int i=0;i<5;i++) {
@@ -29,4 +29,4 @@ public static void main(String[] args) throws InterruptedException {
System.out.println("Is t1 alive: " + t1.isAlive());
}
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.7 - Synchronized Keyword/src/Main.java b/13 - Multithreading/13.7 - Synchronized Keyword/src/Test.java
similarity index 98%
rename from 13 - Multithreading/13.7 - Synchronized Keyword/src/Main.java
rename to 13 - Multithreading/13.7 - Synchronized Keyword/src/Test.java
index 8619042..c264b2f 100644
--- a/13 - Multithreading/13.7 - Synchronized Keyword/src/Main.java
+++ b/13 - Multithreading/13.7 - Synchronized Keyword/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) throws InterruptedException {
Counter c = new Counter();
@@ -39,4 +39,4 @@ public void increment() {
public synchronized void increment() {
count++; // count = count + 1;
}
-}
\ No newline at end of file
+}
diff --git a/13 - Multithreading/13.8 - InterThread Communication/src/Main.java b/13 - Multithreading/13.8 - InterThread Communication/src/Test.java
similarity index 98%
rename from 13 - Multithreading/13.8 - InterThread Communication/src/Main.java
rename to 13 - Multithreading/13.8 - InterThread Communication/src/Test.java
index 9ccc03b..3f66a8d 100644
--- a/13 - Multithreading/13.8 - InterThread Communication/src/Main.java
+++ b/13 - Multithreading/13.8 - InterThread Communication/src/Test.java
@@ -8,7 +8,7 @@
- can only be called from a synchronized method
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
Q q = new Q();
new Producer(q);
@@ -71,4 +71,4 @@ public void run() {
try { Thread.sleep(2500); } catch (InterruptedException ignored) {}
}
}
-}
\ No newline at end of file
+}
diff --git a/14 - Collection and Generics/14.10 - Map Interface/src/Main.java b/14 - Collection and Generics/14.10 - Map Interface/src/Test.java
similarity index 97%
rename from 14 - Collection and Generics/14.10 - Map Interface/src/Main.java
rename to 14 - Collection and Generics/14.10 - Map Interface/src/Test.java
index d1268ff..63a2c4f 100644
--- a/14 - Collection and Generics/14.10 - Map Interface/src/Main.java
+++ b/14 - Collection and Generics/14.10 - Map Interface/src/Test.java
@@ -11,7 +11,7 @@
LinkedHashMap
- keys ordered in insertion order
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
// HashMap
diff --git a/14 - Collection and Generics/14.11 - HashMap and HashTable/src/Main.java b/14 - Collection and Generics/14.11 - HashMap and HashTable/src/Test.java
similarity index 98%
rename from 14 - Collection and Generics/14.11 - HashMap and HashTable/src/Main.java
rename to 14 - Collection and Generics/14.11 - HashMap and HashTable/src/Test.java
index 0f1f8b4..0cffb81 100644
--- a/14 - Collection and Generics/14.11 - HashMap and HashTable/src/Main.java
+++ b/14 - Collection and Generics/14.11 - HashMap and HashTable/src/Test.java
@@ -21,7 +21,7 @@
import java.util.Map;
import java.util.Set;
-public class Main {
+public class Test {
public static void main(String[] args) {
Map map = new HashMap<>();
map.put("name", "Navin");
diff --git a/14 - Collection and Generics/14.12 - Print duplicate elements in List/src/Main.java b/14 - Collection and Generics/14.12 - Print duplicate elements in List/src/Test.java
similarity index 96%
rename from 14 - Collection and Generics/14.12 - Print duplicate elements in List/src/Main.java
rename to 14 - Collection and Generics/14.12 - Print duplicate elements in List/src/Test.java
index e613ed2..11eb340 100644
--- a/14 - Collection and Generics/14.12 - Print duplicate elements in List/src/Main.java
+++ b/14 - Collection and Generics/14.12 - Print duplicate elements in List/src/Test.java
@@ -2,7 +2,7 @@
import java.util.HashSet;
import java.util.Set;
-public class Main {
+public class Test {
public static void main(String[] args) {
ArrayList names = new ArrayList<>();
names.add("Rahul");
diff --git a/14 - Collection and Generics/14.13 - Using currentTimeMillis/src/Main.java b/14 - Collection and Generics/14.13 - Using currentTimeMillis/src/Test.java
similarity index 96%
rename from 14 - Collection and Generics/14.13 - Using currentTimeMillis/src/Main.java
rename to 14 - Collection and Generics/14.13 - Using currentTimeMillis/src/Test.java
index 8046a5c..3987c2b 100644
--- a/14 - Collection and Generics/14.13 - Using currentTimeMillis/src/Main.java
+++ b/14 - Collection and Generics/14.13 - Using currentTimeMillis/src/Test.java
@@ -2,7 +2,7 @@
import java.util.ArrayList;
-public class Main {
+public class Test {
public static void main(String[] args) {
// Calculating time taken to add 1000000 elements in the ArrayList
diff --git a/14 - Collection and Generics/14.2.2 - Generics/src/Main.java b/14 - Collection and Generics/14.2.2 - Generics/src/Test.java
similarity index 98%
rename from 14 - Collection and Generics/14.2.2 - Generics/src/Main.java
rename to 14 - Collection and Generics/14.2.2 - Generics/src/Test.java
index b7796a2..872b920 100644
--- a/14 - Collection and Generics/14.2.2 - Generics/src/Main.java
+++ b/14 - Collection and Generics/14.2.2 - Generics/src/Test.java
@@ -8,7 +8,7 @@
import java.io.Serializable;
import java.util.ArrayList;
-public class Main {
+public class Test {
public static void main(String[] args) {
// Testing our own Generic
@@ -61,4 +61,4 @@ public void demoExtends(ArrayList extends T > obj) {
// super: Will accept all classes including Number and it's parent
public void demoSuper(ArrayList super T> obj) {
}
-}
\ No newline at end of file
+}
diff --git a/14 - Collection and Generics/14.3 - List Interface/src/Main.java b/14 - Collection and Generics/14.3 - List Interface/src/Test.java
similarity index 98%
rename from 14 - Collection and Generics/14.3 - List Interface/src/Main.java
rename to 14 - Collection and Generics/14.3 - List Interface/src/Test.java
index 29fc575..ab1bd3d 100644
--- a/14 - Collection and Generics/14.3 - List Interface/src/Main.java
+++ b/14 - Collection and Generics/14.3 - List Interface/src/Test.java
@@ -5,7 +5,7 @@
import java.util.Collections;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
// Using Collection interface
Collection values = new ArrayList<>();
diff --git a/14 - Collection and Generics/14.4 - Vector vs ArrayList/src/Main.java b/14 - Collection and Generics/14.4 - Vector vs ArrayList/src/Test.java
similarity index 98%
rename from 14 - Collection and Generics/14.4 - Vector vs ArrayList/src/Main.java
rename to 14 - Collection and Generics/14.4 - Vector vs ArrayList/src/Test.java
index 4980231..970e0a6 100644
--- a/14 - Collection and Generics/14.4 - Vector vs ArrayList/src/Main.java
+++ b/14 - Collection and Generics/14.4 - Vector vs ArrayList/src/Test.java
@@ -20,7 +20,7 @@
import java.util.ArrayList;
import java.util.Vector;
-public class Main {
+public class Test {
public static void main(String[] args) {
Vector v = new Vector();
v.add(4);
diff --git a/14 - Collection and Generics/14.6 - Comparator Interface/src/Main.java b/14 - Collection and Generics/14.6 - Comparator Interface/src/Test.java
similarity index 98%
rename from 14 - Collection and Generics/14.6 - Comparator Interface/src/Main.java
rename to 14 - Collection and Generics/14.6 - Comparator Interface/src/Test.java
index fedca80..6cd61e5 100644
--- a/14 - Collection and Generics/14.6 - Comparator Interface/src/Main.java
+++ b/14 - Collection and Generics/14.6 - Comparator Interface/src/Test.java
@@ -5,7 +5,7 @@
import java.util.Comparator;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
// 1) sort values normally
List values = new ArrayList<>();
diff --git a/14 - Collection and Generics/14.7 - Comparator with custom type/src/Main.java b/14 - Collection and Generics/14.7 - Comparator with custom type/src/Test.java
similarity index 97%
rename from 14 - Collection and Generics/14.7 - Comparator with custom type/src/Main.java
rename to 14 - Collection and Generics/14.7 - Comparator with custom type/src/Test.java
index 3186ff8..33a64da 100644
--- a/14 - Collection and Generics/14.7 - Comparator with custom type/src/Main.java
+++ b/14 - Collection and Generics/14.7 - Comparator with custom type/src/Test.java
@@ -8,7 +8,7 @@
import java.util.Collections;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List students = new ArrayList<>();
students.add(new Student(1, 55));
@@ -40,4 +40,4 @@ public Student(int rollNo, int marks) {
public String toString() {
return "rollNo: " + rollNo + " marks:" + marks;
}
-}
\ No newline at end of file
+}
diff --git a/14 - Collection and Generics/14.8.1 - Comparable Interface/src/Main.java b/14 - Collection and Generics/14.8.1 - Comparable Interface/src/Test.java
similarity index 98%
rename from 14 - Collection and Generics/14.8.1 - Comparable Interface/src/Main.java
rename to 14 - Collection and Generics/14.8.1 - Comparable Interface/src/Test.java
index e85cfff..bcef8ec 100644
--- a/14 - Collection and Generics/14.8.1 - Comparable Interface/src/Main.java
+++ b/14 - Collection and Generics/14.8.1 - Comparable Interface/src/Test.java
@@ -8,7 +8,7 @@
import java.util.Collections;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List students = new ArrayList<>();
students.add(new Student(1, 55));
diff --git a/14 - Collection and Generics/14.8.2 - Comparator vs Comparable/src/Main.java b/14 - Collection and Generics/14.8.2 - Comparator vs Comparable/src/Test.java
similarity index 99%
rename from 14 - Collection and Generics/14.8.2 - Comparator vs Comparable/src/Main.java
rename to 14 - Collection and Generics/14.8.2 - Comparator vs Comparable/src/Test.java
index 94f9da0..98e4743 100644
--- a/14 - Collection and Generics/14.8.2 - Comparator vs Comparable/src/Main.java
+++ b/14 - Collection and Generics/14.8.2 - Comparator vs Comparable/src/Test.java
@@ -14,7 +14,7 @@ - use when you can modify the class definition
import java.util.Collections;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List laptops = new ArrayList<>();
laptops.add(new Laptop("Dell", 16, 800));
diff --git a/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/15.2 - Inner Member Class.iml b/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/15.2 - Inner Member Class.iml
index 8700171..c90834f 100644
--- a/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/15.2 - Inner Member Class.iml
+++ b/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/15.2 - Inner Member Class.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/src/Main.java b/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/src/Test.java
similarity index 98%
rename from 15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/src/Main.java
rename to 15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/src/Test.java
index 84ac43c..e2f8c00 100644
--- a/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/src/Main.java
+++ b/15 - Inner Class + Enum + Annotations/15.2 - Inner Member Class/src/Test.java
@@ -15,7 +15,7 @@
Main$1.class
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
// 1) Member Inner Variable
// We can directly create object of A
@@ -53,4 +53,4 @@ class B {
static class C {
int mc;
}
-}
\ No newline at end of file
+}
diff --git a/15 - Inner Class + Enum + Annotations/15.3 - Inner Annonymous Class/src/Main.java b/15 - Inner Class + Enum + Annotations/15.3 - Inner Annonymous Class/src/Test.java
similarity index 97%
rename from 15 - Inner Class + Enum + Annotations/15.3 - Inner Annonymous Class/src/Main.java
rename to 15 - Inner Class + Enum + Annotations/15.3 - Inner Annonymous Class/src/Test.java
index 0665249..7cdd32c 100644
--- a/15 - Inner Class + Enum + Annotations/15.3 - Inner Annonymous Class/src/Main.java
+++ b/15 - Inner Class + Enum + Annotations/15.3 - Inner Annonymous Class/src/Test.java
@@ -3,7 +3,7 @@
Lambda: Can only be used with functional interfaces
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
// ANONYMOUS CLASS
A obj1 = new A();
@@ -34,4 +34,4 @@ public void show() {
private void privateShow() {
System.out.println("Inside private show");
}
-}
\ No newline at end of file
+}
diff --git a/15 - Inner Class + Enum + Annotations/15.4 - Inner Class with Lambda/src/Main.java b/15 - Inner Class + Enum + Annotations/15.4 - Inner Class with Lambda/src/Test.java
similarity index 98%
rename from 15 - Inner Class + Enum + Annotations/15.4 - Inner Class with Lambda/src/Main.java
rename to 15 - Inner Class + Enum + Annotations/15.4 - Inner Class with Lambda/src/Test.java
index e7c697c..aaab26a 100644
--- a/15 - Inner Class + Enum + Annotations/15.4 - Inner Class with Lambda/src/Main.java
+++ b/15 - Inner Class + Enum + Annotations/15.4 - Inner Class with Lambda/src/Test.java
@@ -23,7 +23,7 @@
- Stream APIs
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
// Traditional approach
A obj = new AImpl();
@@ -64,4 +64,4 @@ class AImpl implements A {
public void show() {
System.out.println("In A");
}
-}
\ No newline at end of file
+}
diff --git a/17 - Stream API/17.1 - Printing values using external iteration/17.1 - Printing values using external iteration.iml b/17 - Stream API/17.1 - Printing values using external iteration/17.1 - Printing values using external iteration.iml
index d9cd99e..c90834f 100644
--- a/17 - Stream API/17.1 - Printing values using external iteration/17.1 - Printing values using external iteration.iml
+++ b/17 - Stream API/17.1 - Printing values using external iteration/17.1 - Printing values using external iteration.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/17 - Stream API/17.1 - Printing values using external iteration/src/Main.java b/17 - Stream API/17.1 - Printing values using external iteration/src/Test.java
similarity index 98%
rename from 17 - Stream API/17.1 - Printing values using external iteration/src/Main.java
rename to 17 - Stream API/17.1 - Printing values using external iteration/src/Test.java
index 3b7b62b..07f472f 100644
--- a/17 - Stream API/17.1 - Printing values using external iteration/src/Main.java
+++ b/17 - Stream API/17.1 - Printing values using external iteration/src/Test.java
@@ -15,13 +15,13 @@ External Iterations (loop outside the object)
- for each loop
Internal Iterations (loop inside the object)
- forEach method
- */
+*/
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList(1,2,3,4,5);
diff --git a/17 - Stream API/17.11 - Stream API/src/Main.java b/17 - Stream API/17.11 - Stream API/src/Test.java
similarity index 98%
rename from 17 - Stream API/17.11 - Stream API/src/Main.java
rename to 17 - Stream API/17.11 - Stream API/src/Test.java
index e9a25db..e68088c 100644
--- a/17 - Stream API/17.11 - Stream API/src/Main.java
+++ b/17 - Stream API/17.11 - Stream API/src/Test.java
@@ -16,7 +16,7 @@
import java.util.List;
import java.util.stream.Stream;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = new ArrayList<>();
for(int i=1;i<5;i++) {
diff --git a/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/17.12 - 17.16 Stream Map, Reduce methods.iml b/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/17.12 - 17.16 Stream Map, Reduce methods.iml
index f871f21..c90834f 100644
--- a/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/17.12 - 17.16 Stream Map, Reduce methods.iml
+++ b/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/17.12 - 17.16 Stream Map, Reduce methods.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/src/Main.java b/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/src/Test.java
similarity index 98%
rename from 17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/src/Main.java
rename to 17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/src/Test.java
index 5c9998e..190f669 100644
--- a/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/src/Main.java
+++ b/17 - Stream API/17.12 - 17.16 Stream Map, Reduce methods/src/Test.java
@@ -5,7 +5,7 @@
Internal Iterations: (Stream API)
- just focus on what to do
- */
+*/
import java.util.Arrays;
import java.util.List;
@@ -13,14 +13,14 @@
import java.util.function.Function;
import java.util.stream.Stream;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList(1,2,3,4,5);
// We need to find the sum of all the values*2
- int result = 0;
// 1) Using traditional for-each loop
+ int result = 0;
for (int value : values) {
result += value*2;
}
diff --git a/17 - Stream API/17.17- 17.19 Filter and Predicate/17.17- 17.19 Filter and Predicate.iml b/17 - Stream API/17.17- 17.19 Filter and Predicate/17.17- 17.19 Filter and Predicate.iml
index 7d03266..c90834f 100644
--- a/17 - Stream API/17.17- 17.19 Filter and Predicate/17.17- 17.19 Filter and Predicate.iml
+++ b/17 - Stream API/17.17- 17.19 Filter and Predicate/17.17- 17.19 Filter and Predicate.iml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/17 - Stream API/17.17- 17.19 Filter and Predicate/src/Main.java b/17 - Stream API/17.17- 17.19 Filter and Predicate/src/Test.java
similarity index 99%
rename from 17 - Stream API/17.17- 17.19 Filter and Predicate/src/Main.java
rename to 17 - Stream API/17.17- 17.19 Filter and Predicate/src/Test.java
index 37d7beb..58f045b 100644
--- a/17 - Stream API/17.17- 17.19 Filter and Predicate/src/Main.java
+++ b/17 - Stream API/17.17- 17.19 Filter and Predicate/src/Test.java
@@ -13,7 +13,7 @@
import java.util.function.Predicate;
import java.util.stream.Stream;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList(12, 20, 35, 46, 55, 68);
diff --git a/17 - Stream API/17.2 - 17.5 Using internal iteration/src/Main.java b/17 - Stream API/17.2 - 17.5 Using internal iteration/src/Test.java
similarity index 98%
rename from 17 - Stream API/17.2 - 17.5 Using internal iteration/src/Main.java
rename to 17 - Stream API/17.2 - 17.5 Using internal iteration/src/Test.java
index 329ef83..893d8a5 100644
--- a/17 - Stream API/17.2 - 17.5 Using internal iteration/src/Main.java
+++ b/17 - Stream API/17.2 - 17.5 Using internal iteration/src/Test.java
@@ -12,7 +12,7 @@ Internal Iterations (loop inside the object)
import java.util.List;
import java.util.function.Consumer;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList(1,2,3,4,5);
@@ -60,4 +60,4 @@ class ConsumerImpl implements Consumer {
public void accept(Integer integer) {
System.out.println(integer);
}
-}
\ No newline at end of file
+}
diff --git a/17 - Stream API/17.20 - Lazy Evaluation & Terminal Function/src/Main.java b/17 - Stream API/17.20 - Lazy Evaluation & Terminal Function/src/Test.java
similarity index 95%
rename from 17 - Stream API/17.20 - Lazy Evaluation & Terminal Function/src/Main.java
rename to 17 - Stream API/17.20 - Lazy Evaluation & Terminal Function/src/Test.java
index 57876eb..81ba37e 100644
--- a/17 - Stream API/17.20 - Lazy Evaluation & Terminal Function/src/Main.java
+++ b/17 - Stream API/17.20 - Lazy Evaluation & Terminal Function/src/Test.java
@@ -1,7 +1,7 @@
import java.util.Arrays;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList(12, 20, 35, 46, 55, 68);
@@ -49,8 +49,8 @@ They will first check the terminal method(in this case findFirst), and will exec
Proving lazy evaluation using below example.
*/
int result3 = values.stream()
- .filter(Main::isDivisible)
- .map(Main::mapDouble)
+ .filter(Test::isDivisible)
+ .map(Test::mapDouble)
.findFirst()
.orElse(0);
System.out.println(result3);
diff --git a/17 - Stream API/17.6 - 17.7 Modifying Interface once published/src/Main.java b/17 - Stream API/17.6 - 17.7 Modifying Interface once published/src/Test.java
similarity index 98%
rename from 17 - Stream API/17.6 - 17.7 Modifying Interface once published/src/Main.java
rename to 17 - Stream API/17.6 - 17.7 Modifying Interface once published/src/Test.java
index 4586922..84aee43 100644
--- a/17 - Stream API/17.6 - 17.7 Modifying Interface once published/src/Main.java
+++ b/17 - Stream API/17.6 - 17.7 Modifying Interface once published/src/Test.java
@@ -7,7 +7,7 @@
- default keyword (added in Java 1.8)
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
Actor hero = new Hero();
hero.act();
@@ -54,4 +54,4 @@ public void act() {
public void speak() {
System.out.println("Villain Speak");
}
-}
\ No newline at end of file
+}
diff --git a/17 - Stream API/17.8 -Reason for forEach being default/src/Main.java b/17 - Stream API/17.8 -Reason for forEach being default/src/Test.java
similarity index 97%
rename from 17 - Stream API/17.8 -Reason for forEach being default/src/Main.java
rename to 17 - Stream API/17.8 -Reason for forEach being default/src/Test.java
index e86f155..1454770 100644
--- a/17 - Stream API/17.8 -Reason for forEach being default/src/Main.java
+++ b/17 - Stream API/17.8 -Reason for forEach being default/src/Test.java
@@ -1,7 +1,7 @@
import java.util.ArrayList;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = new ArrayList<>();
diff --git a/17 - Stream API/17.9 - 17.10 forEach method reference/src/Main.java b/17 - Stream API/17.9 - 17.10 forEach method reference/src/Test.java
similarity index 89%
rename from 17 - Stream API/17.9 - 17.10 forEach method reference/src/Main.java
rename to 17 - Stream API/17.9 - 17.10 forEach method reference/src/Test.java
index a116e52..493ff9b 100644
--- a/17 - Stream API/17.9 - 17.10 forEach method reference/src/Main.java
+++ b/17 - Stream API/17.9 - 17.10 forEach method reference/src/Test.java
@@ -5,7 +5,7 @@
import java.util.Arrays;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList(1, 2, 3, 4, 5);
@@ -18,7 +18,7 @@ public static void main(String[] args) {
System.out.println();
// Using custom method reference
- values.forEach(Main::doubleIt);
+ values.forEach(Test::doubleIt);
}
diff --git a/17 - Stream API/Method Reference/src/Main.java b/17 - Stream API/Method Reference/src/Test.java
similarity index 98%
rename from 17 - Stream API/Method Reference/src/Main.java
rename to 17 - Stream API/Method Reference/src/Test.java
index 9a05e79..11924e4 100644
--- a/17 - Stream API/Method Reference/src/Main.java
+++ b/17 - Stream API/Method Reference/src/Test.java
@@ -9,7 +9,7 @@
import java.util.Arrays;
import java.util.List;
-public class Main {
+public class Test {
public static void main(String[] args) {
List values = Arrays.asList("Navin", "Manoj", "Saumay");
diff --git a/18 - New DateTime Api/18.1 - New DateTime Api/18.1 - New DateTime Api.iml b/18 - New DateTime Api/18.1 - New DateTime Api/18.1 - New DateTime Api.iml
deleted file mode 100644
index c90834f..0000000
--- a/18 - New DateTime Api/18.1 - New DateTime Api/18.1 - New DateTime Api.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/18 - New DateTime Api/18.1 - New DateTime Api/src/Main.java b/18 - New DateTime Api/18.1 - New DateTime Api/src/Test.java
similarity index 98%
rename from 18 - New DateTime Api/18.1 - New DateTime Api/src/Main.java
rename to 18 - New DateTime Api/18.1 - New DateTime Api/src/Test.java
index e0b1ecf..42a9894 100644
--- a/18 - New DateTime Api/18.1 - New DateTime Api/src/Main.java
+++ b/18 - New DateTime Api/18.1 - New DateTime Api/src/Test.java
@@ -10,7 +10,7 @@
Changes in new DateTime API:
- new package time was created
- Date object only print Date now, and not Time to avoid confusion
- */
+*/
import java.time.Instant;
import java.time.LocalDate;
@@ -18,7 +18,7 @@
import java.time.LocalTime;
import java.time.ZoneId;
-public class Main {
+public class Test {
public static void main(String[] args) {
// Using LocalDate
LocalDate localDate = LocalDate.now();
@@ -68,7 +68,6 @@ public static void main(String[] args) {
// Using LocalDateTime
LocalDateTime localDateTime = LocalDateTime.now();
System.out.println(localDateTime);
-
}
}
diff --git a/7 - Class and Object/7.15 - Count number of objects of class/src/Main.java b/7 - Class and Object/7.15 - Count number of objects of class/src/Test.java
similarity index 96%
rename from 7 - Class and Object/7.15 - Count number of objects of class/src/Main.java
rename to 7 - Class and Object/7.15 - Count number of objects of class/src/Test.java
index f62c33d..55ca9c8 100644
--- a/7 - Class and Object/7.15 - Count number of objects of class/src/Main.java
+++ b/7 - Class and Object/7.15 - Count number of objects of class/src/Test.java
@@ -1,4 +1,4 @@
-class Main{
+class Test {
public static void main(String[] args) {
printCounter();
A obj1 = new A();
@@ -25,4 +25,4 @@ class A {
static int getCount() {
return count;
}
-}
\ No newline at end of file
+}
diff --git a/7 - Class and Object/7.5-7.7 - Constructors/src/Main.java b/7 - Class and Object/7.5-7.7 - Constructors/src/Test.java
similarity index 98%
rename from 7 - Class and Object/7.5-7.7 - Constructors/src/Main.java
rename to 7 - Class and Object/7.5-7.7 - Constructors/src/Test.java
index 63ec45c..4062001 100644
--- a/7 - Class and Object/7.5-7.7 - Constructors/src/Main.java
+++ b/7 - Class and Object/7.5-7.7 - Constructors/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
A a = new A(); // Will call 1st constructor (without parameters)
A a2 = new A(5); // Will call 2nd constructor (with int parameter)
@@ -58,4 +58,3 @@ public B(double k) {
Imp: 8) Multiple constructors are allowed (constructor overloading)
Imp: 9) Once we have manually defined a constructor, default constructor i.e. A() also needs to be defined manually. It won't be called implicitly now.
*/
-
\ No newline at end of file
diff --git a/8 - OOPS Concepts/8.1 - Encapsulation/src/Main.java b/8 - OOPS Concepts/8.1 - Encapsulation/src/Test.java
similarity index 95%
rename from 8 - OOPS Concepts/8.1 - Encapsulation/src/Main.java
rename to 8 - OOPS Concepts/8.1 - Encapsulation/src/Test.java
index 3307c64..1ddd099 100644
--- a/8 - OOPS Concepts/8.1 - Encapsulation/src/Main.java
+++ b/8 - OOPS Concepts/8.1 - Encapsulation/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
A obj = new A();
@@ -25,4 +25,4 @@ public void setVar(int j) {
Encapsulation principles:
1) To change value of a variable, always use method (getters and setters)
2) Make variables private
-*/
\ No newline at end of file
+*/
diff --git a/8 - OOPS Concepts/8.10 - Dynamic Method Dispatch/src/Main.java b/8 - OOPS Concepts/8.10 - Dynamic Method Dispatch/src/Test.java
similarity index 97%
rename from 8 - OOPS Concepts/8.10 - Dynamic Method Dispatch/src/Main.java
rename to 8 - OOPS Concepts/8.10 - Dynamic Method Dispatch/src/Test.java
index fe9c9e3..7d3310f 100644
--- a/8 - OOPS Concepts/8.10 - Dynamic Method Dispatch/src/Main.java
+++ b/8 - OOPS Concepts/8.10 - Dynamic Method Dispatch/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
System.out.println("Method Overriding");
@@ -35,4 +35,4 @@ public void show() {
public void mine() {
System.out.println("Inside B mine");
}
-}
\ No newline at end of file
+}
diff --git a/8 - OOPS Concepts/8.11 - Super Keyword for Constructors/src/Main.java b/8 - OOPS Concepts/8.11 - Super Keyword for Constructors/src/Test.java
similarity index 97%
rename from 8 - OOPS Concepts/8.11 - Super Keyword for Constructors/src/Main.java
rename to 8 - OOPS Concepts/8.11 - Super Keyword for Constructors/src/Test.java
index a2a8a85..2fe76aa 100644
--- a/8 - OOPS Concepts/8.11 - Super Keyword for Constructors/src/Main.java
+++ b/8 - OOPS Concepts/8.11 - Super Keyword for Constructors/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
A a = new A();
System.out.println();
@@ -42,4 +42,4 @@ public B(int i) {
public B(double d) {
System.out.println("Inside B double");
}
-}
\ No newline at end of file
+}
diff --git a/8 - OOPS Concepts/8.12 - Super Keyword for Variables and Methods/src/Main.java b/8 - OOPS Concepts/8.12 - Super Keyword for Variables and Methods/src/Test.java
similarity index 96%
rename from 8 - OOPS Concepts/8.12 - Super Keyword for Variables and Methods/src/Main.java
rename to 8 - OOPS Concepts/8.12 - Super Keyword for Variables and Methods/src/Test.java
index 6e77012..15253ae 100644
--- a/8 - OOPS Concepts/8.12 - Super Keyword for Variables and Methods/src/Main.java
+++ b/8 - OOPS Concepts/8.12 - Super Keyword for Variables and Methods/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
A a = new A();
@@ -39,4 +39,4 @@ public void showModifiedIForA() {
super.i = 15;
super.show();
}
-}
\ No newline at end of file
+}
diff --git a/8 - OOPS Concepts/8.13 - Final Keyword/src/Main.java b/8 - OOPS Concepts/8.13 - Final Keyword/src/Test.java
similarity index 97%
rename from 8 - OOPS Concepts/8.13 - Final Keyword/src/Main.java
rename to 8 - OOPS Concepts/8.13 - Final Keyword/src/Test.java
index af4e00e..3d94536 100644
--- a/8 - OOPS Concepts/8.13 - Final Keyword/src/Main.java
+++ b/8 - OOPS Concepts/8.13 - Final Keyword/src/Test.java
@@ -4,7 +4,7 @@
2) with a method - no one can override the method
3) with a class - no one can inherit the class
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
final int i = 5;
@@ -38,4 +38,4 @@ public void show() { // Can't override method because show is final method
/*
class C extends B { // Can't extend because B is final class
}
-*/
\ No newline at end of file
+*/
diff --git a/8 - OOPS Concepts/8.14 - This Keyword/src/Main.java b/8 - OOPS Concepts/8.14 - This Keyword/src/Test.java
similarity index 94%
rename from 8 - OOPS Concepts/8.14 - This Keyword/src/Main.java
rename to 8 - OOPS Concepts/8.14 - This Keyword/src/Test.java
index 4cbd20b..c8f267a 100644
--- a/8 - OOPS Concepts/8.14 - This Keyword/src/Main.java
+++ b/8 - OOPS Concepts/8.14 - This Keyword/src/Test.java
@@ -1,5 +1,5 @@
// this keyword : refers to current instance
-public class Main {
+public class Test {
public static void main(String[] args) {
A a = new A(5);
a.show();
@@ -19,4 +19,4 @@ public A(int x) { // x = local variable
public void show() {
System.out.println("In A show; x = " + x);
}
-}
\ No newline at end of file
+}
diff --git a/8 - OOPS Concepts/8.2 - Encapsulation Demo/src/Main.java b/8 - OOPS Concepts/8.2 - Encapsulation Demo/src/Test.java
similarity index 94%
rename from 8 - OOPS Concepts/8.2 - Encapsulation Demo/src/Main.java
rename to 8 - OOPS Concepts/8.2 - Encapsulation Demo/src/Test.java
index bdfe1d0..90b40ec 100644
--- a/8 - OOPS Concepts/8.2 - Encapsulation Demo/src/Main.java
+++ b/8 - OOPS Concepts/8.2 - Encapsulation Demo/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
Emp e1 = new Emp();
diff --git a/8 - OOPS Concepts/8.20 - 8.21 Interfaces + Anonymous Class + Lambda/src/Main.java b/8 - OOPS Concepts/8.20 - 8.21 Interfaces + Anonymous Class + Lambda/src/Test.java
similarity index 98%
rename from 8 - OOPS Concepts/8.20 - 8.21 Interfaces + Anonymous Class + Lambda/src/Main.java
rename to 8 - OOPS Concepts/8.20 - 8.21 Interfaces + Anonymous Class + Lambda/src/Test.java
index 78c7987..324d6f3 100644
--- a/8 - OOPS Concepts/8.20 - 8.21 Interfaces + Anonymous Class + Lambda/src/Main.java
+++ b/8 - OOPS Concepts/8.20 - 8.21 Interfaces + Anonymous Class + Lambda/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
// by creating implementation class
Abc obj = new AbcImpl();
@@ -53,4 +53,4 @@ public void show() {
Interface extends Interface
- An interface can extend multiple interfaces
Class implements Interface
-*/
\ No newline at end of file
+*/
diff --git a/8 - OOPS Concepts/8.22 - Interface Default and Static Methods/src/Main.java b/8 - OOPS Concepts/8.22 - Interface Default and Static Methods/src/Test.java
similarity index 99%
rename from 8 - OOPS Concepts/8.22 - Interface Default and Static Methods/src/Main.java
rename to 8 - OOPS Concepts/8.22 - Interface Default and Static Methods/src/Test.java
index 4c1deb6..c61c6cd 100644
--- a/8 - OOPS Concepts/8.22 - Interface Default and Static Methods/src/Main.java
+++ b/8 - OOPS Concepts/8.22 - Interface Default and Static Methods/src/Test.java
@@ -23,7 +23,7 @@ Reason why default methods were added (Full Story):
Static methods can now also be written in interface in Java 8
*/
-public class Main {
+public class Test {
public static void main(String[] args) {
Abc abc = new AbcImpl();
abc.show(); // will call Abc interface show
@@ -115,4 +115,4 @@ interface Error
{
default boolean equals(Object o) { // error: default method 'equals' in interface Error overrides a member of java.lang.Object
}
-}*/
\ No newline at end of file
+}*/
diff --git a/8 - OOPS Concepts/8.23 - Marker Interface/src/Main.java b/8 - OOPS Concepts/8.23 - Marker Interface/src/Test.java
similarity index 97%
rename from 8 - OOPS Concepts/8.23 - Marker Interface/src/Main.java
rename to 8 - OOPS Concepts/8.23 - Marker Interface/src/Test.java
index 4eef0e5..4632642 100644
--- a/8 - OOPS Concepts/8.23 - Marker Interface/src/Main.java
+++ b/8 - OOPS Concepts/8.23 - Marker Interface/src/Test.java
@@ -7,7 +7,7 @@ - classes that implmenent the marker interface will be allowed to call a specifi
- Serializable
- Remote
*/
-class Main {
+class Test {
public static void main(String[] args) {
Demo demo = new Demo();
if(demo instanceof P) {
@@ -28,4 +28,4 @@ class Demo implements P {
void show() {
System.out.println("Hello");
}
-}
\ No newline at end of file
+}
diff --git a/8 - OOPS Concepts/8.7 - Polymorphism/src/Main.java b/8 - OOPS Concepts/8.7 - Polymorphism/src/Test.java
similarity index 98%
rename from 8 - OOPS Concepts/8.7 - Polymorphism/src/Main.java
rename to 8 - OOPS Concepts/8.7 - Polymorphism/src/Test.java
index d5a94b7..61b631b 100644
--- a/8 - OOPS Concepts/8.7 - Polymorphism/src/Main.java
+++ b/8 - OOPS Concepts/8.7 - Polymorphism/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
System.out.println("Method Overloading");
A a = new A();
@@ -49,4 +49,4 @@ class B extends A {
public void show() {
System.out.println("Inside B show");
}
-}
\ No newline at end of file
+}
diff --git a/9 - String + Builder + Buffer/9.1 - String Operations/src/Main.java b/9 - String + Builder + Buffer/9.1 - String Operations/src/Test.java
similarity index 97%
rename from 9 - String + Builder + Buffer/9.1 - String Operations/src/Main.java
rename to 9 - String + Builder + Buffer/9.1 - String Operations/src/Test.java
index 42ec36c..9155cd0 100644
--- a/9 - String + Builder + Buffer/9.1 - String Operations/src/Main.java
+++ b/9 - String + Builder + Buffer/9.1 - String Operations/src/Test.java
@@ -7,7 +7,7 @@
import java.util.Scanner;
-public class Main {
+public class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
diff --git a/9 - String + Builder + Buffer/9.10 - StringBuilder + StingBuffer/src/Main.java b/9 - String + Builder + Buffer/9.10 - StringBuilder + StingBuffer/src/Test.java
similarity index 96%
rename from 9 - String + Builder + Buffer/9.10 - StringBuilder + StingBuffer/src/Main.java
rename to 9 - String + Builder + Buffer/9.10 - StringBuilder + StingBuffer/src/Test.java
index 2aad6d0..b2a9af0 100644
--- a/9 - String + Builder + Buffer/9.10 - StringBuilder + StingBuffer/src/Main.java
+++ b/9 - String + Builder + Buffer/9.10 - StringBuilder + StingBuffer/src/Test.java
@@ -3,7 +3,7 @@
// So, StringBuffer is the better choice
-class Main {
+class Test {
public static void main(String[] args) {
StringBuffer sbf = new StringBuffer("Navin");
@@ -16,4 +16,4 @@ public static void main(String[] args) {
sbf.delete(8, 10);
System.out.println(sbf);
}
-}
\ No newline at end of file
+}
diff --git a/9 - String + Builder + Buffer/9.2 - toString Method/src/Main.java b/9 - String + Builder + Buffer/9.2 - toString Method/src/Test.java
similarity index 98%
rename from 9 - String + Builder + Buffer/9.2 - toString Method/src/Main.java
rename to 9 - String + Builder + Buffer/9.2 - toString Method/src/Test.java
index 418f724..6250f59 100644
--- a/9 - String + Builder + Buffer/9.2 - toString Method/src/Main.java
+++ b/9 - String + Builder + Buffer/9.2 - toString Method/src/Test.java
@@ -1,6 +1,6 @@
// toString method : returns ClassName with package + @ + hashcode
-public class Main {
+public class Test {
public static void main(String[] args) {
Student s1 = new Student(123, "SMY");
System.out.println(s1.rollNo);
@@ -39,4 +39,4 @@ class StudentChild extends Student {
public String toString() {
return rollNo + " " + name;
}
-}
\ No newline at end of file
+}
diff --git a/9 - String + Builder + Buffer/9.3 - User input using System.in.read()/src/Main.java b/9 - String + Builder + Buffer/9.3 - User input using System.in.read()/src/Test.java
similarity index 96%
rename from 9 - String + Builder + Buffer/9.3 - User input using System.in.read()/src/Main.java
rename to 9 - String + Builder + Buffer/9.3 - User input using System.in.read()/src/Test.java
index 4e7c365..dfd0574 100644
--- a/9 - String + Builder + Buffer/9.3 - User input using System.in.read()/src/Main.java
+++ b/9 - String + Builder + Buffer/9.3 - User input using System.in.read()/src/Test.java
@@ -6,9 +6,9 @@
- returns byte value in the form of int in range 0 to 255
- that value is basically the ascii value of that character
- not efficient
- */
+*/
-public class Main {
+public class Test {
public static void main(String[] args) throws Exception {
int i = System.in.read(); // returns ascii value of the next character in int format
System.out.println(i);
diff --git a/9 - String + Builder + Buffer/9.4 - User input using BufferedReader/src/Main.java b/9 - String + Builder + Buffer/9.4 - User input using BufferedReader/src/Test.java
similarity index 97%
rename from 9 - String + Builder + Buffer/9.4 - User input using BufferedReader/src/Main.java
rename to 9 - String + Builder + Buffer/9.4 - User input using BufferedReader/src/Test.java
index c2af0f4..a4490bf 100644
--- a/9 - String + Builder + Buffer/9.4 - User input using BufferedReader/src/Main.java
+++ b/9 - String + Builder + Buffer/9.4 - User input using BufferedReader/src/Test.java
@@ -12,7 +12,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
-public class Main {
+public class Test {
public static void main(String[] args) throws IOException {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
diff --git a/9 - String + Builder + Buffer/9.5 - User input using Scanner/src/Main.java b/9 - String + Builder + Buffer/9.5 - User input using Scanner/src/Test.java
similarity index 96%
rename from 9 - String + Builder + Buffer/9.5 - User input using Scanner/src/Main.java
rename to 9 - String + Builder + Buffer/9.5 - User input using Scanner/src/Test.java
index 6fed0af..ce9baca 100644
--- a/9 - String + Builder + Buffer/9.5 - User input using Scanner/src/Main.java
+++ b/9 - String + Builder + Buffer/9.5 - User input using Scanner/src/Test.java
@@ -2,7 +2,7 @@
// It provides flexibility for reading different data types
import java.util.Scanner;
-public class Main {
+public class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
diff --git a/9 - String + Builder + Buffer/9.6 - Wrapper Classes/src/Main.java b/9 - String + Builder + Buffer/9.6 - Wrapper Classes/src/Test.java
similarity index 98%
rename from 9 - String + Builder + Buffer/9.6 - Wrapper Classes/src/Main.java
rename to 9 - String + Builder + Buffer/9.6 - Wrapper Classes/src/Test.java
index 90a70ee..524a321 100644
--- a/9 - String + Builder + Buffer/9.6 - Wrapper Classes/src/Main.java
+++ b/9 - String + Builder + Buffer/9.6 - Wrapper Classes/src/Test.java
@@ -17,7 +17,7 @@
import java.util.ArrayList;
-public class Main {
+public class Test {
public static void main(String[] args) {
int i = 5;
Integer iObj = Integer.valueOf(i); // Boxing
diff --git a/9 - String + Builder + Buffer/9.8 - String splitting from CSV/src/Main.java b/9 - String + Builder + Buffer/9.8 - String splitting from CSV/src/Test.java
similarity index 93%
rename from 9 - String + Builder + Buffer/9.8 - String splitting from CSV/src/Main.java
rename to 9 - String + Builder + Buffer/9.8 - String splitting from CSV/src/Test.java
index ff92375..76add9b 100644
--- a/9 - String + Builder + Buffer/9.8 - String splitting from CSV/src/Main.java
+++ b/9 - String + Builder + Buffer/9.8 - String splitting from CSV/src/Test.java
@@ -1,4 +1,4 @@
-public class Main {
+public class Test {
public static void main(String[] args) {
String str = "Navin, Mahesh, Rahul, Vijay";
diff --git a/README.md b/README.md
index 78e401a..daf8ef8 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,22 @@
-### All the codes and notes of (Core Java Tutorials by Telusko)
+### Core Java Tutorials by Telusko
+
+This repo contains all the codes and notes of the amazing [Core Java Tutorials by Telusko](https://www.youtube.com/watch?v=WOUpjal8ee4&list=PLsyeobzWxl7oZ-fxDYkOToURHhMuWD1BK)
+
+This tutorial is broken down into 18 modules:
+1) Intro to Java
+2) Variables
+3) How Java works?
+4) Operators
+5) If-else, Loops
+6) Arrays
+7) Class and Object
+8) OOPS Concepts
+9) String + StringBuilder + StringBuffer
+10) Exception Handling
+11) Object Cloning + Serialization
+12) File Handling + Serializable
+13) Multithreading
+14) Collection and Generics
+15) Inner Class + Enum + Annotations
+17) Stream API
+18) New DateTime api