What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-17 02:05:01
java accept 2 integers from the user, and using a method add these numbers and print the result
static void M1(int num1, int num2) { int sum = num1 + num2; System.out.println("sum of " + num1 + " and " + num2+ " = " + sum); } public static void main(String[] args) { // using Methods... Add solution -
Java 2021-10-22 04:35:10
Java program to check even or odd number
import java.util.Scanner; class CheckEvenOdd { public static void main(String args[]) { int num; System.out.println("Enter an Integer number:"); //The input provided by user is stored in num Scanner input = new Scanner(Syst... Add solution -
Java 2021-10-10 16:56:04
why are my if statements not working with inputs in java
//it does not seem to work for me with using the double equal sign in //the if statement (==). Instead, try this. Scanner input = new Scanner(System.in); System.out.print("This is the user's input prompt: "); var userInput = input.next(); i... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5