string in java declaration code example Example: declare String in java String stringName = "your string content";