Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can you please tell me what happens to the constructor in the example of INHERITANCE?

 
shoeb sayyed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you getting an error? If so, then what's the error?

The only line that's wrong in your example is line 18 - there is a space in there that shouldn't be there, and the method is not called PrintIn but println (with a lower-case p and lower-case L and not an upper-case I).
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the quotes on line 18. They should be ". Did you copy this code from Word or some program like that?
 
Srikanth Choppara
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not find any thing wrong in the code except line 18. Correct your code to System.out.println(t.i); then it will work fine.
 
shoeb sayyed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Exception in thread "main" java.lang.RuntimeException: Uncompilable source code
at connectivity.Test.main(Test.java:22)
 
shoeb sayyed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it resolved

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic