What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-30 02:41:09
Java program to print alphabets using ascii values
// Java program to print alphabets using ascii values public class PrintAlphabetUsingAscii { public static void main(String[] args) { char ch = 'B'; int ascii = ch; int castAscii = (int) ch; System.out.println("asci... Add solution -
Java 2021-10-28 18:46:15
https //introcs.cs. princeton.edu/java/15inout/gui.java.html
/****************************************************************************** * Compilation: javac GUI.java * Execution: java GUI * * A minimal Java program with a graphical user interface. The * GUI prints out the number of times the user ... Add solution -
Java 2021-10-28 09:47:06
why we use static in java
//Java Program to get the cube of a given number using the static method using static before a method or variable we can access it by not creating a instance of it.in the program we directly used student.cube(5) class Calculate{ static int cube(int... Add solution -
Java 2021-10-27 14:52:07
Java program to find maximum and minimum number without using array
// Java program to find maximum and minimum number without using array import java.util.Scanner; public class MaximumMinimumWithoutArray { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println(&... Add solution -
Java 2021-10-26 14:14:10
reading zip file in java
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Date; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.ut... Add solution -
Java 2021-10-25 15:51:14
difference betweeen == and .equals() in java
// Java program to understand // the concept of == operator and .equals() method public class Test { public static void main(String[] args) { String s1 = new String("HELLO"); String s2 = new String("HELLO"); ... Add solution -
Java 2021-10-25 08:19:18
what is jvm jdk and jre
Java Virtual Machine: JVM is an abstract machine. It actually runs by Java code. Most people know Java with this slogan "Write once and run everywhere' This slogan is because of JVM. • Java Runtime Environment : JRE is what we need to run a J... Add solution -
Java 2021-10-25 07:58:10
java read csv file into arraylist
import java.io.BufferedReader; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; /** * Simple Java ... Add solution -
Java 2021-10-25 07:12:14
a recursive function that calculates the greatest common divisor from user's input in java
/** * Java program to demonstrate How to find Greatest Common Divisor or GCD of * two numbers using Euclid’s method. There are other methods as well to * find GCD of two number in Java but this example of finding GCD of two number * is most si... Add solution