This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>com.lici.maven</groupId> | |
<artifactId>maven-module</artifactId> | |
<version>${project.version}</version> | |
</parent> | |
<artifactId>data-service</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>com.lici.maven</groupId> | |
<artifactId>maven-module</artifactId> | |
<version>${project.version}</version> | |
</parent> | |
<artifactId>email-service</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>com.lici.maven</groupId> | |
<artifactId>maven-module</artifactId> | |
<version>${project.version}</version> | |
</parent> | |
<artifactId>frontend</artifactId> | |
<dependencies> | |
<dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin\java --module lici.modules.frontend/lici.modules.frontend.MyConsole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module lici.modules.db { | |
exports lici.modules.db to lici.modules.services; | |
provides lici.modules.db.MyDAO with lici.modules.db.MyDAOImpl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String str1 = "Hello"; | |
String str2 = "Hello"; | |
StringBuffer buffer1 = new StringBuffer("hello"); | |
StringBuffer buffer2 = new StringBuffer("hello"); | |
System.out.println(str1.equals(str2));//this return true | |
System.out.println(buffer1.equals(buffer2));//this return false. Because StringBuffer not override the equals method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
String str1 = "Hello"; | |
String str2 = new String("Hello"); | |
String str3 = "World"; | |
String str4 = new String("Hello"); | |
String str5 = "Hello"; | |
if(str1 == str2) { | |
System.out.println("str1 and str2 shares same memory location"); | |
} | |
if (str2 == str4) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
String first = new String("Hello")+new String("World"); | |
String second = new StringBuffer().append("Hello ").append("World").toString(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Operation { | |
public int operate(int param1, int param2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calculate { | |
public void doCalculation(Operation operation) { | |
System.out.println(operation.operate(10, 20)); | |
} | |
public static void main(String[] args) { | |
//From here i want to call doCalculation function. How it possible? | |
} | |
} |