This file contains hidden or 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
plugins { | |
id 'java' | |
... | |
id 'jacoco' | |
id 'jacoco-report-aggregation' | |
} | |
group = 'com.developerscoffee' | |
version = '1.0.0-SNAPSHOT' | |
sourceCompatibility = JavaVersion.VERSION_17 |
This file contains hidden or 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/bash | |
# Input Parameters | |
REGISTRY_URL=${1:-"custom-registry.com"} # Default to asia-docker.pkg.dev if not provided | |
IMAGE_NAME=${2:-"user-service"} | |
TAG_BASE=${3:-"0.0"} | |
VERSION_FILE=${4:-"version.txt"} | |
# Check and create version file if not exists | |
if [ ! -f "$VERSION_FILE" ]; then |
This file contains hidden or 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
repositories { | |
mavenCentral() | |
mavenLocal() | |
} | |
spotless { | |
java { | |
googleJavaFormat("1.7") | |
//indentWithTabs(1) | |
// indentWithSpaces(2) |
This file contains hidden or 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
class Bank { | |
private String bankName; | |
public Bank(String bankName) { // constructor | |
this.bankName = bankName; | |
} | |
public String getBankName() { // getter | |
return this.bankName; | |
} |
This file contains hidden or 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
class Teacher { | |
String designation = "Teacher"; | |
String collegeName = "CMU"; | |
void does() { | |
System.out.println("teaching"); | |
} | |
} | |
public class MathsTeacher extends Teacher { |
This file contains hidden or 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
//eg: Association in Java | |
class A { | |
int x = 10; | |
} | |
class B { | |
A a = new A(); | |
// new A()--> This is composition; part in java which is necessary. | |
// A a --> This is aggregation; part in java which is not necessary. | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>An empty page</title> | |
<script src="script.js" defer></script> | |
</head> | |
<body> | |
</body> |
This file contains hidden or 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
{"lastUpload":"2020-09-26T16:27:58.776Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
/** | |
* @author uschauha | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
int localValue = 5; | |
calculate(localValue); | |
System.out.println(localValue); | |
} |
This file contains hidden or 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
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* @author uschauha | |
*/ | |
public class TestHeap { | |
public static void main(String[] args) { |
NewerOlder