• Post Reply Bookmark Topic Watch Topic
  • New Topic

Birthday Numerology help  RSS feed

 
Nathan Lad
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Nathan Lad
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a lot of issues trying to get the code to work I'm getting an error:

nladehoff_Numerology.java:149: error: orphaned case
case 1: System.out.printf ("=1= You will meet a new friend today.");
^
1 error
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nathan, and welcome to the Ranch!

Java is case sensitive, and all keywords are in lowercase. Look hard at the line before the one with the orphaned case.

Code posted here is much easier to read when you UseCodeTags. I'm adding them for you this time.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and that's not the only error, so get back to us if you're stuck again. But try it yourself first.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just a side note:

This is why you should never write more than 2-3 lines of code before compiling and testing. If you had written the MINIMUM amount of code needed for a switch statement, you'd have found your problem much easier.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!