What do you want to save?
Add Code snippet
New code examples
-
Java 2022-01-28 21:40:48
how to set list data to android spinner
// setting branch data in manually and load to spBranchName List<String> branchList = new ArrayList<>(); branchList.add("CHITTAGONG"); branchList.add("DHAKA"); ArrayAdapter<String> bra... Add solution -
Java 2022-01-28 03:56:14
java fill list
// -- Filling with fill() method example: List<String> arrlist = new ArrayList<String>(); //Add elements in the list arrlist.add("one"); arrlist.add("two"); arrlist.add("three"); // contents of list: [AA... Add solution -
Javascript 2022-01-27 01:16:08
swap nodes algo hackerrank solution
import java.io.*; import java.math.*; import java.text.*; import java.util.*; import java.util.regex.*; public class Solution { /* * Complete the swapNodes function below. */ static class Node { int index; int depth; ... Add solution -
Javascript 2022-01-26 04:15:12
iterate through getAsJsonObject().entrySet()
JsonObject object; ArrayList<Integer> codes = new ArrayList<Integer>(); for (Map.Entry<String,JsonElement> entry : object.entrySet()) { JsonArray array = entry.getValue().getAsJsonObject().getAsJsonArray("unterfeld"); f... Add solution -
Java 2022-01-25 14:21:04
given an array of integers,create 2 dimensional arrray where the first elemnet is a distinct values from the array and second element is that value frequency with the array
import java.util.ArrayList; public class UniqueNumbersInArray { public static void main(String[] args) { int arr[] = { 4,5,5,4,5,6,5,8,4,7}; ArrayList<Integer> uniqueArr = new ArrayList<Integer>(); for (int i = 0; ... Add solution -
-
Java 2022-01-24 01:55:30
Adding Dynamically-Created Content to ArrayLists injava
import java.io.Console; import java.util.List; import java.util.ArrayList; public class App { public static void main(String[] args) { Console myConsole = System.console(); Vehicle hatchback = new Vehicle(1994, "Subaru", "Legacy... Add solution
Best helpers
Ranking is empty