পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Wednesday, January 18, 2017

Java.lang.System Class

Introduction

The java.lang.System class contains several useful class fields and methods. It cannot be instantiated.Facilities provided by System:

  • 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

Class declaration

Following is the declaration for java.lang.System class:
public final class System
   extends Object

Field

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.

Class methods

S.N. Method & Description
1 static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
This method copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
2 static String clearProperty(String key)
This method removes the system property indicated by the specified key.
3 static Console console()
This method returns the unique Console object associated with the current Java virtual machine, if any.
4 static long currentTimeMillis()
This method returns the current time in milliseconds.
5 static void exit(int status)
This method terminates the currently running Java Virtual Machine.
6 static void gc()
This method runs the garbage collector.
7 static Map<String,String> getenv()
This method returns an unmodifiable string map view of the current system environment.
8 static String getenv(String name)
This method gets the value of the specified environment variable.
9 static Properties getProperties()
This method determines the current system properties.
10 static String getProperty(String key)
This method gets the system property indicated by the specified key.
11 static String getProperty(String key, String def)
This method gets the system property indicated by the specified key.
12 static SecurityManager getSecurityManager()
This method gets the system security interface.
13 static int identityHashCode(Object x)
This method returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().
14 static Channel inheritedChannel()
This method returns the channel inherited from the entity that created this Java virtual machine.
15 static void load(String filename)
This method loads a code file with the specified filename from the local file system as a dynamic library.
16 static void loadLibrary(String libname) This method loads the system library specified by the libname argument.
17 static String mapLibraryName(String libname)
This method maps a library name into a platform-specific string representing a native library.
18 static long nanoTime()
This method returns the current value of the most precise available system timer, in nanoseconds.
19 static void runFinalization()
This method runs the finalization methods of any objects pending finalization.
20 static void setErr(PrintStream err)
This method reassigns the "standard" error output stream.
21 static void setIn(InputStream in)
This method reassigns the "standard" input stream.
22 static void setOut(PrintStream out)
This method reassigns the "standard" output stream.
23 static void setProperties(Properties props)
This method sets the system properties to the Properties argument.
24 static String setProperty(String key, String value)
This method sets the system property indicated by the specified key.
25 static void setSecurityManager(SecurityManager s)
This method sets the System security.

Methods inherited

This class inherits methods from the following classes:
  • java.lang.Object

1 comment:

  1. Thanks for sharing this post on system class ( http://www.flowerbrackets.com/array-copy-program-in-java/)

    ReplyDelete