What do you want to save?
Add Code snippet
New code examples
-
Java 2021-11-16 20:12:12
java print each line of a list
//To print each item in a list we use the print line function //First we need a list, i will be using an array list to start String[] animals = {"dog", "cat", "elephant", "moose"}; //Next we need a way to go trhoug... Add solution -
Java 2021-11-08 20:33:21
stream java example
the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. It is very similar to build().perform() method in Actions class. It is cha... Add solution -
Java 2021-11-04 07:47:10
role of scanner class in java
The Java Scanner class is widely used to parse text for strings and primitive types using a regular expression. It is the simplest way to get input in Java. By the help of Scanner in Java, we can get input from the user in primitive types such as int, ... Add solution -
Java 2021-11-02 13:23:16
stringbuilder in java 8
Java StringBuilder class is used to create mutable (modifiable) string. The Java StringBuilder class is same as StringBuffer class except that it is non-synchronized. StringBuilder() creates an empty string Builder with the initial capacity... Add solution -
Java 2021-10-29 09:19:11
casting in java
Primitive Type casting and Reference Type casting PRIMITIVE CASTING: implicit casting (casting smaller type to larger int a = 100; double c = a;) explicit casting (casting larger to smaller byte b = (byte) a; REFERENCE CASTING: upcasting - implicitl... Add solution -
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5