cannot Access IntClass

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimgym1989
    New Member
    • Sep 2008
    • 30

    cannot Access IntClass

    Code:
    import java.io.*;
    
    public class CharacterCount
    {
        public static void main(String[] args)throws FileNotFoundException, IOException
       {
            int lineCount = 0;
            int[] letterCount = new int[26];
    
            IntClass next = new IntClass();
    
            //...
        }
    
    
        static void copyText(FileReader infile, PrintWriter outfile,
        IntClass next, int[] letterC)throws IOException
        {
            while (next.getNum() != (int)'\n')
            {
                //...
            }
            //...
        }
    
        //...
    }
    cannot access IntClass

    why can't I access IntClass?
    I don't get it?
    where did I go wrong?
    Last edited by Nepomuk; Sep 18 '08, 10:32 AM. Reason: Reduced code to the relevant parts
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Where does this IntClass come from? It's certainly not from the standard java API.
    Also, what is the exact error message you get? Surely it's not just "Cannot access IntClass", is it?

    By the way, please only post relevant code. I've changed it for you this time.

    Greetings,
    Nepomuk (Moderator)

    Comment

    • jimgym1989
      New Member
      • Sep 2008
      • 30

      #3
      Originally posted by Nepomuk
      Where does this IntClass come from? It's certainly not from the standard java API.
      Also, what is the exact error message you get? Surely it's not just "Cannot access IntClass", is it?

      By the way, please only post relevant code. I've changed it for you this time.

      Greetings,
      Nepomuk (Moderator)
      i tried to check the Build Output and this is the error
      Code:
      G:\Course Technology\90135-5\Chapter 9 Source Code\CharacterCount.java:43: cannot access IntClass
      bad class file: G:\Course Technology\90135-5\Chapter 9 Source Code\IntClass.class
      class file has wrong version 50.0, should be 49.0
      Please remove or make sure it appears in the correct subdirectory of the classpath.
          IntClass next, int[] letterC)throws IOException
          ^
      Last edited by Nepomuk; Sep 18 '08, 12:55 PM. Reason: Added [CODE] tags for the error, because it's easier to read

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        Originally posted by jimgym1989
        i tried to check the Build Output and this is the error
        Code:
        G:\Course Technology\90135-5\Chapter 9 Source Code\CharacterCount.java:43: cannot access IntClass
        bad class file: G:\Course Technology\90135-5\Chapter 9 Source Code\IntClass.class
        class file has wrong version 50.0, should be 49.0
        Please remove or make sure it appears in the correct subdirectory of the classpath.
            IntClass next, int[] letterC)throws IOException
            ^
        OK, we've got the error code now, now please answer the other question: What is this IntClass? Do you have it somewhere? Is it imported from somewhere? We'll have to know, because the compiler obviously doesn't know where to look for it.

        Greetings,
        Nepomuk

        Comment

        Working...