Skip to content

Instantly share code, notes, and snippets.

View amitprasad119's full-sized avatar
👣
I may be slow to respond.

Amit amitprasad119

👣
I may be slow to respond.
View GitHub Profile
package com.amit.problemsolving;
import java.util.Arrays;
public class ReverseArray {
public static void main(String[] args) {
int[] a = {1,2,3,4,5,6,7};
int[] b = {1,2,3,4,5,6,7};
// reverseArray(a,0,a.length-1);
public void updateData(Data data) {
if (data == null) {
return;
} else if (data.isPresent()) {
// do stuff here
} else {
trow new Exception(msg);
}
}
object TypeClassesExample extends App {
case class User(name: String, age: Int, city: String)
trait Equality[T] {
def isEqual(left: T, right: T): Boolean
}
object Equality {