JAVA : problem with terminalio

This is a discussion on JAVA : problem with terminalio within the Windows Programming forums, part of the Platform Specific Boards category; i am using sun's java sdk. the problem is that a program will not compile while using terminalio package. i ...

  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
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

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, 03:12 AM
  2. Java vs C to make an OS
    By WOP in forum Tech Board
    Replies: 59
    Last Post: 05-27-2007, 04: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, 03:06 PM
  5. Java Problem
    By DsS-WaR in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2001, 10:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21