import java.util.Scanner; public class Program { public static void main(String[] args) { System.out.println("enter y | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 4

import java.util.Scanner; public class Program { public static void main(String[] args) { System.out.println("enter y

Please explain me what error that may face by me

12th Jan 2022, 7:42 PM
ABHISHEK MANE
ABHISHEK MANE - avatar
9 Answers
+ 3
Thanks a lot
13th Jan 2022, 9:15 AM
ABHISHEK MANE
ABHISHEK MANE - avatar
+ 2
package newone; import java.util.*; public class november29_2022_part3 public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int n-sc.nextInt(); for (int i=1;i<11; i++); { System.out.println (i*n); } }
29th Nov 2022, 8:23 PM
soumyadeep dash
soumyadeep dash - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner read = new Scanner(System.in); int password;
27th Apr 2022, 10:23 PM
Mensah Jonathan
Mensah Jonathan - avatar
0
import java.util.Scanner;   public class SumOfNumbers2   {   public static void main(String args[])   {   int x, y, sum;   Scanner sc = new Scanner(System.in);   System.out.print("Enter the first number: ");   x = sc.nextInt();   System.out.print("Enter the second number: ");   y = sc.nextInt();   sum = sum(x, y);   System.out.println("The sum of two numbers x and y is: " + sum);   }   //method that calculates the sum   public static int sum(int a, int b)   {   int sum = a + b;   return sum;   }   }   Is this correct or not please explain me errors
4th Oct 2022, 2:01 AM
Raghvandra Pal
Raghvandra Pal - avatar
0
I have a problem in my code can any one help me to slove it
29th Nov 2022, 8:24 PM
soumyadeep dash
soumyadeep dash - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int temp = sc.nextlnt(); if(temp <=100) { System.out.println("Boiling"); } else { System.out.println("Not boiling"); } } }
2nd Jan 2023, 11:39 PM
Ibrahim Bashar
Ibrahim Bashar - avatar
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc= new Scanner(System.in); int cash=sc.nextInt(); if (cash < 10) { /* code */ System.out.println("you donn't have enough money"); System.out.println("get more money"); } else if (cash>10 && cash<50) { System.out.println("you can get onething"); } else{ System.out.println("you can buy both"); } } } Please explain where is error...
1st Feb 2023, 2:53 AM
snsabbir nisa26
snsabbir nisa26 - avatar
0
// DebugFive4.java // Outputs highest of four numbers import java.util.*; public class DebugFive4 { public static void main (String args[]) { Scanner input = new Scanner(System.in); int one, two, three, four; String str, output; System.out.println("Enter an integer"); str = input.next(); one = Integer.parseInt(str); System.out.println("Enter an integer"); str = input.next(); two = Integer.parseInt(str); System.out.println("Enter an integer"); str = input.next(); three = Integer.parseInt(str); System.out.println("Enter an integer"); str = input.next(); four = Integer.parseInt(str); if(one > two > one > three > one > four) output = "Highest is " + four; else if(two > one && two > three !! two > four) output = "Highest is " + three; else if(three > one && three > two && three > four) output = "Highest is " + three; else output = "Highest is " + four; System.out.println(output); } }
24th Feb 2023, 9:43 PM
Ismael Gonzalez
Ismael Gonzalez - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { //
23rd Sep 2023, 6:32 PM
S115 Yadav Rahul Jagdish
S115 Yadav Rahul Jagdish - avatar