Normal
* Writes a string to the plottingArea. * The first character of the string is put to the coordinates (x, y), the rest of the string is written horizontally starting from there and going left to right - as long as it fits into the canvas. * * @param x x coordinate of the start of the string * @param y y coordinate of the start of the string * @param s the string to write */public static void plotString(int x, int y, String s) {1String str = "Anfang vom Ende";2if (str.startsWith("Anfang")) {3 System.out.println("Der String beginnt mit dem Anfang ...");4}5if (str.endsWith("Ende")) {6 System.out.println("... und hört mit dem Ende auf.");wie kann ich das schreiben }
* Writes a string to the plottingArea.
* The first character of the string is put to the coordinates (x, y), the rest of the string is written horizontally starting from there and going left to right - as long as it fits into the canvas.
*
* @param x x coordinate of the start of the string
* @param y y coordinate of the start of the string
* @param s the string to write
*/
public static void plotString(int x, int y, String s) {