• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compila errora help me :(

 
Nitesh Nandwana
Ranch Hand
Posts: 115
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The Roo class declares the doRooThings() member as public. So if we make a subclass of Roo, any code in that Roo subclass can call its own inherited doRooThings() method.


Besides being able to invoke the doRooThings() method on itself, code from some other class can call doRooThings() on a Cloo instance, as in the following:





i've already posted my problem but no one have satisfied answer help me.
http://www.coderanch.com/t/552503/java-programmer-SCJP/certification/it-printing-mistake-SCJP-famous
 
John Stark
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have to do:



because in your code the Toon class doesn't know about the Cloo class.

John
 
Nitesh Nandwana
Ranch Hand
Posts: 115
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Stark wrote:You might have to do:



because in your code the Toon class doesn't know about the Cloo class.

John


Thank you John Stark for quick respond,i'll try it.

 
Nitesh Nandwana
Ranch Hand
Posts: 115
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Stark wrote:You might have to do:



because in your code the Toon class doesn't know about the Cloo class.

John


But even after use of that import statement it gives error,when we do any change then we have to do more changes, which can't be good idea.


And why should insert any other code here because i just want to finish this exercise as given in the famous kathy Sierra SCJP 310-065 book on page no 29 can you explain this page, how their such faulty code is working in book and my code isn't working at all .
 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class
class Toon is not in the proper package.

1. With out changes also you can execute this by placing the Toon.java in to the notcert package.
2. make Coo class as public, default visiblity means with in the Package only
 
Nitesh Nandwana
Ranch Hand
Posts: 115
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everyone congrats me, i had resolved this problem myself and i want to show author of SCJP 310-065 book that what changes should be there in right manner so greenhorns never get confused .








Now see it's working




 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everyone congrats me

Good Job

i want to show author of SCJP 310-065 book

Check if below thread is what you were searching for !
http://www.coderanch.com/t/467890/java-programmer-SCJP/certification/Compiling-errata-SCJP
 
Nitesh Nandwana
Ranch Hand
Posts: 115
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Jai wrote:
Everyone congrats me

Good Job

i want to show author of SCJP 310-065 book

Check if below thread is what you were searching for !
http://www.coderanch.com/t/467890/java-programmer-SCJP/certification/Compiling-errata-SCJP



thank you John Jai.
 
Nitesh Nandwana
Ranch Hand
Posts: 115
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chiranjeevi Kanthraj wrote:The class
class Toon is not in the proper package.

1. With out changes also you can execute this by placing the Toon.java in to the notcert package.
2. make Coo class as public, default visiblity means with in the Package only


thank you Chiranjeevi Kanthraj for your time.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic