Java access a string from another class

Java access a string from another class
ref‮:ot re‬lautturi.com
/**
 * @author lautturi.com
 * Java example: access a string from another class
 */

import java.util.*;

class Lau {
	String str="Lautturi";
}

public class Lautturi {

	public static void main(String[] args) {

		Lau a = new Lau();
		System.out.println("string from class Lau:" + a.str);

	}

}

output:

string from class Lau:Lautturi
Created Time:2017-08-30 08:22:05  Author:lautturi