Fernando_1
0
Newbie Poster
Recommended Answers
Jump to PostThe problem is here:
a= kb.nextDouble(); operator = kb.nextLine(); b = kb.nextDouble();
Getting the first
nextDouble()
reads up to the next delimiter (which means whitespace), but leaves that delimiter in the stream to be read again later. Thenkb.nextLine()
reads and returns everything up …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.