declare a string value when creating a class in java code example Example: declare String in java String stringName = "your string content";