. . . . . . . . and . . . . . . . . methods are used to align characters in a String.

PadLeft, PadRight
Left, Right
LeftAlign, RightAlign
AlignLeft, AlignRight

The correct answer is: A. PadLeft, PadRight

The PadLeft and PadRight methods are used to align characters in a String. The PadLeft method adds spaces to the left of the string, while the PadRight method adds spaces to the right of the string.

The Left and Right methods are used to extract a substring from a string, starting at the beginning or end of the string, respectively.

The LeftAlign and RightAlign methods are not methods in Java.

Exit mobile version