0

Getting error as " identifier expected"

import.java.util.scanner; class areaofradius { public static void main (String args[]){ double ra,Areaofradius; Scanner sc=new Scanner (System.in); ra=nextDouble(); Areaofradius=3.14*ra*ra; } }

6th Nov 2017, 10:58 AM
Krishna raj
6 Antworten
+ 1
first line import java.util.Scanner; and Ra=sc.nextDouble();
6th Nov 2017, 11:05 AM
Devbrath
Devbrath - avatar
+ 1
I am also facing same kind of trouble, I hope I can find solution to same error, for following code. import java.util.Scanner; class userinput { public static void main(string args[]) { Scanner input = new Scanner(system.in); system.out.print("Dont be Furious just a single digit: "); int number = input(system.in); system.out.println("lets Assume You have suceeded in retriving " +number ); } }
4th Oct 2018, 6:00 AM
Surya Suprince
Surya Suprince - avatar
0
I'm very much beginner to Java. I want to make a list containing strings and integers. Using If statement, want to delete an element in the list which is greater than 30 and print the new list. Can anybody please correct my code. public class IfStatement{ public class Delete{ public static void main (String [] args){ String Names={"Shraddha","Manjunath"}; int ages={23,35}; if (ages>30){ del ages; } } System.out.println(Names); } }
13th Jan 2019, 4:16 PM
Shraddha Baddi
Shraddha Baddi - avatar
0
import java.util.*; // Compiler version JDK 11.0.2 class Dcoder { public static void main(String args[]) { Scanner SC =new (System.in); int principle = sc.nextInt(); float rate = sc.nextFloat(); int time =sc.nextInt(); float simpleInterest= principle*rate*time/100; System.out.println("the simple interest is"+simpleInterest) ; } }
11th Jun 2020, 8:08 AM
hanif shaikh
hanif shaikh - avatar
0
import java.util.*; // Compiler version JDK 11.0.2 class Dcoder { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int r = sc.nextInt(); int a[][] = new int[n][r]; for(int i = 0 ; i>n ; i++){ for(int j = 0 ; j>r ; j++){ a[i][j] = sc.nextInt(); } } for(int i = n-1 ; i>=0 ; i--){ for(int j = r-1 ; j>=0 ; j--){ System.out.println(a[i][j]); } } } }
3rd Aug 2020, 4:26 PM
Âňķîť Wăťťš
Âňķîť Wăťťš - avatar
0
how to reverse a array.
3rd Aug 2020, 4:27 PM
Âňķîť Wăťťš
Âňķîť Wăťťš - avatar