473,671 Members | 2,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reached End of File

12 New Member
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
1 2441
jkmyoung
2,057 Recognized Expert Top Contributor
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
3425
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 into a MySQL db. The fopen'ed file is a 410MB text file with log entries formatted like a .CSV file ("" text qualifiers and comma separators). Running the script from a web browser in Windows98: Works fine, except it stops about 1/10th of...
6
44098
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 scott/tiger@common control=/full_path/test.ctl log=/full_path/adhoc/test.log SQL*Loader: Release 9.2.0.1.0 - Production on Tue Sep 2 10:49:27 2003 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
15
6720
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 utilities DIAG_ERROR Probe:0 Database:SRMW LOADID: 1286274.2006-06-03-02.58.31.581068.0 (4;125) Error loading partition. 0, fffffffffffff43d, Detected in file:
0
1305
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 NX_SQL_QUEUE_LIMIT of 50 has been reached. FETCH Message queuing has begun. 01/11 15:54:15.49 sdpprim sql_agent 27772 SIGNIFICANT sqlsrvr.c 2220 FETCH Message queuing has stopped. Message handling has returned to normal. Max in queue was:1...
1
15433
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 2.0 project that is residing on the share. I
1
1613
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 continued writing (no need to close and open, so that it was very quick). How is it the best .net way to get this "file change" the quickest possible? Thanks! Ricardo Vázquez.
1
2203
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, the request should be terminated. I want to know how to track that process in execution and terminate that process once timeout value reached. I have developed routines for getting the details from db, now i need suggestion for tracking the...
3
11935
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 add to it for my next assignment. I dont want to go to my next assignment when I cannot even fix this error. The error and it is the only error I have thank goodness, says "reached end of file while parsing". Can anyone please take a look, thank you...
1
4540
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 "14". db panic on the following error: MESSAGE : ADM6017E The table space "BALANCE_TSD" (ID "7") is full. Detected on
1
5398
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
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8821
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.