What is Runtime class and its purpose?

Answer Posted / ranganathkini

The Runtime(along with the System class) provide system
level functionality to Java applications.

The facilities of these classes are not necessarily portable
across host operating system and may need to be recompiled
when porting.

Some of the facilities provided are:
1. Reading from the keyboard as input
2. Writing to console output
3. Interaction with JVM process for event notification, or
information such as free memory, etc
4. Reading/writing system properties/environment variables
5. executing other programs from within java apps

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish between a predicate and a function?

654


Is java hashset ordered?

669


Why do we use bufferedreader?

641


What is meant by 'Class access modifiers'?

663


What is difference between add() and addelement() in vector?

1168






What is codebase?

639


How can I right-justify a string?

723


What do you mean by local class?

623


How to sort numbers in java without array?

627


define polymorphism in java

723


Difference between static synchronization vs. Instance synchronization?

679


What are the characteristics of java?

613


What are namespaces in java?

614


What is compiler and what its output.

724


List types of storage classes in java?

719