Programming Articles

Page 2541 of 2545

What is the difference between System.out, System.in and System.err streams in Java?

Swarali Sree
Swarali Sree
Updated on 30-Jul-2019 2K+ Views

All the programming languages provide support for standard I/O where the user's program can take input from a keyboard and then produce an output on the computer screen. Similarly, Java provides the following three standard streams:Standard Input: This is used to feed the data to user's program and usually a keyboard is used as a standard input stream and represented as System.in.Standard Output: This is used to output the data produced by the user's program and usually a computer screen is used for standard output stream and represented as System.out.Standard Error: This is used to output the error data produced ...

Read More

What is Callable interface in Java?

Sharon Christine
Sharon Christine
Updated on 30-Jul-2019 1K+ Views

The Callable interface is found in the package java.util.concurrent. The Callable object can return the computed result done by a thread in contrast to a runnable interface which can only run the thread. The Callable object returns a Future object which provides methods to monitor the progress of a task being executed by a thread. The future object can be used to check the status of a Callable and then retrieve the result from the Callable once the thread is done. It also provides timeout functionality.

Read More

What are the platforms that support Java programming language?

varma
varma
Updated on 30-Jul-2019 1K+ Views

Java runs on operating systems such as Windows, Mac OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc.

Read More

What is meant by Java being an architecture neutral language?

Sreemaha
Sreemaha
Updated on 30-Jul-2019 5K+ Views

Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform-independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever platform it is being run on. Thus when you write a piece of Java code in a particular platform and generated an executable code .class file. You can execute/run this .class file on any system the only condition is that the target system should have JVM (JRE) installed in it. In short, Java compiler generates an architecture-neutral ...

Read More

What is the purpose of System class in Java?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 30-Jul-2019 2K+ Views

System class belongs to the package java.lang. It cannot be instantiated. A System class provides − standard output. error output streams. standard input and access to externally defined properties and environment variables. A utility method for quickly copying a portion of an array. a means of loading files and libraries. Following are the fields for java.lang.System class − static PrintStream err − This is the "standard" error output stream. static InputStream in − This is the "standard" input stream. static PrintStream out − This is the "standard" output stream.

Read More

What is meant by Java being a dynamic language?

Giri Raju
Giri Raju
Updated on 30-Jul-2019 3K+ Views

Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run-time information that can be used to verify and resolve accesses to objects at run-time.

Read More

What is the difference between Component class and Container class in Java?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 4K+ Views

The class Component is the abstract base class for the non-menu user-interface controls of AWT. A component represents an object with graphical representation. The class Container is the superclass for the containers of AWT. The container object can contain other AWT components.

Read More

What is Java API and what is its use?

mkotla
mkotla
Updated on 30-Jul-2019 7K+ Views

The full form of API is Application Programming Interface. It is a document which gives you the list of all the packages, classes, and interfaces, along with their fields and methods.Using these API’s, the programmer can know how to use the methods, fields, classes, interfaces provided by Java libraries.

Read More

Can you use both this() and super() in a constructor in Java?

Samual Sam
Samual Sam
Updated on 30-Jul-2019 2K+ Views

No, you cannot have both this() and super() in a single constructor.

Read More

What is the equivalent of C# namespace in Java?

usharani
usharani
Updated on 30-Jul-2019 398 Views

Packages are similar to namespaces in C#.

Read More
Showing 25401–25410 of 25,445 articles
Advertisements