View RSS Feed

My Java Tips

  1. System class

    by , 11-10-2011 at 07:23 PM (My Java Tips)
    The System class is a very useful which contains static fields and methods. It cannot be instantiated. In this post, I will briefly write about System class and will explore few interesting methods.


    System class belongs to java.lang package, so it can be used in any Java class without importing any package. System class provides static methods that are very useful. For example to get current time in milliseconds:

    Java Code:
    static long currentTimeMillis()
    ...