+ 1

Can help me to correct this programe. Shows some error

import java.util.Scanner; public class java{ public static void main( String args[]){ Scanner madhu = new Scanner (System.in); double fnum, snum, answer; System.out.println("Entre First No: "); fnum = madhu.nextdouble(); System.out.println("Enter Second no:"); snum = madhu.nextdouble(); answer = fnum + snum; System.out.println(answer); } }

19th Jul 2017, 12:17 AM
Madhu & Tulika
Madhu & Tulika - avatar
11 Respuestas
+ 7
@madhu change nextdouble() to nextDouble()
19th Jul 2017, 12:35 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 4
19th Jul 2017, 8:38 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 4
can you tell me what you are inputting and in which way
20th Jul 2017, 8:32 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 1
may be my software not working propely. thnx i got much information from you. thanks Sir,
19th Jul 2017, 9:56 AM
Madhu & Tulika
Madhu & Tulika - avatar
+ 1
my out put shows Enter First No: Enter Second No: Exception in thread "main" java.util.NoSachElementException at java.util.Scanner.throwFor(Unknow Source) at java.util.Scannner.next(Unknow Source) at java.util.Scanner.nextDouble(Unknow Source) at madhu.main(madhu.java:12) plz tell me watz the problem
19th Jul 2017, 10:07 AM
Madhu & Tulika
Madhu & Tulika - avatar
+ 1
anyone can help?
20th Jul 2017, 1:45 AM
Madhu & Tulika
Madhu & Tulika - avatar
0
import java.util.Scanner; public class madhu{ public static void main(String args[]){ Scanner mass = new Scanner (System.in); double fnum, snum, answer; System.out.println("Entre First No:"); fnum = mass.nextDouble(); System.out.println("Enter Second No:"); snum = mass.nextDouble(); answer = fnum + snum; System.out.println(answer); } } still not working
19th Jul 2017, 3:58 AM
Madhu & Tulika
Madhu & Tulika - avatar
0
watever u send me link, i opened. my output shows as mention above
20th Jul 2017, 9:22 AM
Madhu & Tulika
Madhu & Tulika - avatar
0
20th Jul 2017, 9:34 AM
Madhu & Tulika
Madhu & Tulika - avatar
20th Jul 2017, 9:34 AM
Madhu & Tulika
Madhu & Tulika - avatar
0
may be my software problem
20th Jul 2017, 9:35 AM
Madhu & Tulika
Madhu & Tulika - avatar