class System

System.in System.out System.err

System.in System.out System.err Every OS comes with three built in streams – in, out and err entirely managed by OS. We know from IO Streams that a stream is a flow of data between two terminals (may be two files or two sockets etc.). in stream carries (flows) data from…

Garbage Collection gc() exit(0)

Garbage Collection gc() exit(0) Summary: In this "Garbage Collection gc() exit(0)", the basics of garbage collection focusing the methods gc() and exit(0) illustrated. More on Garbage Collection gc() exit(0) methods Unwanted (not used in the remaining part of the program) objects generated in the process are known as garbage. Java…

class System

class System Introduction The java.lang.System class comes with many static methods and mainly intended to communicate with the underlying operating systems. Using these methods, it is possible to take keyboard input (using System.in), knowing system time (using currentTimeMillis()), copying an array elements into another (using arraycopy()), to advise to go…