File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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: 14074
    
  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: 19651
    
  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
 
 
subject: Can you please tell me what happens to the constructor in the example of INHERITANCE?
 
Similar Threads
super().this()!
super(x,y) and this() in one constructor