What do you want to save?
Add Code snippet
New code examples
-
Java 2022-02-22 20:10:19
Multiply two numbers without using arithmetic operators in java
import java.util.Scanner; public class MultiplyWithoutArithmeticOperators { static int multiplyNumber(int num1, int num2) { int output = 0; boolean boolNegative = (num1 < 0 && num2 >= 0) || (num2 < 0 && num1 >... Add solution -
Java 2022-02-16 02:00:11
Java program convert decimal to octal using while loop
import java.util.Scanner; public class DecimalToOctalUsingWhileLoop { public static void main(String[] args) { int decimal; Scanner sc = new Scanner(System.in); System.out.println("Please enter decimal number: "); d... Add solution -
Java 2022-02-02 21:50:47
converting temperature from fahrenheit to celsius
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int far = sc.nextInt(); int cel = (far - 32) * 5/9; System.out.printf("%d Fahrenheit is ... Add solution -
Java 2022-02-01 12:05:03
Java program to check if it is a sparse matrix
import java.util; public class SparseMatrix { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please enter dimensions of sparse matrix: "); int x = sc.nextInt(); int... Add solution -
Java 2022-02-01 06:51:33
read lines of file randomly java
import java.io.*; import java.util.*; public class GetLine { public static void main(String[] args) throws FileNotFoundException { System.out.println("Random Line : "+randomLine()); } public static void randomLine() throws FileNotFoun... Add solution