Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

Get System Time Example

In this example we shall show you how to get the System Time. We are using the System class, that contains several useful class fields and methods. It cannot be instantiated.To get the System Time one should perform the following steps: Use the currentTimeMillis() API method of System. Thi method returns the current time in milliseconds. Note that while the ...

Read More »

Get classpath Example

With this example we are going to demonstrate how to get the classpath. We are using the System class, that contains several useful class fields and methods. This class cannot be instantiated. In short, to get the classpath using System class you should: Use the getProperty(String key), for the java.class.path key. This method gets the system property indicated by the ...

Read More »

Get system properties with System

With this example we are going to demonstrate how to get system properties. We are using the System class, that contains several useful class fields and methods. In short, to get system properties with System class you should: Call getProperties() API method of System. This method determines the current system properties. It returns an object of the Properties class, that ...

Read More »

Determine Operating System with System

This is an example of how to determine the Operating System with System class. The System class, that contains several useful class fields and methods. This class cannot be instantiated. Determining the Operating System with System class implies that you should: Use the getProperty(String key), for the os.name, os.version and os.arch keys. This method gets the system property indicated by ...

Read More »

Suggest Object Finalization to the JVM

In this example we shall show you how to suggest an Object Finalization to the JVM. We are using the Runtime class. Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method. An application cannot ...

Read More »

Suggest Garbage Collection to the JVM

With this example we are going to demonstrate how to suggest Garbage Collection to the JVM. We are using the Runtime class. Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method. An application cannot ...

Read More »

Get JVM memory information with Runtime

This is an example of how to get the JVM memory information with Runtime class. Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method. An application cannot create its own instance of this class. ...

Read More »

Get number of processors with Runtime

In this example we shall show you how to get the number of processors with Runtime class. Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method. An application cannot create its own instance of ...

Read More »

StringBuffer delete characters

With this example we are going to demonstrate how to delete characters using a StringBuffer. A StringBuffer is a thread-safe, mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain ...

Read More »

StringBuffer reverse method

This is an example of how to use the reverse method of StringBuffer. A StringBuffer is a thread-safe, mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls. ...

Read More »