What do you want to save?
Add Code snippet
New code examples
-
Java 2022-02-09 12:35:24
java equal method
In general both equals() and == operator in Java are used to compare objects to check equality but here are some of the differences between the two: 1) .equals() and == is that one is a method and other is operator. 2) We can use == operator for referen... Add solution -
Java 2022-01-23 06:21:06
Leap year using conditional operator in java
// Leap year using conditional operator in java import java.util.Scanner; public class LeapYearExample { public static void main(String[] args) { long number, year, a; Scanner sc = new Scanner(System.in); System.out.println("... Add solution -
Java 2022-01-23 02:01:30
Difference between == operator and equals method in java
In general both equals() and == operator in Java are used to compare objects to check equality but here are some of the differences between the two: 1) .equals() and == is that one is a method and other is operator. 2) We can use == operator for referen... Add solution -
Javascript 2022-01-22 17:12:14
shallow copy vs deep copy js
// The '=' operator in javascript can serve the purpose of shallow vs // deep copy. // The '=' operator in javascript will assign deep copy to primitive // data types. For example: let a = 10; let b = a; b = 4; console.log(a); // Output: 10 console.log(... Add solution -
-
Javascript 2021-09-08 13:32:03
javascript '=' operator shallow copy or deep copy
// The '=' operator in javascript can serve the purpose of shallow vs // deep copy. // The '=' operator in javascript will assign deep copy to primitive // data types. For example: let a = 10; let b = a; b = 4; console.log(a); // Output: 10 console.log(... Add solution