What do you want to save?
Add Code snippet
New code examples
-
Java 2022-02-18 23:30:11
JsonArray get first Object
private static int FIRST_ELEMENT = 0; public static void main(String[] args) { JSONArray json = new JSONArray("[{\"Hello1\":\"1\"},{\"Hello2\":\"2\"}]"); if (json.length() > 0) { Syste... Add solution -
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 -
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
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5