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

[amp_mcq option1=”PadLeft, PadRight” option2=”Left, Right” option3=”LeftAlign, RightAlign” option4=”AlignLeft, AlignRight” correct=”option1″]

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.