What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-15 08:34:02
generat random string javascript
// program to generate random strings // declare all characters const characters ='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; function generateString(length) { let result = ' '; const charactersLength = characters.length; ... Add solution -
Javascript 2021-09-15 07:06:06
uppercase in word javascript
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Other 2021-09-14 01:22:03
insert * if subsequent number even - if odd
public class InsertStarBetweenEvenAndDashBetweenOdd { public static void main(String[] args) { long l=104875l; String s= ""+l; StringBuilder s2= new StringBuilder(""); s2.append(s.charAt(0)); for(int i=1;i<s.leng... Add solution -
Java 2021-09-13 13:28:04
generate random string in java
import java.util.Random; public class Generator { public static String generateRandomPassword(int len) { String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk" +"lmnopqrstuvwxyz!@#$%&"; Random rnd = new Ra... Add solution -
Javascript 2021-09-13 07:40:02
js capitalize word
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Java 2021-09-13 06:26:03
java program to remove duplicate words in a string
public static void main(String[] args) { String result = removeDup("AAABBBCCC"); System.out.println(result); // ABC public static String removeDup( String str) { String result = ""; for (int i = 0; ... Add solution
Best helpers
Ranking is empty