We cannot instantiate the System class because its final and all its constructors are private. All the variables and methods of System class are static. Following example gets and displays the current logged in user name.

Java Code:
class UserName {
public static void main(String[] args) {
String name;
name = System.getProperty("user.name");