What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-05 05:40:24
swap items in arraylist java
public class ArrayListExample { public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(Arrays.asList("a", &q... Add solution -
Java 2022-03-03 23:25:02
how to check if an arraylist contains a value in java recursion
public static boolean contains(ArrayList<Integer> list, int value) { return contains(list, value, 0); } private static boolean contains(ArrayList<Integer> list, int value, int idx) { boolean hasInt = false; if... Add solution -
Java 2022-03-03 18:00:14
how to create a draw Rectangle in java
import javax.swing.JFrame; import java.awt.Rectangle; import javax.swing.JComponent; import java.awt.Graphics2D; import java.awt.Graphics; import java.awt.Color; public class ChrismasTree { public static void main(String[] args) { JFrame wind... Add solution -
Java 2022-03-02 20:05:28
Java program find GCD and LCM of two numbers using euclid’s algorithm
import java.util.Scanner; public class GCDLCMEuclid { // gcd java void findGCD(long num1, long num2) { while(num2 > 0) { long temp = num2; num2 = num1 % num2; num1 = temp; } System.out.printl... Add solution -
Java 2022-03-01 19:40:04
add each element in an array java
import java.util.Arrays; import java.util.Scanner; public class SumOfElementsOfAnArray { public static void main(String args[]){ System.out.println("Enter the required size of the array :: "); &nbs... Add solution -
Java 2022-03-01 04:40:02
Java program to find average of n numbers
// Java program to find average of n numbers import java.util.Scanner; public class FindAverageOfNNumbers { public static void main(String[] args) { int num, count = 1; float a, average, total = 0; Scanner sc = new Scanner(S... Add solution -
PHP 2022-03-01 03:25:12
recuperer des informations d'une table parent en sql
If you want to handle sessions with a class, I wrote this little class: <?php /* Use the static method getInstance to get the object. */ class Session { const SESSION_STARTED = TRUE; const SESSION_NOT_START... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5