What do you want to save?
Add Code snippet
New code examples
-
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 2021-11-22 02:31:31
Diamond Shape Pattern Program in Java
//Diamond Shape Pattern Program in Java import java.util.Scanner; public class Edureka { public static void main(String args[]) { int n, i, j, space = 1; System.out.print("Enter the number of rows: "); Scanner s = new Scanner(System.in); n = s.n... Add solution -
Java 2021-10-26 18:32:13
Java Console Ordering System
import java.util.*; public class cart{ //To publicly access the quantity as it updates every time you wish to buy again public static int total_quantity=0; //I have declared 4 products here public static String[] products = {null, "1.) Q... Add solution -
Java 2021-10-09 08:55:06
java accept an integer from the user. Then indicate whether it is a perfect number or not.
public static void main(String[] args) { int n, sum = 0; Scanner s = new Scanner(System.in); System.out.print("Enter any integer you want to check:"); n = s.nextInt(); for(int i = 1; i < n; i++) ... Add solution -
-
Java 2021-09-28 09:54:04
Write a java program to create a singly linked list and display the element
import java.util.Scanner;public class Main{public static void main(String[] args) {int n, sum = 0;float average;Scanner s = new Scanner(System.in);System.out.print("Enter number of elements you want in array");n = s.nextInt();int a[] = new int[n... Add solution -
Java 2021-09-24 01:18:02
Java program to swap two numbers using bitwise xor operator
import java.util.Scanner;public class Main {public static void main(String args[]){int m, n;Scanner s = new Scanner(System.in);System.out.print("Enter the first number");m = s.nextInt();System.out.print("Enter the second number");n = s... Add solution
Best helpers
Michaelyus
+5
EBA2018
+5
Eric Lewis
+5
J. Tatum
+5
Erwaman
+5
Jp_
+5
Fauve
+5
Katy Forde
+5
Jcvamp
+5
Chris
+5
Xiaotian Pei
+5