473,385 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Reached End of File

getting 1 error that reads-110 reached end of file while parsing


Expand|Select|Wrap|Line Numbers
  1. import java.util.Scanner; 110 reached end of file while parsing
  2.  
  3. public class Christmas
  4. {
  5.     // main method begins execution of java appplication
  6.    public static void main( String args[] )
  7.     {
  8.        // create Scanner to obtain input from command window
  9.        Scanner input = new Scanner( System.in );
  10.  
  11.        int song = (1-12);
  12.  
  13.     for ( int song = 1; song <= 12 ; song++ )
  14.     {
  15.  
  16.     switch ( song / 12 )
  17.     {
  18.     case 12: System.out.println
  19.        ("On the twelfth day of Christmas my true love sent to me"); 
  20.     break; // exit switch
  21.  
  22.     case 11: System.out.println
  23.         ("On the eleventh day of Christmas my true love sent to me"); 
  24.     break; // exit switch
  25.  
  26.     case 10: System.out.println
  27.         ("On the tenth day of Christmas my true love sent to me"); 
  28.     break; // exit switch
  29.  
  30.     case 9: System.out.println
  31.         ("On the ninth day of Christmas my true love sent to me");
  32.     break; // exit switch
  33.  
  34.     case 8: System.out.println
  35.         ("On the eighth day of Christmas my true love sent to me");
  36.     break; // exit switch
  37.  
  38.     case 7: System.out.println
  39.         ("On the seventh day of Christmas my true love sent to me"); 
  40.     break; // exit switch
  41.  
  42.     case 6: System.out.println
  43.         ("On the sixth day of Christmas my true love sent to me"); 
  44.     break; // exit switch
  45.  
  46.     case 5: System.out.println
  47.         ("On the fifth day of Christmas my true love sent to me");
  48.     break; // exit switch
  49.  
  50.     case 4: System.out.println
  51.         ("On the fourth day of Christmas my true love sent to me"); 
  52.     break; // exit switch
  53.  
  54.     case 3: System.out.println
  55.         ("On the third day of Christmas my true love sent to me"); 
  56.     break; // exit switch
  57.  
  58.     case 2: System.out.println
  59.         ("On the second day of Christmas my true love sent to me");
  60.     break; // exit switch
  61.  
  62.     case 1: System.out.println
  63.         ("On the first day of Christmas my true love sent to me");
  64.     break; // exit switch
  65.     }
  66.  
  67.     switch ( song / 12 )
  68.     {
  69.     case 12: System.out.println 
  70.         ("twelve drummers drumming");
  71.  
  72.     case 11: System.out.println
  73.         ("eleven pipers piping");
  74.  
  75.     case 10: System.out.println
  76.         ("ten lords a-leaping");
  77.  
  78.     case 9: System.out.println
  79.         ("nine ladies dancing");
  80.  
  81.     case 8: System.out.println
  82.         ("eight maids a-milking");
  83.  
  84.     case 7: System.out.println
  85.         ("seven swans a-swimming");
  86.  
  87.     case 6: System.out.println
  88.         ("six geese a-laying");
  89.  
  90.     case 5: System.out.println
  91.         ("five golden rings");
  92.  
  93.     case 4: System.out.println
  94.         ("four calling birds");
  95.  
  96.     case 3: System.out.println
  97.         ("three french hens");
  98.  
  99.     case 2: System.out.println
  100.         ("two turtle doves");
  101.  
  102.     case 1: System.out.println
  103.         ("a partridge in a pear tree");
  104.     } // end switch
  105.  
  106. } // end class Christmas
  107.  
  108.  
Apr 25 '10 #1

✓ answered by jkmyoung

You're missing a } for main

1 2427
jkmyoung
2,057 Expert 2GB
You're missing a } for main
Apr 27 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: James Butler | last post by:
Running a CLI script that fopen's a file, parses the lines into an array, checks the array entries against a few regular expression qualifiers (i.e. !eregi("bot",$entry)) and dump the good entries...
6
by: Hari Om | last post by:
Here are the details of my error log files: I execute the command and get following message at console: ---------------------------------------------------------------------- ../sqlldr...
15
by: jane | last post by:
We are getting this error during a large large load. 2006-06-03-02.58.31.688266 Instance:sieinst Node:000 PID:1286274(db2agent (SRMW) 0) TID:1 Appid:GAFE423C.P4CE.0671B3070116 database...
0
by: oddemann | last post by:
Hi. I have a problem that I can`t find solution to. The errorlog i full of this. 01/11 15:54:15.36 sdpprim sql_agent 27772 SIGNIFICANT sqlsrvr.c 2136 The limit set by...
1
by: yoram.ayalon | last post by:
Hello, we have this situation. web farm, several server 2003 machines, and several win2K, SP 4 machines all machines access files on a Network appliance using CIFS I am testing a ASP.NET...
1
by: Ricardo Vazquez | last post by:
I'm writing log information into a file (via StreamWriter). When it reached a 4GB size, my MFC/C++ code copied that file to another name, truncated its length to 0 (CFile::SetLength(0)), and...
1
by: sri6412 | last post by:
I am trying to get the user details from the database, the request handler is in execution, but mean while i would like to verify the timeout value. Once request processing reached timeout value,...
3
by: spittinfire | last post by:
-------------------------------------------------------------------------------- I am trying to correct the errors on an assignment that has already been graded because I have to now modify it and...
1
by: Ultrak The DBA | last post by:
64 bit instance: DB21085I Instance uses "64" bits and DB2 code release "SQL08027" with level identifier "03080106". Informational tokens are "DB2 v8.1.1.128", "s061108", "U810098", and FixPak...
1
by: kk975kom | last post by:
Hi can somebody help me ,iam trying to compile my java program but display error was reached end of file while parsing .please find the error in program.
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.