Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning Java 2
|
BOOK: Beginning Java 2
This is the forum to discuss the Wrox book Beginning Java 2, SDK 1.4 Edition by Ivor Horton; ISBN: 9780764543654
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Java 2 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 February 1st, 2004, 12:09 AM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Constructors Page 194

I have downloaded the programs from your website just in case I had keystroke errors. I'm working page 194 chapter 5 "Multiple Constructors" and when I compile and run the program I get the following error:
lava.lang.nocalssdeffounderror: sphere
Exception in thread "main"
I'm using NetBeans IDE 3.5.1
Could you tell me what I may be doing wrong?

Thank You,
Tony
 
Old February 1st, 2004, 07:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe it's just a typo but shouldn't 'sphere' be 'Sphere'; by covention all classes in java should begin with a capital letter.

Cheers

Martyn
 
Old February 5th, 2004, 11:00 PM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have done something wrong with the packgage declaration. In the NetBeans you import a filesystem. Let's say I import the directory "c:\myclasses", that is the filesystem, let's say I have some more directories under "c:\myclasses", like
"com\myself\myjava" ( so it looks like: "c:\myclasses\com\myself\myjava" the first thing I have to write in my java code file is
"package com.myself.myjava;"
I hope this is of some help
best regards
rune






Similar Threads
Thread Thread Starter Forum Replies Last Post
page 194, eval() problem keenlearner BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 December 16th, 2006 08:27 AM
Printing PDF (page x to y) / multiple page seq's robbert XSLT 1 November 13th, 2006 10:27 AM
Custom Control with Multiple Constructors? three ASP.NET 2.0 Basics 12 May 2nd, 2006 05:29 PM
multiple constructors for custom controls three BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 0 May 1st, 2006 03:24 PM
CH7: RegExp Object PG 194 and 195 xZanU BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 5 January 12th, 2006 04:31 PM





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