From 1ddd56978bb4af967f2b0c5d6e1bcb0e1146179e Mon Sep 17 00:00:00 2001 From: dupirefr Date: Sat, 4 Apr 2020 09:42:08 +0200 Subject: [PATCH] [JAVA-621] core-java-lang-oop-modifiers module * Creation * Moved code from https://www.baeldung.com/java-static * Moved code from https://www.baeldung.com/java-final * Moved code from https://www.baeldung.com/java-public-keyword * Moved code from https://www.baeldung.com/java-access-modifiers * Moved code from https://www.baeldung.com/java-private-keyword * Moved code from https://www.baeldung.com/java-static-default-methods * Moved code from https://www.baeldung.com/java-strictfp * Moved article references to the new README.md --- .../core-java-lang-oop-2/README.md | 3 -- .../core-java-lang-oop-3/README.md | 2 -- .../core-java-lang-oop-modifiers/README.md | 12 +++++++ .../core-java-lang-oop-modifiers/pom.xml | 34 +++++++++++++++++++ .../com/baeldung/accessmodifiers/Public.java | 0 .../baeldung/accessmodifiers/SubClass.java | 0 .../baeldung/accessmodifiers/SuperPublic.java | 0 .../another/AnotherPublic.java | 0 .../another/AnotherSubClass.java | 0 .../another/AnotherSuperPublic.java | 0 .../publicmodifier/ListOfThree.java | 0 .../publicmodifier/SpecialCharacters.java | 0 .../publicmodifier/Student.java | 0 .../core/privatemodifier/Employee.java | 0 .../core/privatemodifier/ExampleClass.java | 0 .../privatemodifier/PublicOuterClass.java | 0 .../application/Application.java | 0 .../model/Alarm.java | 0 .../model/Car.java | 0 .../model/Motorbike.java | 0 .../model/MultiAlarmCar.java | 0 .../model/Vehicle.java | 0 .../com/baeldung/finalkeyword/BlackCat.java | 0 .../com/baeldung/finalkeyword/BlackDog.java | 0 .../java/com/baeldung/finalkeyword/Cat.java | 0 .../java/com/baeldung/finalkeyword/Dog.java | 0 .../java/com/baeldung/staticdemo/Car.java | 0 .../com/baeldung/staticdemo/Singleton.java | 0 .../com/baeldung/staticdemo/StaticBlock.java | 0 .../com/baeldung/strictfpUsage/Circle.java | 0 .../strictfpUsage/ScientificCalculator.java | 0 .../PublicAccessModifierUnitTest.java | 2 +- .../StaticDefaulInterfaceMethodUnitTest.java | 2 +- .../baeldung/finalkeyword/FinalUnitTest.java | 0 .../com/baeldung/staticdemo/CarUnitTest.java} | 2 +- .../staticdemo/SingletonUnitTest.java} | 2 +- .../staticdemo/StaticBlockUnitTest.java} | 2 +- .../ScientificCalculatorUnitTest.java | 0 .../core-java-lang-oop-modules/pom.xml | 1 + .../core-java-lang-oop/README.md | 2 -- 40 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/README.md create mode 100644 core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/pom.xml rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/Public.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/SubClass.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/publicmodifier/ListOfThree.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/publicmodifier/SpecialCharacters.java (100%) rename core-java-modules/{core-java-lang-oop-3 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/accessmodifiers/publicmodifier/Student.java (100%) rename core-java-modules/{core-java-lang-oop-4 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/core/privatemodifier/Employee.java (100%) rename core-java-modules/{core-java-lang-oop-4 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/core/privatemodifier/ExampleClass.java (100%) rename core-java-modules/{core-java-lang-oop-4 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/core/privatemodifier/PublicOuterClass.java (100%) rename core-java-modules/{core-java-lang-oop-2 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/defaultstaticinterfacemethods/application/Application.java (100%) rename core-java-modules/{core-java-lang-oop-2 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Alarm.java (100%) rename core-java-modules/{core-java-lang-oop-2 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Car.java (100%) rename core-java-modules/{core-java-lang-oop-2 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Motorbike.java (100%) rename core-java-modules/{core-java-lang-oop-2 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/MultiAlarmCar.java (100%) rename core-java-modules/{core-java-lang-oop-2 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Vehicle.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/finalkeyword/BlackCat.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/finalkeyword/BlackDog.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/finalkeyword/Cat.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/finalkeyword/Dog.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/staticdemo/Car.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/staticdemo/Singleton.java (100%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/staticdemo/StaticBlock.java (100%) rename core-java-modules/{core-java-lang-oop-4 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/strictfpUsage/Circle.java (100%) rename core-java-modules/{core-java-lang-oop-4 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/main/java/com/baeldung/strictfpUsage/ScientificCalculator.java (100%) rename core-java-modules/{core-java-lang-oop-3/src/test/java/com/baeldung/accessmodifiers => core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/accessmodifiers/publicmodifier}/PublicAccessModifierUnitTest.java (98%) rename core-java-modules/{core-java-lang-oop-2/src/test/java/com/baeldung/defaultistaticinterfacemethods => core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/defaultstaticinterfacemethods}/test/StaticDefaulInterfaceMethodUnitTest.java (97%) rename core-java-modules/{core-java-lang-oop => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java (100%) rename core-java-modules/{core-java-lang-oop/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java => core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/CarUnitTest.java} (89%) rename core-java-modules/{core-java-lang-oop/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java => core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/SingletonUnitTest.java} (90%) rename core-java-modules/{core-java-lang-oop/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java => core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/StaticBlockUnitTest.java} (91%) rename core-java-modules/{core-java-lang-oop-4 => core-java-lang-oop-modules/core-java-lang-oop-modifiers}/src/test/java/com/baeldung/strictfpUsage/ScientificCalculatorUnitTest.java (100%) diff --git a/core-java-modules/core-java-lang-oop-2/README.md b/core-java-modules/core-java-lang-oop-2/README.md index 8417c89c7a..76da66c7ab 100644 --- a/core-java-modules/core-java-lang-oop-2/README.md +++ b/core-java-modules/core-java-lang-oop-2/README.md @@ -4,8 +4,5 @@ This module contains articles about Object-oriented programming (OOP) in Java ### Relevant Articles: - [Anonymous Classes in Java](https://www.baeldung.com/java-anonymous-classes) -- [Marker Interfaces in Java](https://www.baeldung.com/java-marker-interfaces) - [Java equals() and hashCode() Contracts](https://www.baeldung.com/java-equals-hashcode-contracts) -- [Static and Default Methods in Interfaces in Java](https://www.baeldung.com/java-static-default-methods) -- [Abstract Classes in Java](https://www.baeldung.com/java-abstract-class) - [[<-- Prev]](/core-java-modules/core-java-lang-oop)[[More -->]](/core-java-modules/core-java-lang-oop-3) diff --git a/core-java-modules/core-java-lang-oop-3/README.md b/core-java-modules/core-java-lang-oop-3/README.md index 78725b0f02..3b57ece635 100644 --- a/core-java-modules/core-java-lang-oop-3/README.md +++ b/core-java-modules/core-java-lang-oop-3/README.md @@ -4,10 +4,8 @@ This module contains articles about Object-oriented programming (OOP) in Java ### Relevant Articles: - [Pass-By-Value as a Parameter Passing Mechanism in Java](https://www.baeldung.com/java-pass-by-value-or-pass-by-reference) -- [Access Modifiers in Java](https://www.baeldung.com/java-access-modifiers) - [Guide to the super Java Keyword](https://www.baeldung.com/java-super) - [Guide to the this Java Keyword](https://www.baeldung.com/java-this) -- [Java ‘public’ Access Modifier](https://www.baeldung.com/java-public-keyword) - [Nested Classes in Java](https://www.baeldung.com/java-nested-classes) - [A Guide to Inner Interfaces in Java](https://www.baeldung.com/java-inner-interfaces) - [Java Classes and Objects](https://www.baeldung.com/java-classes-objects) diff --git a/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/README.md b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/README.md new file mode 100644 index 0000000000..eef905fa0e --- /dev/null +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/README.md @@ -0,0 +1,12 @@ +## Core Java Lang OOP - Modifiers + +This module contains articles about modifiers in Java + +### Relevant Articles: +- [Access Modifiers in Java](https://www.baeldung.com/java-access-modifiers) +- [Java ‘public’ Access Modifier](https://www.baeldung.com/java-public-keyword) +- [Java ‘private’ Access Modifier](https://www.baeldung.com/java-private-keyword) +- [The “final” Keyword in Java](https://www.baeldung.com/java-final) +- [A Guide to the Static Keyword in Java](https://www.baeldung.com/java-static) +- [Static and Default Methods in Interfaces in Java](https://www.baeldung.com/java-static-default-methods) +- [The strictfp Keyword in Java](https://www.baeldung.com/java-strictfp) \ No newline at end of file diff --git a/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/pom.xml b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/pom.xml new file mode 100644 index 0000000000..11e0296266 --- /dev/null +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/pom.xml @@ -0,0 +1,34 @@ + + + + core-java-lang-oop-modules + com.baeldung.core-java-lang-oop-modules + 1.0.0-SNAPSHOT + + 4.0.0 + + core-java-lang-oop-modifiers + core-java-lang-oop-modifiers + jar + + + + org.assertj + assertj-core + ${assertj-core.version} + test + + + com.h2database + h2 + ${h2.version} + test + + + + + 3.10.0 + + \ No newline at end of file diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/Public.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/Public.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/Public.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/Public.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/SubClass.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/SubClass.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/SubClass.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/SubClass.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/publicmodifier/ListOfThree.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/publicmodifier/ListOfThree.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/publicmodifier/ListOfThree.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/publicmodifier/ListOfThree.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/publicmodifier/SpecialCharacters.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/publicmodifier/SpecialCharacters.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/publicmodifier/SpecialCharacters.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/publicmodifier/SpecialCharacters.java diff --git a/core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/publicmodifier/Student.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/publicmodifier/Student.java similarity index 100% rename from core-java-modules/core-java-lang-oop-3/src/main/java/com/baeldung/accessmodifiers/publicmodifier/Student.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/accessmodifiers/publicmodifier/Student.java diff --git a/core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/core/privatemodifier/Employee.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/core/privatemodifier/Employee.java similarity index 100% rename from core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/core/privatemodifier/Employee.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/core/privatemodifier/Employee.java diff --git a/core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/core/privatemodifier/ExampleClass.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/core/privatemodifier/ExampleClass.java similarity index 100% rename from core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/core/privatemodifier/ExampleClass.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/core/privatemodifier/ExampleClass.java diff --git a/core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/core/privatemodifier/PublicOuterClass.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/core/privatemodifier/PublicOuterClass.java similarity index 100% rename from core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/core/privatemodifier/PublicOuterClass.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/core/privatemodifier/PublicOuterClass.java diff --git a/core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/application/Application.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/application/Application.java similarity index 100% rename from core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/application/Application.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/application/Application.java diff --git a/core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Alarm.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Alarm.java similarity index 100% rename from core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Alarm.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Alarm.java diff --git a/core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Car.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Car.java similarity index 100% rename from core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Car.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Car.java diff --git a/core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Motorbike.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Motorbike.java similarity index 100% rename from core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Motorbike.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Motorbike.java diff --git a/core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/MultiAlarmCar.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/MultiAlarmCar.java similarity index 100% rename from core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/MultiAlarmCar.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/MultiAlarmCar.java diff --git a/core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Vehicle.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Vehicle.java similarity index 100% rename from core-java-modules/core-java-lang-oop-2/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Vehicle.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/defaultstaticinterfacemethods/model/Vehicle.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/BlackCat.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/BlackCat.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/BlackCat.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/BlackCat.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/BlackDog.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/BlackDog.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/BlackDog.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/BlackDog.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/Cat.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/Cat.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/Cat.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/Cat.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/Dog.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/Dog.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/finalkeyword/Dog.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/finalkeyword/Dog.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/staticdemo/Car.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/staticdemo/Car.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/staticdemo/Car.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/staticdemo/Car.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/staticdemo/Singleton.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/staticdemo/Singleton.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/staticdemo/Singleton.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/staticdemo/Singleton.java diff --git a/core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/staticdemo/StaticBlock.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/staticdemo/StaticBlock.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/main/java/com/baeldung/staticdemo/StaticBlock.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/staticdemo/StaticBlock.java diff --git a/core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/strictfpUsage/Circle.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/strictfpUsage/Circle.java similarity index 100% rename from core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/strictfpUsage/Circle.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/strictfpUsage/Circle.java diff --git a/core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/strictfpUsage/ScientificCalculator.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/strictfpUsage/ScientificCalculator.java similarity index 100% rename from core-java-modules/core-java-lang-oop-4/src/main/java/com/baeldung/strictfpUsage/ScientificCalculator.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/main/java/com/baeldung/strictfpUsage/ScientificCalculator.java diff --git a/core-java-modules/core-java-lang-oop-3/src/test/java/com/baeldung/accessmodifiers/PublicAccessModifierUnitTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/accessmodifiers/publicmodifier/PublicAccessModifierUnitTest.java similarity index 98% rename from core-java-modules/core-java-lang-oop-3/src/test/java/com/baeldung/accessmodifiers/PublicAccessModifierUnitTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/accessmodifiers/publicmodifier/PublicAccessModifierUnitTest.java index ed8fb4f45a..c2897e7434 100644 --- a/core-java-modules/core-java-lang-oop-3/src/test/java/com/baeldung/accessmodifiers/PublicAccessModifierUnitTest.java +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/accessmodifiers/publicmodifier/PublicAccessModifierUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.accessmodifiers; +package com.baeldung.accessmodifiers.publicmodifier; import com.baeldung.accessmodifiers.publicmodifier.ListOfThree; import com.baeldung.accessmodifiers.publicmodifier.Student; diff --git a/core-java-modules/core-java-lang-oop-2/src/test/java/com/baeldung/defaultistaticinterfacemethods/test/StaticDefaulInterfaceMethodUnitTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/defaultstaticinterfacemethods/test/StaticDefaulInterfaceMethodUnitTest.java similarity index 97% rename from core-java-modules/core-java-lang-oop-2/src/test/java/com/baeldung/defaultistaticinterfacemethods/test/StaticDefaulInterfaceMethodUnitTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/defaultstaticinterfacemethods/test/StaticDefaulInterfaceMethodUnitTest.java index 7d4b06908a..e90f239756 100644 --- a/core-java-modules/core-java-lang-oop-2/src/test/java/com/baeldung/defaultistaticinterfacemethods/test/StaticDefaulInterfaceMethodUnitTest.java +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/defaultstaticinterfacemethods/test/StaticDefaulInterfaceMethodUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.defaultistaticinterfacemethods.test; +package com.baeldung.defaultstaticinterfacemethods.test; import com.baeldung.defaultstaticinterfacemethods.model.Car; import com.baeldung.defaultstaticinterfacemethods.model.Motorbike; diff --git a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java similarity index 100% rename from core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java diff --git a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/CarUnitTest.java similarity index 89% rename from core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/CarUnitTest.java index 3150627269..3deec6f41c 100644 --- a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/CarUnitTest.java @@ -4,7 +4,7 @@ import static org.junit.Assert.*; import org.junit.Test; -public class CarIntegrationTest { +public class CarUnitTest { @Test public void whenNumberOfCarObjectsInitialized_thenStaticCounterIncreases() { new Car("Jaguar", "V8"); diff --git a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/SingletonUnitTest.java similarity index 90% rename from core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/SingletonUnitTest.java index 28d864073a..c1a1e1abe4 100644 --- a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/SingletonUnitTest.java @@ -3,7 +3,7 @@ package com.baeldung.staticdemo; import org.junit.Assert; import org.junit.Test; -public class SingletonIntegrationTest { +public class SingletonUnitTest { @Test public void givenStaticInnerClass_whenMultipleTimesInstanceCalled_thenOnlyOneTimeInitialized() { diff --git a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/StaticBlockUnitTest.java similarity index 91% rename from core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/StaticBlockUnitTest.java index f98e3e14db..79ba4427bf 100644 --- a/core-java-modules/core-java-lang-oop/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java +++ b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/staticdemo/StaticBlockUnitTest.java @@ -7,7 +7,7 @@ import java.util.List; import org.junit.Test; -public class StaticBlockIntegrationTest { +public class StaticBlockUnitTest { @Test public void whenAddedListElementsThroughStaticBlock_thenEnsureCorrectOrder() { diff --git a/core-java-modules/core-java-lang-oop-4/src/test/java/com/baeldung/strictfpUsage/ScientificCalculatorUnitTest.java b/core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/strictfpUsage/ScientificCalculatorUnitTest.java similarity index 100% rename from core-java-modules/core-java-lang-oop-4/src/test/java/com/baeldung/strictfpUsage/ScientificCalculatorUnitTest.java rename to core-java-modules/core-java-lang-oop-modules/core-java-lang-oop-modifiers/src/test/java/com/baeldung/strictfpUsage/ScientificCalculatorUnitTest.java diff --git a/core-java-modules/core-java-lang-oop-modules/pom.xml b/core-java-modules/core-java-lang-oop-modules/pom.xml index c32e276a89..a77079bc06 100644 --- a/core-java-modules/core-java-lang-oop-modules/pom.xml +++ b/core-java-modules/core-java-lang-oop-modules/pom.xml @@ -18,5 +18,6 @@ core-java-lang-oop-constructors core-java-lang-oop-patterns core-java-lang-oop-generics + core-java-lang-oop-modifiers \ No newline at end of file diff --git a/core-java-modules/core-java-lang-oop/README.md b/core-java-modules/core-java-lang-oop/README.md index 2be3d0cab1..c09ed6048d 100644 --- a/core-java-modules/core-java-lang-oop/README.md +++ b/core-java-modules/core-java-lang-oop/README.md @@ -4,13 +4,11 @@ This module contains articles about Object-oriented programming (OOP) in Java ### Relevant Articles: - [Guide to hashCode() in Java](https://www.baeldung.com/java-hashcode) -- [A Guide to the Static Keyword in Java](https://www.baeldung.com/java-static) - [Polymorphism in Java](https://www.baeldung.com/java-polymorphism) - [Method Overloading and Overriding in Java](https://www.baeldung.com/java-method-overload-override) - [How to Make a Deep Copy of an Object in Java](https://www.baeldung.com/java-deep-copy) - [Guide to Inheritance in Java](https://www.baeldung.com/java-inheritance) - [Object Type Casting in Java](https://www.baeldung.com/java-type-casting) -- [The “final” Keyword in Java](https://www.baeldung.com/java-final) - [Type Erasure in Java Explained](https://www.baeldung.com/java-type-erasure) - [Variable and Method Hiding in Java](https://www.baeldung.com/java-variable-method-hiding) - [Object-Oriented-Programming Concepts in Java](https://www.baeldung.com/java-oop)