[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
This commit is contained in:
parent
f23c60568c
commit
1ddd56978b
|
@ -4,8 +4,5 @@ This module contains articles about Object-oriented programming (OOP) in Java
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Anonymous Classes in Java](https://www.baeldung.com/java-anonymous-classes)
|
- [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)
|
- [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)
|
- [[<-- Prev]](/core-java-modules/core-java-lang-oop)[[More -->]](/core-java-modules/core-java-lang-oop-3)
|
||||||
|
|
|
@ -4,10 +4,8 @@ This module contains articles about Object-oriented programming (OOP) in Java
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Pass-By-Value as a Parameter Passing Mechanism in Java](https://www.baeldung.com/java-pass-by-value-or-pass-by-reference)
|
- [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 super Java Keyword](https://www.baeldung.com/java-super)
|
||||||
- [Guide to the this Java Keyword](https://www.baeldung.com/java-this)
|
- [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)
|
- [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)
|
- [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)
|
- [Java Classes and Objects](https://www.baeldung.com/java-classes-objects)
|
||||||
|
|
|
@ -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)
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>core-java-lang-oop-modules</artifactId>
|
||||||
|
<groupId>com.baeldung.core-java-lang-oop-modules</groupId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>core-java-lang-oop-modifiers</artifactId>
|
||||||
|
<name>core-java-lang-oop-modifiers</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.assertj</groupId>
|
||||||
|
<artifactId>assertj-core</artifactId>
|
||||||
|
<version>${assertj-core.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<version>${h2.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<assertj-core.version>3.10.0</assertj-core.version>
|
||||||
|
</properties>
|
||||||
|
</project>
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.accessmodifiers;
|
package com.baeldung.accessmodifiers.publicmodifier;
|
||||||
|
|
||||||
import com.baeldung.accessmodifiers.publicmodifier.ListOfThree;
|
import com.baeldung.accessmodifiers.publicmodifier.ListOfThree;
|
||||||
import com.baeldung.accessmodifiers.publicmodifier.Student;
|
import com.baeldung.accessmodifiers.publicmodifier.Student;
|
|
@ -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.Car;
|
||||||
import com.baeldung.defaultstaticinterfacemethods.model.Motorbike;
|
import com.baeldung.defaultstaticinterfacemethods.model.Motorbike;
|
|
@ -4,7 +4,7 @@ import static org.junit.Assert.*;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class CarIntegrationTest {
|
public class CarUnitTest {
|
||||||
@Test
|
@Test
|
||||||
public void whenNumberOfCarObjectsInitialized_thenStaticCounterIncreases() {
|
public void whenNumberOfCarObjectsInitialized_thenStaticCounterIncreases() {
|
||||||
new Car("Jaguar", "V8");
|
new Car("Jaguar", "V8");
|
|
@ -3,7 +3,7 @@ package com.baeldung.staticdemo;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class SingletonIntegrationTest {
|
public class SingletonUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenStaticInnerClass_whenMultipleTimesInstanceCalled_thenOnlyOneTimeInitialized() {
|
public void givenStaticInnerClass_whenMultipleTimesInstanceCalled_thenOnlyOneTimeInitialized() {
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class StaticBlockIntegrationTest {
|
public class StaticBlockUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAddedListElementsThroughStaticBlock_thenEnsureCorrectOrder() {
|
public void whenAddedListElementsThroughStaticBlock_thenEnsureCorrectOrder() {
|
|
@ -18,5 +18,6 @@
|
||||||
<module>core-java-lang-oop-constructors</module>
|
<module>core-java-lang-oop-constructors</module>
|
||||||
<module>core-java-lang-oop-patterns</module>
|
<module>core-java-lang-oop-patterns</module>
|
||||||
<module>core-java-lang-oop-generics</module>
|
<module>core-java-lang-oop-generics</module>
|
||||||
|
<module>core-java-lang-oop-modifiers</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
|
@ -4,13 +4,11 @@ This module contains articles about Object-oriented programming (OOP) in Java
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Guide to hashCode() in Java](https://www.baeldung.com/java-hashcode)
|
- [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)
|
- [Polymorphism in Java](https://www.baeldung.com/java-polymorphism)
|
||||||
- [Method Overloading and Overriding in Java](https://www.baeldung.com/java-method-overload-override)
|
- [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)
|
- [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)
|
- [Guide to Inheritance in Java](https://www.baeldung.com/java-inheritance)
|
||||||
- [Object Type Casting in Java](https://www.baeldung.com/java-type-casting)
|
- [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)
|
- [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)
|
- [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)
|
- [Object-Oriented-Programming Concepts in Java](https://www.baeldung.com/java-oop)
|
||||||
|
|
Loading…
Reference in New Issue