Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 26th, 2007, 01:51 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default noob question

Getting error as following..
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    TextReader cannot be resolved to a type
    TextReader cannot be resolved to a type

    at TestCourseGrade.main(TestCourseGrade.java:15)

I am learning java out of a mercer book. he has some pre written code i copied to the working folder. code was named TextReader.java.

I am using eclispe to code and compile in. the code i am writing is a simple prog, which follows.
import TextReader;
public class TestCourseGrade
{
    public static void main (String[] args)
    {
        double test1 = 0.0;
        double test2 = 0.0;
        double finalExam = 0.0;
        double courseGrade = 0.0;

        System.out.println("This program computes a course grade whe");
        System.out.println("you have entered three requested values");
        System.out.println();

        TextReader keyboard = new TextReader();
        System.out.print("Enter first test:");
        test1 = keyboard.readDouble();

        System.out.print("Enter second test:");
        test2 = keyboard.readDouble();
        System.out.print("Enter final test:");
        finalExam = keyboard.readDouble();

        courseGrade = (0.25 * test1)
                    + (0.25 * test2)
                    + (0.50 * finalExam);
        System.out.println("Course Grade: " + courseGrade + "%");
    }
}

Its probably something really simple, some how recogizing that the class (class, the other code written that it is calling) its is calling is there.

Im green, probably shows.


 
Old August 27th, 2007, 11:28 PM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default


The Textreader is probably not part of a package

http://studyjava.org/forums/




Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple (noob) Question Bourne C++ Programming 6 March 6th, 2007 10:07 AM
total noob xslt question mrscott XSLT 3 February 22nd, 2006 04:35 PM
Noob XML question Skido XML 0 December 23rd, 2005 04:25 PM
Noob needs help with XSL syntax question lancia12 XSLT 1 October 1st, 2004 08:45 AM
Noob Question jverdin BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 April 2nd, 2004 10:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.