. . . . . . . . method is used to remove space from beginning and end of a string.

Trim
Remove
Truncate
DeleteSpace

The correct answer is A. Trim.

The Trim method is used to remove whitespace from the beginning and end of a string. It takes two arguments: the first is the string to trim, and the second is the characters to trim. If the second argument is not specified, all whitespace characters (space, tab, newline, carriage return, and form feed) will be trimmed.

The Remove method is used to remove a substring from a string. It takes two arguments: the first is the string to remove, and the second is the index of the first character of the substring to remove. The substring will be removed starting at the specified index and continuing to the end of the string.

The Truncate method is used to shorten a string. It takes one argument: the new length of the string. The string will be truncated to the specified length, and any characters after the truncation point will be removed.

The DeleteSpace method is not a valid method in Java.