A SIMple ..erRor ... ...help

ITZ A LONG CODE...BUT THIS ERROR IS PROPPIN UP.....THNK U GUYZ WOULD BE ABLE TO CARCK IT ....PLZ HELP.....ALLL BRACKETS WHERE CHECKED BUT STILL GIVES ONE ERROR....PLZ HELP...GOIN NUTS ...
C:\j2sdk1.4.2_08\bin\New Folder> "C://j2sdk1.4.2_08\bin\javac" Clicka.java
Clicka.java:14: '}' expected
*^*
*1 error*
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.io.FileReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.lang.*;
public class Clickb implements ActionListener
public void actionPerformed(ActionEvent event)
JOptionPane.showMessageDialog(null,"Data is sent via serial port!");
/* the Intelhex file has lines of code. each line begins with a : */
/* next is number of bytes in the line */
/* offset in the hex file where the line length is stored */
public static final int LL=1;
public static final int MEMORY=1024;
/* offset in the hex file where the destination address is stored */
public static final int ADDR=3;
public static final int ZEROS=7;
/* offset of the beginning of the code */
public static final int CODE_ST=9;
//public char chartoi(char val)
//char temp;
//int tempn;
//temp = Character.toUpperCase(val);
//String change = String.valueOf(temp);
//tempn=Integer.parseInt(change);
//if(tempn>0x39) {tempn = tempn -0x37;}          /*Obtains the numeric values from the ascii values in the hex file*/
//else {tempn=tempn-0x30;}
//change=Integer.toString(tempn);
//temp=change[0];
//return temp;
public int fill_buffer( )
char ch,temp1, temp2,temp4,temp3;
int next1,next2,next3;
int chk_sum=0;
int line_length, address, line_temp, count=0,next=0;
int[] ram;
FileReader reader =null;
BufferedReader f =null;
try{
reader = new FileReader(Click.input);
f = new BufferedReader(reader);
catch (FileNotFoundException e)
System.err.println("FileNotFoundException: "
+ e.getMessage());
int k = 0;
try{
char[] store = new char[500];
int i=0;
while((k=f.read())!=-1)
while(k!='\n')
int m=0;
store[m]=(char)k;
if (k=='\n');
i++; //TOTAL NUMBER OF LINES IN THE HEX FILE LOADED
m++;
System.out.println(store);
if( store[0] != ':')
System.out.println("\nError . . .Source file not in Intelhex format. Aborting");          /*CHECKING THE SEMICOLON*/
f.close();
return 0;
temp1=store[LL];
temp2=store[LL+1];
if(!Character.isDigit(temp1))
System.out.println("\nError in source file. Aborting"); /*CHECKING THE LINE LENGTH*/
f.close();
return 0;
if( !Character.isDigit(temp2) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
next= Character.getNumericValue(temp1);
next1= Character.getNumericValue(temp2);
chk_sum=chk_sum+next1+16*next;
line_length = 16*next + next1;
//OBTAINING ADDRESS FROM HEX FILE
temp1=store[ADDR];
temp2=store[ADDR+1];
temp3=store[ADDR+2];
temp4=store[ADDR+3];
if( !Character.isDigit(temp1) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
if( !Character.isDigit(temp2) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;                                        /* DETERMINE THE ADDRESS WHERE DATA IS TO BE PLACED*/
if( !Character.isDigit(temp3) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
if( !Character.isDigit(temp4) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
next= Character.getNumericValue(temp1);
next1= Character.getNumericValue(temp2);
next2= Character.getNumericValue(temp3);
next3= Character.getNumericValue(temp4);
chk_sum = chk_sum + 16*next + next1;
chk_sum = chk_sum + 16*next + next1;
address = 4096*next + 256 * next1 + 16*next2 + next3;
if(address > MEMORY)
System.out.println("\nError in source file. Bad address. Aborting");
f.close();
return 0;
String total =String.valueOf(address);
//CHECKING FOR PRESENCE OF ZERO IN THE HEX FILE
temp1=store[ZEROS];
temp2=store[ZEROS+1];
next= Character.getNumericValue(temp1);
next1= Character.getNumericValue(temp2);
next2 = 16*next + next1;
if(next2 != 0)
System.out.println("\nError . . . Source file not in Intelhex format. Aborting"); /*CHECKING FOR PROPER INTELHEX FILE*/
f.close();
return 0;
/* now read bytes from the file & put it in buffer */
for(line_temp=0; line_temp<line_length; line_temp++)
temp1=store[2*line_temp+CODE_ST];
temp2=store[2*line_temp+CODE_ST+1];
if( !Character.isDigit(temp1) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
if( !( Character.isDigit(temp2)) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
next= Character.getNumericValue(temp1);
next1= Character.getNumericValue(temp2);
next2= (16*next) + next1;
chk_sum=chk_sum+next2;
if(address > MEMORY)
System.out.println("\nError in source file. Bad address. Aborting");
f.close();
return 0;
String get =String.valueOf (next2);
total=total.concat(get);
/* DATA AT THE PARTICULAR ADDRESS IS STORED IN THE ARRAY "RAM"*/
count++;
//INDICATES THE DATA UNTIL '/n' IS ONE LINE OF INTELHEX FILE
/* get the next byte. this is the chksum */
temp1=store[2*line_length+CODE_ST];
temp2=store[2*line_length+CODE_ST+1];
if( !Character.isDigit(temp1) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
if( !Character.isDigit(temp2) )
System.out.println("\nError in source file. Aborting");
f.close();
return 0;
next= Character.getNumericValue(temp1);
next1= Character.getNumericValue(temp2);
next2= 16*next + next1;
chk_sum=chk_sum+next2;
if(chk_sum !=0)
System.out.println("\nChecksum Error . . . Aborting");
f.close();
return 0;
catch (IOException e)
System.err.println("FileNotFoundException: "
+ e.getMessage());
return(1);
//SERIAL COMMUNICATION CODE
SimpleSerialNative ss; // declare the SimpleSerial object
ss = new SimpleSerialNative(3); // new up the SimpleSerial object
boolean z=ss.writeString((String)total); // write a string to the serial port
try { Thread.sleep(1); } catch (InterruptedException e) {}
String inputString = ss.readString(); // read any string from the serial port.
System.out.println("I read the string: " + inputString);
Edited by: maneesh2706 on Jun 1, 2008 1:12 AM

iam soory not aware of this
C:\j2sdk1.4.2_08\bin\New Folder> "C://j2sdk1.4.2_08\bin\javac" Clicka.java
Clicka.java:14: '}' expected
*^*
*1 error*
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.io.FileReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.lang.*;
public class Clickb implements ActionListener
       public void actionPerformed(ActionEvent event)
            JOptionPane.showMessageDialog(null,"Data is sent  via serial port!");
        /* the Intelhex file has lines of code. each line begins with a : */
/* next is number of bytes in the line */
/* offset in the hex file where the line length is stored */
public static final int LL=1;
public static final int MEMORY=1024;
/* offset in the hex file where the destination address is stored */
public static final int ADDR=3;
public static final int ZEROS=7;
/* offset of the beginning of the code */
public static final int CODE_ST=9;
//public char chartoi(char val)
//char temp;
//int tempn;
//temp = Character.toUpperCase(val);
//String change = String.valueOf(temp);
//tempn=Integer.parseInt(change);
//if(tempn>0x39) {tempn = tempn -0x37;}          /*Obtains the numeric values from the ascii values in the hex file*/
//else {tempn=tempn-0x30;}
//change=Integer.toString(tempn);
//temp=change[0];
//return temp;
public int fill_buffer( )
                          char ch,temp1, temp2,temp4,temp3;
                           int  next1,next2,next3;
                           int chk_sum=0;
                           int line_length, address, line_temp, count=0,next=0;
                           int[] ram;
                        FileReader reader =null;
                        BufferedReader f  =null;
                        try{
                                reader = new FileReader(Click.input);
                                     f = new BufferedReader(reader);
                        catch (FileNotFoundException e)
                                                 System.err.println("FileNotFoundException: "
                                                + e.getMessage());
                        int k = 0;
                        try{
                               char[] store = new char[500];
                               int i=0;
                        while((k=f.read())!=-1)
                                while(k!='\n')
                                    int m=0;
                                    store[m]=(char)k;
                                    if (k=='\n');
                                    i++;                 //TOTAL NUMBER OF LINES IN THE HEX FILE LOADED
                                    m++;
                              System.out.println(store);
                            if( store[0] != ':')
                                System.out.println("\nError . . .Source file not in Intelhex format. Aborting");          /*CHECKING THE SEMICOLON*/
                                f.close();
                                return 0;
                            temp1=store[LL];
                            temp2=store[LL+1];
                            if(!Character.isDigit(temp1))
                              System.out.println("\nError in source file. Aborting");         /*CHECKING THE LINE LENGTH*/
                              f.close();
                              return 0;
                            if( !Character.isDigit(temp2) )
                              System.out.println("\nError in source file. Aborting");
                              f.close();
                              return 0;
                             next= Character.getNumericValue(temp1);
                            next1= Character.getNumericValue(temp2);
                            chk_sum=chk_sum+next1+16*next;
                            line_length = 16*next + next1;
                            //OBTAINING ADDRESS FROM HEX FILE
                            temp1=store[ADDR];
                            temp2=store[ADDR+1];
                            temp3=store[ADDR+2];
                            temp4=store[ADDR+3];
                            if( !Character.isDigit(temp1) )  
                                System.out.println("\nError in source file. Aborting");
                                f.close();
                                return 0;
                            if( !Character.isDigit(temp2) )  
                                System.out.println("\nError in source file. Aborting");
                                f.close();
                                return 0;                                        /* DETERMINE THE ADDRESS WHERE DATA IS TO BE PLACED*/
                            if( !Character.isDigit(temp3) )
                                System.out.println("\nError in source file. Aborting");
                                f.close();
                                return 0;
                            if( !Character.isDigit(temp4) )
                                System.out.println("\nError in source file. Aborting");
                                f.close();
                                return 0;
                              next= Character.getNumericValue(temp1);
                             next1= Character.getNumericValue(temp2);
                             next2= Character.getNumericValue(temp3);
                             next3= Character.getNumericValue(temp4);
                            chk_sum = chk_sum + 16*next + next1;
                            chk_sum = chk_sum + 16*next + next1;
                            address = 4096*next + 256 * next1 + 16*next2 + next3;
                            if(address > MEMORY)
                                System.out.println("\nError in source file. Bad address. Aborting");
                                f.close();
                                return 0;
                            String total =String.valueOf(address);
                            //CHECKING FOR PRESENCE OF ZERO IN THE HEX FILE
                            temp1=store[ZEROS];
                            temp2=store[ZEROS+1];
                              next= Character.getNumericValue(temp1);
                              next1= Character.getNumericValue(temp2);
                              next2 = 16*next + next1;
                      if(next2 != 0)
                          System.out.println("\nError . . . Source file not in Intelhex format. Aborting");  /*CHECKING FOR PROPER INTELHEX FILE*/
                          f.close();
                          return 0;
                    /* now read bytes from the file & put it in buffer */
                    for(line_temp=0; line_temp<line_length; line_temp++)
                      temp1=store[2*line_temp+CODE_ST];
                      temp2=store[2*line_temp+CODE_ST+1];
                        if( !Character.isDigit(temp1) )
                            System.out.println("\nError in source file. Aborting");  
                            f.close();
                            return 0;
                        if( !( Character.isDigit(temp2)) )
                            System.out.println("\nError in source file. Aborting");
                            f.close();
                            return 0;
                         next= Character.getNumericValue(temp1);
                         next1= Character.getNumericValue(temp2);
                        next2= (16*next) + next1;
                        chk_sum=chk_sum+next2;
                        if(address > MEMORY)
                            System.out.println("\nError in source file. Bad address. Aborting");
                            f.close();
                            return 0;
                          String get =String.valueOf (next2);
                          total=total.concat(get);
                                                        /* DATA AT THE PARTICULAR ADDRESS IS STORED IN THE ARRAY "RAM"*/
                          count++;
                          //INDICATES THE DATA UNTIL '/n' IS ONE LINE OF INTELHEX FILE
                          /* get the next byte. this is the chksum */
                          temp1=store[2*line_length+CODE_ST];
                          temp2=store[2*line_length+CODE_ST+1];
                          if( !Character.isDigit(temp1) )
                            System.out.println("\nError in source file. Aborting");
                            f.close();
                            return 0;
                          if( !Character.isDigit(temp2) )
                            System.out.println("\nError in source file. Aborting");
                            f.close();
                            return 0;
                           next= Character.getNumericValue(temp1);
                           next1= Character.getNumericValue(temp2);
                          next2= 16*next + next1;
                          chk_sum=chk_sum+next2;
                          if(chk_sum !=0)
                            System.out.println("\nChecksum Error . . . Aborting");
                            f.close();
                            return 0;
                 catch (IOException  e)
                         System.err.println("FileNotFoundException: "
                        + e.getMessage());
              return(1);
                    //SERIAL COMMUNICATION CODE
               SimpleSerialNative ss; // declare the SimpleSerial object
                ss = new SimpleSerialNative(3); // new up the SimpleSerial object
                boolean z=ss.writeString((String)total); // write a string to the serial port
                 try { Thread.sleep(1); } catch (InterruptedException e) {}
                  String inputString = ss.readString(); // read any string from the serial port.
                  System.out.println("I read the string: " + inputString);
       

Similar Messages

  • Simple Error on sessionScope ?

    Dear Friends,
    There is a very simple error in the programming code given below on sessionScope-
    <c:set var="pname" scope="session" value="${param.pname}"/>
    <sql:query var="nsr" scope="request">
      SELECT add,ph,credit FROM personalrecord
        WHERE pname = ?
      <sql:param value="${sessionScope.pname}" />
    </sql:query>
    <jsp:forward page="result1.jsp" />evnafets and others gave me many suggestion regarding this problem. But due to the error in this part of the code the pname value doesn't pass to any query of my programme from main.jsp. So I get only one reply Sorry, there is no record. Please help me in finding it.
    Previous discussion link is [http://forums.sun.com/thread.jspa?messageID=10925669&#10925669]
    thanking you.

    skum76 wrote:
    Now , I don't ask any help from you people and try to solve my questions myself whether questions need 1 year or 2 years time duration. byeWell, you were given good advice about using MVC design.
    Those sql tags in JSPs are evil and should not be used for any real application.
    Separate concerns and do database manipulations in helper Java classes, use servlets for controller and JSPs for the view only.

  • I have an hp office jet 4500 and os maverick 10.9.4 and I can't get it to print after last upgrade, multiple malfunctions and error, help?

    I have an hp office jet 4500 and os maverick 10.9.4 and I can’t get it to print after last upgrade, multiple malfunctions and error, help? I have tried deleting and resetting printer and re-installing update 6 times. Last update attempt showed none available??? I can’t load the software directly from HP because their only option is to use the software update option on the mac....frustrated!!! Help!!
    I get blank pages that just run through the printer and a stats window that just 33% complete and goes no further.

    I am going on the guess that an old driver is still installed...
    Use Finder Go > go to folder, and go to /Library/Printers and delete the HP folder(s).
    Reset the Printing System:
    OS X Mavericks: Reset the printing system
    Now, Add the printer in Print & Scan prefs.

  • I updated to the latest IOS and now my passwords don't work.  Reset 4 time which reset for my iPad and iPhone but I cant log into my itunes account using my apple ID it indicates an error, Help?

    I updated to the latest IOS and now my passwords don't work.  Reset 4 time which reset for my iPad and iPhone but I cant log into my itunes account using my apple ID it indicates an error, Help?

    This may sound crazy, but download any free app.  This often "shocks" the other apps into working.

  • HT6208 Cannot download the latest update 7.1.1 even though plugged in and on wifi keeps saying error help!!!!!

    Cannot download the latest update 7.1.1 even though plugged in and on wifi keeps saying error help!!!!!

    I am not getting an errr #. It just says that there are purchases on my ipod, not in my itunes. I transfer all of my ipod purchases into itunes. Then I try an download the new version of my ipod 7.1.1. It still says there are purchases on my ipod touch. So I just hit continue because their are not purchases on my ipod, that aren't in itunes. It extracts the software, and backs up ipod. Then itunes just closes. When I reopen it I get the same message A new iPod software version (7.1.1) is available for the iPod “My" iPodl”. Would you like to update your iPod now? My imac has recently been restored to as new, I have the newest ipod touch, and my version of itunes is also the newest version. The only thing that I can assume is that the problem, is another untested & bad update, from Capn Cook.

  • When m testing webdynpro abap application m getting this error  help me to get solution

    hi all,
    when m testing webdynpro abap application m getting this error  help me to get solution.
    plz find the screen shot

    Hi
    I think you are using the IDES system, Can you check the services in SICF transaction. If the service is not activated you activate it again.
    In this path you will find  in the below path and try to check/activate the services relevant to the WDA stack.
    sap/bc/webdynpro/sap

  • Simple error... Unknown solution...?

    Alright well this is a simple error and when i got it i thought alright well that's simple enough to fix.
    But wow wth, it won't fix. Lol.
    This is the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: server (wrong name: n
    et/stanyer/server)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$000(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Press any key to continue . . .At first, you think "wth, obviously you are directing it to the wrong class name..." but i'm not ;S
    This is the directory of the run file; C:\Documents and Settings\Administrator\Desktop\stanyer_new
    This is the location of the class file "server"; C:\Documents and Settings\Administrator\Desktop\stanyer_new\bin\net\stanyer\server.class
    And this is my run.bat file;
    @echo off
    title Stanyer's 503 (server)
    cd bin/net/stanyer/
    java -Xmx1024m server 43594
    pauseWhat on earth am i doing wrong? Thanks.
    Edited by: Ryan_Stanyer on Aug 9, 2008 1:25 PM

    Works..
    But errrrr;
    Exception in thread "main" java.lang.NoSuchMethodError: main
    Press any key to continue . . .However:
    * @author Stanyer
    * The main class of the server, contains the method main(String[] args)
    * which is the first method called and the entire server is started from
    * that method, so any important variables that need to be set can be set
    * from within that method.
    package net.stanyer;
    import net.stanyer.misc.*;
    import java.io.*;
    import java.net.*;
    import java.text.*;
    import java.util.*;
    public class server implements Runnable {
         protected misc _misc = new misc();
         protected ServerSocket main_socket;
         protected boolean server_active = true;
         protected int port;
         public server() {
         public void main(String[] args) {
              port = _misc.parse_int(args[0]);
         public void run() {
              try {
                   main_socket = new ServerSocket(port);
                   _misc.cmd_log("Server was opened on port: "+port+".");
              } catch(Exception _ex) {
                   server_active = false;
                   _misc.cmd_log("Server was unable to start: port may already be in use?");
    }There is a main method.. Lol?

  • Can't authorize ADE, get an activation server error - help?

    can't authorize ADE, get an activation server error - help?

    per YuvrajShinde071 
    Follow these steps,
    1. Launch Adobe Digital Editions
    2. Keeping ADE program active on your screen, Hold Ctrl+Shift+D keys.
         - you will get a prompt window to Erase Authorization (ADE 2.0) & Deauthorize (ADE 1.7.2)
         - Deauthorize ADE and Re-launch it.
    3. Navigate to Help > Authorize Computer (in ADE 2.0) & Library > Authorize ( in ADE 1.7.2, usually you will be prompted to authorize when you launch the program ) .

  • I have ipod nano 6G.I was trying to restore it to clear all the data but it showed error 1439 and couldn't restore.I tried every method given in errors help page but nothing worked.What should i do?

    I have ipod nano 6G.I was trying to restore it to clear all the data but it showed error 1439 and couldn't restore.I tried every method given in errors help page but nothing worked.What should i do?

    Just in case (even though your symptoms aren't explicitly mentioned in the document), let's check to see if there's a LSP problem in play here:
    Apple software on Windows: May see performance issues and blank iTunes Store

  • A simple error

    I am relatively new to java and I'm really struggling on a uni assignment. This is probably a very simple error to fiz but I can't seem to be able to solve it. Thanks in advance.
    java:28: incompatible types
    found : void
    required: int
    Year = getYear();
    ^
    1 error
    Tool completed with exit code 1:
    public static void main(String[] args) throws IOException
         String entry, anyEntry;
         char option;
         int month;
         int Year;
         initialiseVariables();
         Year = getYear();
    }

    Ok I get that but I have tried using String, Long and int and they all have problems. I have also got some other errors that I need explaining:
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:25: incompatible types
    found : void
    required: int
              int Year = getYear();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:26: incompatible types
    found : void
    required: boolean
              boolean LeapYear = isLeapYear(Year);
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:27: incompatible types
    found : java.lang.String
    required: java.io.File
              File DataFile = ("Data" + Year + ".txt");
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:33: getMonthDays(int,java.lang.String) in Meteorological cannot be applied to (int,boolean)
                   int NumDays = getMonthDays(month,LeapYear);
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:40: incompatible types
    found : void
    required: int
                   int MonthNum = getMonth();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:44: cannot find symbol
    symbol : variable reply
    location: class Meteorological
              }while (reply.equals("y"));
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:68: cannot find symbol
    symbol : variable Year
    location: class Meteorological
              Year = input.nextLine ();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:69: cannot find symbol
    symbol : variable FileName
    location: class Meteorological
              FileName = ("Data" + Year + ".txt");
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:69: cannot find symbol
    symbol : variable Year
    location: class Meteorological
              FileName = ("Data" + Year + ".txt");
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:70: cannot find symbol
    symbol : variable FileName
    location: class Meteorological
              while (!FileName.exists())
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:74: incompatible types
    found : java.lang.String
    required: int
                        int Year = input.nextLine ();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:75: cannot find symbol
    symbol : variable FileName
    location: class Meteorological
                        FileName = ("Data" + Year + ".txt");
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:77: cannot return a value from method whose result type is void
              return Year;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:96: cannot return a value from method whose result type is void
              return LeapYear;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:108: incompatible types
    found : java.lang.String
    required: int
              Rainfall[MonthNum] = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:110: incompatible types
    found : java.lang.String
    required: int
              MaxTemp[MonthNum] = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:112: incompatible types
    found : java.lang.String
    required: int
              MaxDay[MonthNum] = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:114: incompatible types
    found : java.lang.String
    required: int
              SunHours[MonthNum] = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:124: MonthNum is already defined in getMonthDays(int,java.lang.String)
              int MonthNum;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:127: cannot return a value from method whose result type is void
                   return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:131: cannot return a value from method whose result type is void
                        return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:135: cannot return a value from method whose result type is void
                        return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:139: cannot return a value from method whose result type is void
                        return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:143: cannot return a value from method whose result type is void
                        return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:147: cannot return a value from method whose result type is void
                        return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:151: cannot return a value from method whose result type is void
                        return "31";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:155: cannot return a value from method whose result type is void
                        return "30";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:159: cannot return a value from method whose result type is void
                        return "30";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:163: cannot return a value from method whose result type is void
                        return "30";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:167: cannot return a value from method whose result type is void
                        return "30";
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:169: operator && cannot be applied to boolean,java.lang.String
              if (MonthNum == 2 && LeapYear = true)
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:171: cannot return a value from method whose result type is void
                   return 29;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:175: cannot return a value from method whose result type is void
                   return 28;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:184: cannot find symbol
    symbol : variable AvgDailyRainfall
    location: class Meteorological
              AvgDailyRainfall = Rainfall[MonthNum]/NumDays;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:185: cannot find symbol
    symbol : variable AvgDailyRainfall
    location: class Meteorological
              if (AvgDailyRainfall > WettestFigure)
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:187: cannot find symbol
    symbol : variable AvgDailyRainfall
    location: class Meteorological
                   WettestFigure = AvgDailyRainfall;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:196: cannot find symbol
    symbol : variable AvgDailySun
    location: class Meteorological
              AvgDailySun = SunHours[MonthNum]/NumDays;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:197: cannot find symbol
    symbol : variable AvgDailySun
    location: class Meteorological
              if (AvgDailySun > MaxSunshine)
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:199: cannot find symbol
    symbol : variable AvgDailySun
    location: class Meteorological
                   MaxSunshine = AvgDailySun;
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:221: cannot find symbol
    symbol : variable StatsFile
    location: class Meteorological
              StatsFile = ("Stats" + Year + ".txt");
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:223: cannot find symbol
    symbol : variable StatsFile
    location: class Meteorological
              PrintWriter outFile = new PrintWriter (new File(StatsFile));
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:227: incompatible types
    found : java.lang.String
    required: int
              WettestFigure = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:229: incompatible types
    found : java.lang.String
    required: int
              HighestDay = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:233: incompatible types
    found : java.lang.String
    required: int
              HighestTemp = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:237: incompatible types
    found : java.lang.String
    required: int
              MaxSunshine = input.next();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:256: incompatible types
    found : java.lang.String
    required: int
              MonthNum = input.nextLine();
    ^
    C:\Documents and Settings\Mlawton\My Documents\Uni\Assignment 2\Referral Assignment 2\Meteorological.java:261: cannot return a value from method whose result type is void
              return MonthNum;

  • Not able to download ios 5 it says network error help me plz...

    not able to download ios 5 it says network error help me plz...

    hi,
    Have you try to download in your iTunes putting off your firewall ?
    Be careful with this aunction and put in on after the download.
    Have a nice day

  • Hi when i send imessages it keeps showing up as my email address on the receiving device. I know its something simple! Help please.

    Hi when i send imessages it keeps showing up as my email address on the receiving device. I know its something simple! Help please.

    Hi Megamanfx,
    If you are having issues with the Sent From settings in iMessage on your iPhone, you may find the following article helpful:
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    Regards,
    - Brenden

  • I can't access the app store - I get the following messages - error 1004 or 100 or 4 or unknown error - help!!!

    I can't access the app store - I get the following messages - error 1004 or 100 or 4 or unknown error - help!!!
    I've disabled the firewalls, the virus protection, the application protection - nothing helps.

    I'd maybe try doing a search for Safari on your iPad first (swipe to the left to search). If it shows up in that search you can go to Settings > General > Reset and choose 'reset home screen layout' which will put it back where it would be by default.
    All else fails? Restore it.

  • Very simple program error (help)

    Dear group,
    Just wanted to get a number from sdtin and print it. The program shows a compiler error. Help.
    import java.io.*;
    class keys
         public static void main(String args[])
              int a,b;
              System.out.println("enter a number");
              try
                   a = System.in.read(b);
                   System.out.write(a);
              catch(IOException e){
    `               System.out.print("Sorry. can't print.");
    }

    error:
    symbol:cannot resolve sysbol
    location: class java.io.ImputStream
              a = System.in.read(b);but the same function works in this program.
    class keys{
      public static void main (String args[])
          byte name[] = new byte[100];
          int n_read = 0;
          System.out.println("What is your name?");
          try {
            n_read = System.in.read(name);
            System.out.print("Hello ");
            System.out.write(name,0,n_read);
          catch (IOException e) {
            System.out.print("Sorry.  can't catch your name.");
    }

  • Plz help me on this very simple error

    hello everybody...i'm very new to java programming...i'm unable to execute my program though it has been compiled...my coding is something like this and is very easy>>
    class abc
    public static void main(String [] args)
    System.out.println("hello");
    and at the time of execution...this error is shown up>>
    C:\Documents and Settings\Ishan\Desktop>java abc
    Exception in thread "main" java.lang.NoClassDefFoundError: abc
    Caused by: java.lang.ClassNotFoundException: abc
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: abc. Program will exit.
    plz help me on this. thanks.

    Follow the instructions in this tutorial:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    See problem solutions here:
    http://java.sun.com/docs/books/tutorial/getStarted/problems/index.html

  • Please help; Need 7 simple errors correcting asap to hand in Monday

    this code i typed has 2 errors; Can someone correct and help please?
    import java.util.scanner;
    public class dh{
    public static void main(String[]args){
    Scanner lire=newScanner(System.in);
    double dh=1,somdudh=0;
    System.out.printlen("reste");
    reste=lire.nextdouble();
    System.out.printlen("nb100dh");
    nb100dh=lire.nextdouble();
    System.out.printlen("nb50dh");
    nb50dh=lire.nextdouble();
    System.out.printlen(m);
    m=lire.nextdouble();
    While (dh!=0);{
    System.out.printlen("entrer le montrant");
    dh=lire.nextdouble();
    somdudh=somdudh+dh;
    System.out.printlen("vous devez"+dh+"dirhams")
    System.out.printlen("montrant verse");
    m=lire.nextdouble();
    reste=m-dh;
    nb100dh=0;
    While (reste>=100){
    nb100dh=nb100dh+1;
    m=lire.nextdouble();
    reste=reste-100;
    nb50dh=0;
    if(reste>=50)
    {reste=reste-50;}
    System.out.printlen("rendu de la monnaie");
    System.out.printlen("billets de 100dh nb100dh");
    System.out.printlen("billets de 50 dh nb50dh");
    System.out.printlen("pieces de 10 dh reste");
    Thank you,
    Amissan

    goodmorning;i want to think you a lot ,i do want you advice me to do but i still have one problrm please could you check my new code pleaseimport java.util.Scanner;
    public class Dirhams{
    public static void main(String[]args){
    Scannerlecture=new Scanner(System.in);
    double dh=1;
    double somdudh=0;
    double reste;
    double m;
    double nb100dh;
    double nb50dh;
    while (dh!=0){
    System.out.println("entrer le montrant:");
    dh=lecture.nextDouble();
    somdudh=somdudh+dh;
    System.out.println("vousdevez"+dh+"dirhams");
    System.out.println("montrant verse"+m);
    m=lecture.nextDouble();
    System.out.println("reste");
    reste =m-dh;
    nb100dh=0;
    while (reste>=100){
    nb100dh=nb100dh+1;
    reste=reste-100;
    nb50dh=0;
    if(reste>=50)
    {nb50dh=1;
    reste=reste-50;}
    System.out.println("rendu de la monnaie");
    System.out.println("billetsde100dh"+nb100dh);
    System.out.println("billets de 50dh"+nb50dh);
    System.out.println("pieces de 10 dh"+reste);
    it s give me 3 errors
    1/^Scannerlecture=new Scanner(system.in);
    2/dh=^lecture.nextDouble();
    3/m=lecture.nextdouble();
    these are the 3 errors
    thank you once again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Distorted music in new PC Suite?

    I have recently installed the current version of PC suite, ripped some cd s to media player and then sent them to my phone (6680) via bluetooth. Everything seemed ok except when i play any of the tracks back on the phone they re distorted. Any help a

  • 'contains' query  clause in GET_SEARCH_RESULTS

    Hi, I'm using UCM & Oracle DB 11g and I would like to do invoke GET_SEARCH_RESULT service with a query string like this; "dDocTitle <contains> `alle*`". If I run this query I obtainn the error: "Unable to find parsed elements with engine label 'DATAB

  • Cannot start iChat....cannot accept invites.....

    spent an hour on the phone with support.....they didn't help. I have connected to the apple test (appleu3test01, 02 & 03...) works fine. My pal can also connect to the test sites. But, neither of us can connect to anyone else. There is a friend of hi

  • Entry "SAP-R/3" appears 3 times in RSA5 / Business Content

    Hello all, I have two short questions: 1. In the R/3 Source System the node "SAP-R/3" appears three times (see below). Is this correct? Why does it appear multiple times? What are the differences? 2. There also appears a root node "NODESNOTCONNECTED"

  • Amplitude increase when using Soundtrack Pro as external editor

    I am finding that when I use Soundtrack Pro as an external sample editor from within Logic, the subsequent audio in STP is louder by about 7-8dB, and so often clips. The audio region plays normally within the Logic sample editor and if I open it with