Computing.Net > Forums > Programming > What exactly is System.in? (Java)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

What exactly is System.in? (Java)

Reply to Message Icon

Name: Payne
Date: January 12, 2003 at 10:51:56 Pacific
OS: Windows 2k
CPU/Ram: 800/256
Comment:

Hello. I am currently reading a book for Java beginners and I am currently working on a chapter about I/O. This chapter has left me somewhat puzzled, though, because it was explaining that there are 3 predefined streams (in, out, and err) in the System class. Then it said that System.in was an object of the InputStream class. It explained earlier, however, that InputStream was an abstract class and according to the book it is not possible to create objects of abstract classes. So my question would be, how is it possible that System.in is an object of InputStream? If anyone could lend an explanation about this I would be greatly appreciative.



Sponsored Link
Ads by Google

Response Number 1
Name: Skvat
Date: January 17, 2003 at 12:33:46 Pacific
Reply:

You are right, the Class 'System' cannot be instantiated, but all the methods are static, alas they can be run regardless, because they are invoked through the Class rather than through an instance(of the class).

Hope this helped, if you have any questions feel free to contact me.


0
Reply to Message Icon

Related Posts

See More


Wave files in VB6 Need help with basic savi...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: What exactly is System.in? (Java)

what exactly is an assembly in dotn www.computing.net/answers/programming/what-exactly-is-an-assembly-in-dotn/14037.html

what exactly is a managed code?? www.computing.net/answers/programming/what-exactly-is-a-managed-code/13332.html

what exactly is msdos.sys? www.computing.net/answers/programming/what-exactly-is-msdossys/11494.html