This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Can you please tell me what happens to the constructor in the example of INHERITANCE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can you please tell me what happens to the constructor in the example of INHERITANCE?" Watch "Can you please tell me what happens to the constructor in the example of INHERITANCE?" New topic
Author

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

shoeb sayyed
Ranch Hand

Joined: Mar 14, 2010
Posts: 48


Thanks,
Shoeb
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114
    
  16

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).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19674
    
  18

Check the quotes on line 18. They should be ". Did you copy this code from Word or some program like that?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Srikanth Choppara
Greenhorn

Joined: Nov 19, 2009
Posts: 1
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

Joined: Mar 14, 2010
Posts: 48



Exception in thread "main" java.lang.RuntimeException: Uncompilable source code
at connectivity.Test.main(Test.java:22)
shoeb sayyed
Ranch Hand

Joined: Mar 14, 2010
Posts: 48
i got it resolved

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can you please tell me what happens to the constructor in the example of INHERITANCE?