What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-03 11:36:54
maximum number from Array
---without sort method--- public static int maxValue( int[] n ) { int max = Integer.MIN_VALUE; for(int each: n) if(each > max) max = each; return max; ---with sort method--- public static int maxValue( int[] n ) { Arrays.sort( n ); return... Add solution -
Other 2021-11-15 04:49:10
unity 2d desplay lives left
using System.Collections; using System.Collections.Generic; using UnityEngine; public class LivesSystem : MonoBehaviour { public GameObject[] playerLives; public int currentLives; public int maxLives; // Start is called before the first ... Add solution -
Java 2021-10-09 19:04:06
java program to search item from name in class
import java.io.File; import java.io.FileNotFoundException; import java.util.* public class Catalog{ private static int MAX_ITEMS = 10; private Products[] list; private int nextItem; /** * Default constructor */ publi... Add solution -
Other 2021-10-02 07:38:03
double jump script unity
There are a lot of ways to implement the "double jump" feature. The most straight forward would be this one: public int maxJumps = 2; private int jumps; private float jumpForce = 5f; void Update() { if(Input.GetKeyDown(KeyCode.Space) || I... Add solution -
Java 2021-09-10 16:46:02
find minimum number in array java
// Find minimum and maximum values in a java array public class MaxMinValueInArray { public static void main(String[] args) { int[] arrNumber = new int[]{50, 150, 250, 500, 160, 530}; int maximum = maxNumber(arrNumber); System.out... Add solution