Thread: JAVA : problem with terminalio

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    26

    JAVA : problem with terminalio

    i am using sun's java sdk.

    the problem is that a program will not compile while using terminalio package. i don't think there is anything wrong with the code, but i am confused about the error message i get.

    Code:
    C:\j2sdk1.4.2_01\school>type Momentum.java
    /** Assignment #11 Momentum
    * Version 1
    * 9/26/03
    * AP Computer Science
    *
    * This program will determine the momentum of an object
    * The user must input the mass and velocity first
    */
    
    
    import TerminalIO.KeyoardReader;             //import class from package
    
    public class Momentum
    {
       public static void main (String [] args)
            {
            KeyboardReader reader = new KeyboardReader();    //make new object
            int mass, velocity, momentum;                //declare variables
    
            System.out.print("Enter kilograms mass: ");
            System.out.print("Enter meters per second velocity: ");
            mass = reader.readdouble();
            velocity = reader.readdouble();
    
            momentum = mass * velocity;
    
            System.out.print("The equivalent in the momentum is: \"momentum\" ");
    
            reader.pause();
            }
    }
    C:\j2sdk1.4.2_01\school>javac Momentum.java
    Momentum.java:12: cannot resolve symbol
    symbol  : class KeyoardReader
    location: package TerminalIO
    import TerminalIO.KeyoardReader;             //import class from package
                      ^
    Momentum.java:18: cannot resolve symbol
    symbol  : class KeyboardReader
    location: class Momentum
            KeyboardReader reader = new KeyboardReader();    //make new object
            ^
    Momentum.java:18: cannot resolve symbol
    symbol  : class KeyboardReader
    location: class Momentum
            KeyboardReader reader = new KeyboardReader();    //make new object
                                        ^
    3 errors
    
    C:\j2sdk1.4.2_01\school>
    Is there something wrong with the "K" ?

    thank you

  2. #2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mats, the java answers
    By Jaqui in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-22-2008, 02:12 AM
  2. Java vs C to make an OS
    By WOP in forum Tech Board
    Replies: 59
    Last Post: 05-27-2007, 03:56 AM
  3. Multiple Java files for one Java project
    By doubleanti in forum Windows Programming
    Replies: 2
    Last Post: 11-22-2004, 02:06 AM
  4. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  5. Java Problem
    By DsS-WaR in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2001, 10:01 PM