Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java classes-fundamentals  RSS feed

 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




hi all

have started working on classes, i have these two classes in two seperate files -

when initialize the instance of class "mybox.width=30;" - it says 'width cannot be resolved or is not a files'
i am using eclipse, everything works fine in note pad... thanks for your help
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abid Ramay wrote:when initialize the instance of class "mybox.width=30;" - it says 'width cannot be resolved or is not a files'

Check your spelling. Compilers are very finicky about things like that.

Winston
 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Winston Gutkowski -- ahh cool man, i just made a fool out of myself ;P

cheers
 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi again

actually its still the same .. sorry for confusion

thanks
 
Charles D. Ward
Ranch Hand
Posts: 99
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have this in your Box class:



And in your other class you have this:

 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Charles D. Ward - the mistake is corrected .. i am seeing this abnormal behaviour .. it's gives you an error and if i type it again .. it goes away.

thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!