What do you want to save?
Add Code snippet
New code examples
-
Java 2022-02-02 22:20:15
What is IS-A relationship in java
‘Has a ‘ relationship is also known as “composition or Aggregation”. As in inheritance we have ‘extends’ keyword we don’t have any keyword to implement ‘Has a’ relationship in java. The main advantag... Add solution -
Java 2022-02-02 17:51:30
best to use java mkdir
import java.io.File; // demonstrates how to create a directory in java public class JavaCreateDirectoryExample { public static void main(String[] args) { File dir = new File("/Users/al/tmp/TestDirectory"); // attempt to create ... Add solution -
Javascript 2022-02-01 12:06:57
8.3.1. Common Array Methods // sort Examples (.sort)
//The general syntax for this method is: arrayName.sort() /*This method arranges the elements of an array into increasing order. For strings, this means alphabetical order. HOWEVER, the results are not always what we expect.*/ let letters = ['f', 'c',... Add solution -
Java 2022-02-01 03:21:12
Swapping of two numbers in java with temporary variable
// swap three variables in java without using temporary variable public class SwapThreeNumbersWithoutTemp { static int num1, num2, num3; public static void main(String[] args) { num1 = 30; num2 = 60; num3 = 90; System.out.println(&q... Add solution -
Javascript 2022-02-01 02:50:48
how to do subtraction in javascript
//To subtract in Java script, you have to put an subtraction symbol '-' between them. If you have stored two numbers in variables, just put an subtraction symbol between the variable names. //For example: var a = 6 var b = 5 var c = a-b var d = 6-5 Bot.s... Add solution -
Java 2022-02-01 01:35:26
collection vs collections
Collection is an interface in Java. But Collections is a class in Java. Collection is a base interface. Collections is a utility class in Java. Collection defines methods that are used for data structures that contain the objects. Collections define the... Add solution -
Javascript 2022-01-30 01:40:32
how to show a certain position in javascript
//How to print a specific element in javascript /*====DESCRIPTION starts here===== You can output a specific element or position of a list/array by using the output statement which is console.log(). Within it, type in the name of the array in which yo... Add solution